X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c48d10802d4ae95273f8b98e622e5df200cdc3a7..121165a587c43edfab0431aa1685dd8975a71e88:/cypress/integration/search.spec.js diff --git a/cypress/integration/search.spec.js b/cypress/integration/search.spec.js index c8e262f011..085298dcd0 100644 --- a/cypress/integration/search.spec.js +++ b/cypress/integration/search.spec.js @@ -161,12 +161,12 @@ describe('Search tests', function() { }); it('shows search context menu', function() { - const colName = `Collection ${Math.floor(Math.random() * Math.floor(999999))}`; - const federatedColName = `Collection ${Math.floor(Math.random() * Math.floor(999999))}`; + const colName = `Home Collection ${Math.floor(Math.random() * Math.floor(999999))}`; + const federatedColName = `Federated Collection ${Math.floor(Math.random() * Math.floor(999999))}`; const federatedColUuid = "xxxxx-4zz18-000000000000000"; // Intercept config to insert remote cluster - cy.intercept({method: 'GET', hostname: 'localhost', url: '**/arvados/v1/config?nocache=*'}, (req) => { + cy.intercept({method: 'GET', hostname: '127.0.0.1', url: '**/arvados/v1/config?nocache=*'}, (req) => { req.reply((res) => { res.body.RemoteClusters = { "*": res.body.RemoteClusters["*"], @@ -280,6 +280,7 @@ describe('Search tests', function() { cy.contains('View details'); cy.contains('Copy to clipboard').click(); + cy.waitForDom(); cy.window().then((win) => ( win.navigator.clipboard.readText().then((text) => { expect(text).to.match(new RegExp(`/collections/${testCollection.uuid}$`)); @@ -291,6 +292,7 @@ describe('Search tests', function() { cy.get('[data-cy=search-results]').contains(colName).rightclick(); cy.get('[data-cy=context-menu]').within(() => { cy.contains('Open in new tab').click(); + cy.waitForDom(); cy.get('@Open').should('have.been.calledOnceWith', `${window.location.origin}/collections/${testCollection.uuid}`) }); @@ -298,6 +300,7 @@ describe('Search tests', function() { cy.get('[data-cy=search-results]').contains(federatedColName).rightclick(); cy.get('[data-cy=context-menu]').within(() => { cy.contains('Copy to clipboard').click(); + cy.waitForDom(); cy.window().then((win) => ( win.navigator.clipboard.readText().then((text) => { expect(text).to.equal(`https://wb2.xxxxx.fakecluster.tld/collections/${federatedColUuid}`); @@ -308,6 +311,7 @@ describe('Search tests', function() { cy.get('[data-cy=search-results]').contains(federatedColName).rightclick(); cy.get('[data-cy=context-menu]').within(() => { cy.contains('Open in new tab').click(); + cy.waitForDom(); cy.get('@Open').should('have.been.calledWith', `https://wb2.xxxxx.fakecluster.tld/collections/${federatedColUuid}`) });