X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/00f3ff118197f498d1e8bb0f562058a8a59b7e04..17048236a8bd8e53680d9632ff3eafa8cdf21b01:/cypress/integration/delete-multiple-files.spec.js diff --git a/cypress/integration/delete-multiple-files.spec.js b/cypress/integration/delete-multiple-files.spec.js index 0955f56a..b506fb3d 100644 --- a/cypress/integration/delete-multiple-files.spec.js +++ b/cypress/integration/delete-multiple-files.spec.js @@ -32,10 +32,7 @@ describe('Multi-file deletion tests', function () { }) .as('testCollection').then(function () { cy.loginAs(activeUser); - cy.visit(`/collections/${this.testCollection.uuid}`); - - cy.get('[data-cy=linear-progress]').should('exist'); - cy.get('[data-cy=linear-progress]').should('not.exist'); + cy.goToPath(`/collections/${this.testCollection.uuid}`); cy.get('[data-cy=collection-files-panel]').within(() => { cy.get('[type="checkbox"]').first().check(); @@ -44,13 +41,14 @@ describe('Multi-file deletion 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.wait(1000); cy.get('[data-cy=collection-files-panel]') .should('not.contain', 'baz') .and('not.contain', 'bar'); }); }); - it('deletes all files from non root dir', function () { + it.skip('deletes all files from non root dir', function () { cy.createCollection(adminUser.token, { name: `Test collection ${Math.floor(Math.random() * 999999)}`, owner_uuid: activeUser.user.uuid, @@ -58,10 +56,7 @@ describe('Multi-file deletion tests', function () { }) .as('testCollection').then(function () { cy.loginAs(activeUser); - cy.visit(`/collections/${this.testCollection.uuid}`); - - cy.get('[data-cy=linear-progress]').should('exist'); - cy.get('[data-cy=linear-progress]').should('not.exist'); + cy.goToPath(`/collections/${this.testCollection.uuid}`); cy.get('[data-cy=virtual-file-tree] > div > i').first().click(); cy.get('[data-cy=collection-files-panel]') @@ -79,4 +74,32 @@ describe('Multi-file deletion tests', function () { .and('contain', 'baz'); }); }); + + it('deletes all files from non root dir', function () { + cy.createCollection(adminUser.token, { + name: `Test collection ${Math.floor(Math.random() * 999999)}`, + owner_uuid: activeUser.user.uuid, + manifest_text: "./subdir 37b51d194a7513e45b56f6524f2d51f2+3 0:3:foo\n. 37b51d194a7513e45b56f6524f2d51f2+3 0:3:baz\n" + }) + .as('testCollection').then(function () { + cy.loginAs(activeUser); + cy.goToPath(`/collections/${this.testCollection.uuid}`); + + cy.get('[data-cy=collection-files-panel]').contains('subdir').click(); + cy.wait(1000); + cy.get('[data-cy=collection-files-panel]') + .should('contain', 'foo'); + + cy.get('[data-cy=collection-files-panel]') + .contains('foo').parent().find('[type="checkbox"]').click(); + + 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', 'foo') + .and('contain', 'subdir'); + }); + }); })