X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a293a23fa93855c9c6e180bfd77880b794c24673..fd49462a5a09e107b7bb5c0ef8635db328b399b8:/cypress/integration/delete-multiple-files.spec.js?ds=sidebyside diff --git a/cypress/integration/delete-multiple-files.spec.js b/cypress/integration/delete-multiple-files.spec.js index bd40a2b7..deb56f66 100644 --- a/cypress/integration/delete-multiple-files.spec.js +++ b/cypress/integration/delete-multiple-files.spec.js @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: AGPL-3.0 -describe('Collection panel tests', function () { +describe('Multi-file deletion tests', function () { let activeUser; let adminUser; @@ -32,7 +32,8 @@ describe('Collection panel tests', function () { }) .as('testCollection').then(function () { cy.loginAs(activeUser); - cy.visit(`/collections/${this.testCollection.uuid}`); + cy.goToPath(`/collections/${this.testCollection.uuid}`); + cy.get('[data-cy=collection-files-panel]').within(() => { cy.get('[type="checkbox"]').first().check(); cy.get('[type="checkbox"]').last().check(); @@ -50,28 +51,11 @@ describe('Collection panel tests', function () { cy.createCollection(adminUser.token, { name: `Test collection ${Math.floor(Math.random() * 999999)}`, owner_uuid: activeUser.user.uuid, - manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n. 37b51d194a7513e45b56f6524f2d51f2+3 0:3:baz\n" + manifest_text: "./subdir 37b51d194a7513e45b56f6524f2d51f2+3 0:3:foo\n. 37b51d194a7513e45b56f6524f2d51f2+3 0:3:baz\n" }) .as('testCollection').then(function () { cy.loginAs(activeUser); - cy.visit(`/collections/${this.testCollection.uuid}`); - - cy.get('[data-cy=collection-files-panel]') - .contains('bar').rightclick({ force: true }); - - cy.get('[data-cy=context-menu]') - .contains('Rename') - .click(); - - cy.get('[data-cy=form-dialog]') - .should('contain', 'Rename') - .within(() => { - cy.get('input').type(`{selectall}{backspace}subdir/foo`); - }); - cy.get('[data-cy=form-submit-btn]').click(); - cy.get('[data-cy=collection-files-panel]') - .should('not.contain', 'bar') - .and('contain', 'subdir'); + cy.goToPath(`/collections/${this.testCollection.uuid}`); cy.get('[data-cy=virtual-file-tree] > div > i').first().click(); cy.get('[data-cy=collection-files-panel]') @@ -83,6 +67,10 @@ describe('Collection panel tests', function () { cy.get('[data-cy=collection-files-panel-options-btn]').click(); cy.get('[data-cy=context-menu] div').contains('Remove selected').click(); cy.get('[data-cy=confirmation-dialog-ok-btn]').click(); + + cy.get('[data-cy=collection-files-panel]') + .should('not.contain', 'subdir') + .and('contain', 'baz'); }); }); })