[ARVADOS-WORKBENCH2] updated: 2.1.0-112-ga293a23f

Git user git at public.arvados.org
Tue Jan 5 18:41:40 UTC 2021


Summary of changes:
 cypress/integration/delete-multiple-files.spec.js | 88 +++++++++++++++++++++++
 1 file changed, 88 insertions(+)
 create mode 100644 cypress/integration/delete-multiple-files.spec.js

       via  a293a23fa93855c9c6e180bfd77880b794c24673 (commit)
      from  36d0bf2c656c5ff79c94216a8bfbed015bc84f7e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a293a23fa93855c9c6e180bfd77880b794c24673
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date:   Tue Jan 5 19:40:31 2021 +0100

    17016: Added browser test
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>

diff --git a/cypress/integration/delete-multiple-files.spec.js b/cypress/integration/delete-multiple-files.spec.js
new file mode 100644
index 00000000..bd40a2b7
--- /dev/null
+++ b/cypress/integration/delete-multiple-files.spec.js
@@ -0,0 +1,88 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+describe('Collection panel tests', function () {
+    let activeUser;
+    let adminUser;
+
+    before(function () {
+        cy.getUser('admin', 'Admin', 'User', true, true)
+            .as('adminUser').then(function () {
+                adminUser = this.adminUser;
+            }
+            );
+        cy.getUser('collectionuser1', 'Collection', 'User', false, true)
+            .as('activeUser').then(function () {
+                activeUser = this.activeUser;
+            }
+            );
+    });
+
+    beforeEach(function () {
+        cy.clearCookies();
+        cy.clearLocalStorage();
+    });
+
+    it('deletes all files from root dir', 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"
+        })
+            .as('testCollection').then(function () {
+                cy.loginAs(activeUser);
+                cy.visit(`/collections/${this.testCollection.uuid}`);
+                cy.get('[data-cy=collection-files-panel]').within(() => {
+                    cy.get('[type="checkbox"]').first().check();
+                    cy.get('[type="checkbox"]').last().check();
+                });
+                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', 'baz')
+                    .and('not.contain', 'bar');
+            });
+    });
+
+    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: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\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.get('[data-cy=virtual-file-tree] > div > i').first().click();
+                cy.get('[data-cy=collection-files-panel]')
+                    .should('contain', 'foo');
+
+                cy.get('[data-cy=collection-files-panel]')
+                    .contains('foo').closest('[data-cy=virtual-file-tree]').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();
+            });
+    });
+})

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list