X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/927b67520cb7fafada0fdbb756ae9639a4ac79d8..dfbcef0fea3fbab84fada28bb901a95b48f5545a:/cypress/integration/collection.spec.js diff --git a/cypress/integration/collection.spec.js b/cypress/integration/collection.spec.js index 3813d02e..f3de8cd4 100644 --- a/cypress/integration/collection.spec.js +++ b/cypress/integration/collection.spec.js @@ -32,7 +32,7 @@ describe('Collection panel tests', function () { cy.clearLocalStorage(); }); - it.only('allows to download mountain duck config for a collection', () => { + it('allows to download mountain duck config for a collection', () => { cy.createCollection(adminUser.token, { name: `Test collection ${Math.floor(Math.random() * 999999)}`, owner_uuid: activeUser.user.uuid, @@ -46,7 +46,7 @@ describe('Collection panel tests', function () { cy.get('[data-cy=context-menu]').contains('Open as network folder or S3 bucket').click(); cy.get('[data-cy=download-button').click(); - const filename = path.resolve(path.join(downloadsFolder, `${testCollection.name}.duck`)); + const filename = path.join(downloadsFolder, `${testCollection.name}.duck`); cy.readFile(filename, { timeout: 15000 }) .then((body) => { @@ -66,6 +66,9 @@ describe('Collection panel tests', function () { expect(map['Username']).to.equal(activeUser.user.username); expect(map['Port']).to.equal(port); expect(map['Hostname']).to.equal(host); + if (map['Path']) { + expect(map['Path']).to.equal(`/c=${testCollection.uuid}`); + } }); }) .then(() => cy.task('clearDownload', { filename })); @@ -80,7 +83,7 @@ describe('Collection panel tests', function () { }) .as('testCollection').then(function () { cy.loginAs(activeUser); - cy.doSearch(`${this.testCollection.uuid}`); + cy.goToPath(`/collections/${this.testCollection.uuid}`); // Key: Color (IDTAGCOLORS) - Value: Magenta (IDVALCOLORS3) cy.get('[data-cy=resource-properties-form]').within(() => { @@ -133,7 +136,7 @@ describe('Collection panel tests', function () { head_uuid: this.sharedGroup.uuid, tail_uuid: activeUser.user.uuid }) - cy.doSearch(`${this.testCollection.uuid}`); + cy.goToPath(`/collections/${this.testCollection.uuid}`); // Check that name & uuid are correct. cy.get('[data-cy=collection-info-panel]') @@ -229,7 +232,7 @@ describe('Collection panel tests', function () { }) .as('testCollection').then(function () { cy.loginAs(activeUser); - cy.doSearch(`${this.testCollection.uuid}`); + cy.goToPath(`/collections/${this.testCollection.uuid}`); const names = [ 'bar', // initial name already set @@ -282,7 +285,7 @@ describe('Collection panel tests', function () { }) .as('testCollection').then(function () { cy.loginAs(activeUser); - cy.doSearch(`${this.testCollection.uuid}`); + cy.goToPath(`/collections/${this.testCollection.uuid}`); ['subdir', 'G%C3%BCnter\'s%20file', 'table%&?*2'].forEach((subdir) => { cy.get('[data-cy=collection-files-panel]') @@ -339,7 +342,7 @@ describe('Collection panel tests', function () { }) .as('testCollection').then(function () { cy.loginAs(activeUser); - cy.doSearch(`${this.testCollection.uuid}`); + cy.goToPath(`/collections/${this.testCollection.uuid}`); const illegalNamesFromUI = [ ['.', "Name cannot be '.' or '..'"], @@ -415,7 +418,7 @@ describe('Collection panel tests', function () { }); // Check the old version displays as what it is. cy.loginAs(activeUser) - cy.doSearch(`${oldVersionUuid}`); + cy.goToPath(`/collections/${oldVersionUuid}`); cy.get('[data-cy=collection-info-panel]').should('contain', 'This is an old version'); cy.get('[data-cy=read-only-icon]').should('exist'); @@ -438,7 +441,7 @@ describe('Collection panel tests', function () { .as('collection').then(function () { // Visit collection, check basic information cy.loginAs(activeUser) - cy.doSearch(`${this.collection.uuid}`); + cy.goToPath(`/collections/${this.collection.uuid}`); cy.get('[data-cy=collection-info-panel]').should('not.contain', 'This is an old version'); cy.get('[data-cy=read-only-icon]').should('not.exist'); @@ -554,7 +557,7 @@ describe('Collection panel tests', function () { it('creates new collection on home project', function () { cy.loginAs(activeUser); - cy.doSearch(`${activeUser.user.uuid}`); + cy.goToPath(`/projects/${activeUser.user.uuid}`); cy.get('[data-cy=breadcrumb-first]').should('contain', 'Projects'); cy.get('[data-cy=breadcrumb-last]').should('not.exist'); // Create new collection