[arvados] updated: 2.7.0-6050-g6b28bccc0f

git repository hosting git at public.arvados.org
Fri Feb 23 02:07:44 UTC 2024


Summary of changes:
 services/workbench2/Makefile                       |   9 +-
 .../workbench2/cypress/e2e/banner-tooltip.cy.js    | 102 +++++++++------------
 services/workbench2/cypress/e2e/collection.cy.js   |   7 +-
 3 files changed, 54 insertions(+), 64 deletions(-)

       via  6b28bccc0f033b2c3a2dbcb66938e91930702042 (commit)
       via  c1317d69a70742b9c15847e4bd8580750c16fc45 (commit)
       via  7ef8a067621baba0eb38d28303812055aa41fb7f (commit)
       via  97b0134409146503e051faeb9e6eb4b808f6cb28 (commit)
      from  27921534f9447e21c87cfdf64adef6e39c764897 (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 6b28bccc0f033b2c3a2dbcb66938e91930702042
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Feb 22 23:05:57 2024 -0300

    21461: Fixes failing banner tests.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/services/workbench2/cypress/e2e/banner-tooltip.cy.js b/services/workbench2/cypress/e2e/banner-tooltip.cy.js
index 41ca0dec40..3fbaba9e38 100644
--- a/services/workbench2/cypress/e2e/banner-tooltip.cy.js
+++ b/services/workbench2/cypress/e2e/banner-tooltip.cy.js
@@ -15,64 +15,24 @@ describe('Banner / tooltip tests', 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;
             });
-            cy.on('uncaught:exception', (err, runnable) => {console.error(err)});
     });
 
     beforeEach(function () {
         cy.clearCookies();
         cy.clearLocalStorage();
-    });
-
-    it('should re-show the banner', () => {
-        setupTheEnvironment();
-
-        cy.loginAs(adminUser);
-
-        cy.wait(2000);
-
-        cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
 
-        cy.get('[title=Notifications]').click();
-        cy.get('li').contains('Restore Banner').click();
-
-        cy.wait(2000);
-
-        cy.get('[data-cy=confirmation-dialog-ok-btn]').should('be.visible');
-    });
-
-
-    it('should show tooltips and remove tooltips as localStorage key is present', () => {
-        setupTheEnvironment();
-
-        cy.loginAs(adminUser);
-
-        cy.wait(2000);
-
-        cy.get('[data-cy=side-panel-tree]').then(($el) => {
-            const el = $el.get(0) //native DOM element
-            expect(el._tippy).to.exist;
-        });
-
-        cy.wait(2000);
-
-        cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
-
-        cy.get('[title=Notifications]').click();
-        cy.get('li').contains('Disable tooltips').click();
-
-        cy.get('[data-cy=side-panel-tree]').then(($el) => {
-            const el = $el.get(0) //native DOM element
-            expect(el._tippy).to.be.undefined;
+        cy.on('uncaught:exception', (err, runnable, promise) => {
+            Cypress.log({ message: `Application Error: ${err}`});
+            if (promise) {
+                return false;
+            }
         });
-    });
 
-    const setupTheEnvironment = () => {
         cy.createCollection(adminUser.token, {
             name: `BannerTooltipTest${Math.floor(Math.random() * 999999)}`,
             owner_uuid: adminUser.user.uuid,
@@ -90,18 +50,17 @@ describe('Banner / tooltip tests', function () {
             cy.fixture('files/banner.html').as('banner');
             cy.fixture('files/tooltips.txt').as('tooltips');
 
-            cy.getAll('@banner', '@tooltips')
-                .then(([banner, tooltips]) => {
-                    cy.get('[data-cy=drag-and-drop]').upload(banner, 'banner.html', false);
-                    cy.get('[data-cy=drag-and-drop]').upload(tooltips, 'tooltips.json', false);
-                });
+            cy.getAll('@banner', '@tooltips').then(([banner, tooltips]) => {
+                cy.get('[data-cy=drag-and-drop]').upload(banner, 'banner.html', false);
+                cy.get('[data-cy=drag-and-drop]').upload(tooltips, 'tooltips.json', false);
+            });
 
             cy.get('[data-cy=form-submit-btn]').click();
             cy.get('[data-cy=form-submit-btn]').should('not.exist');
             cy.get('[data-cy=collection-files-right-panel]')
-                .contains('banner.html').should('exist');
+                .should('contain', 'banner.html');
             cy.get('[data-cy=collection-files-right-panel]')
-                .contains('tooltips.json').should('exist');
+                .should('contain', 'tooltips.json');
 
             cy.intercept({ method: 'GET', url: '**/arvados/v1/config?nocache=*' }, (req) => {
                 req.reply((res) => {
@@ -109,5 +68,36 @@ describe('Banner / tooltip tests', function () {
                 });
             });
         });
-    }
-});
+    });
+
+    it('should re-show the banner', () => {
+        cy.loginAs(adminUser);
+
+        cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
+
+        cy.get('[title=Notifications]').click();
+        cy.get('li').contains('Restore Banner').click();
+
+        cy.get('[data-cy=confirmation-dialog-ok-btn]').should('be.visible');
+    });
+
+
+    it('should show tooltips and remove tooltips as localStorage key is present', () => {
+        cy.loginAs(adminUser);
+
+        cy.get('[data-cy=side-panel-tree]').then(($el) => {
+            const el = $el.get(0) //native DOM element
+            expect(el._tippy).to.exist;
+        });
+
+        cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
+
+        cy.get('[title=Notifications]').click();
+        cy.get('li').contains('Disable tooltips').click();
+
+        cy.get('[data-cy=side-panel-tree]').then(($el) => {
+            const el = $el.get(0) //native DOM element
+            expect(el._tippy).to.be.undefined;
+        });
+    });
+});
\ No newline at end of file

commit c1317d69a70742b9c15847e4bd8580750c16fc45
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Feb 22 18:53:07 2024 -0300

    21461: Fixes excessive indentation to improve readability.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/services/workbench2/cypress/e2e/banner-tooltip.cy.js b/services/workbench2/cypress/e2e/banner-tooltip.cy.js
index 295bc380c3..41ca0dec40 100644
--- a/services/workbench2/cypress/e2e/banner-tooltip.cy.js
+++ b/services/workbench2/cypress/e2e/banner-tooltip.cy.js
@@ -73,43 +73,41 @@ describe('Banner / tooltip tests', function () {
     });
 
     const setupTheEnvironment = () => {
-            cy.createCollection(adminUser.token, {
-                name: `BannerTooltipTest${Math.floor(Math.random() * 999999)}`,
-                owner_uuid: adminUser.user.uuid,
-            }).as('bannerCollection');
+        cy.createCollection(adminUser.token, {
+            name: `BannerTooltipTest${Math.floor(Math.random() * 999999)}`,
+            owner_uuid: adminUser.user.uuid,
+        }).as('bannerCollection');
 
-            cy.getAll('@bannerCollection')
-                .then(function ([bannerCollection]) {
+        cy.getAll('@bannerCollection').then(function ([bannerCollection]) {
+            collectionUUID=bannerCollection.uuid;
 
-                    collectionUUID=bannerCollection.uuid;
+            cy.loginAs(adminUser);
 
-                    cy.loginAs(adminUser);
+            cy.goToPath(`/collections/${bannerCollection.uuid}`);
 
-                    cy.goToPath(`/collections/${bannerCollection.uuid}`);
+            cy.get('[data-cy=upload-button]').click();
 
-                    cy.get('[data-cy=upload-button]').click();
+            cy.fixture('files/banner.html').as('banner');
+            cy.fixture('files/tooltips.txt').as('tooltips');
 
-                    cy.fixture('files/banner.html').as('banner');
-                    cy.fixture('files/tooltips.txt').as('tooltips');
-
-                    cy.getAll('@banner', '@tooltips')
-                        .then(([banner, tooltips]) => {
-                            cy.get('[data-cy=drag-and-drop]').upload(banner, 'banner.html', false);
-                            cy.get('[data-cy=drag-and-drop]').upload(tooltips, 'tooltips.json', false);
-                        });
+            cy.getAll('@banner', '@tooltips')
+                .then(([banner, tooltips]) => {
+                    cy.get('[data-cy=drag-and-drop]').upload(banner, 'banner.html', false);
+                    cy.get('[data-cy=drag-and-drop]').upload(tooltips, 'tooltips.json', false);
+                });
 
-                    cy.get('[data-cy=form-submit-btn]').click();
-                    cy.get('[data-cy=form-submit-btn]').should('not.exist');
-                    cy.get('[data-cy=collection-files-right-panel]')
-                        .contains('banner.html').should('exist');
-                    cy.get('[data-cy=collection-files-right-panel]')
-                        .contains('tooltips.json').should('exist');
+            cy.get('[data-cy=form-submit-btn]').click();
+            cy.get('[data-cy=form-submit-btn]').should('not.exist');
+            cy.get('[data-cy=collection-files-right-panel]')
+                .contains('banner.html').should('exist');
+            cy.get('[data-cy=collection-files-right-panel]')
+                .contains('tooltips.json').should('exist');
 
-                        cy.intercept({ method: 'GET', url: '**/arvados/v1/config?nocache=*' }, (req) => {
-                            req.reply((res) => {
-                                res.body.Workbench.BannerUUID = collectionUUID;
-                            });
-                        });
+            cy.intercept({ method: 'GET', url: '**/arvados/v1/config?nocache=*' }, (req) => {
+                req.reply((res) => {
+                    res.body.Workbench.BannerUUID = collectionUUID;
                 });
+            });
+        });
     }
 });

commit 7ef8a067621baba0eb38d28303812055aa41fb7f
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Feb 22 18:45:11 2024 -0300

    21461: Fixes collection's upload test.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/services/workbench2/cypress/e2e/collection.cy.js b/services/workbench2/cypress/e2e/collection.cy.js
index 32349ab884..f4ffaebf5e 100644
--- a/services/workbench2/cypress/e2e/collection.cy.js
+++ b/services/workbench2/cypress/e2e/collection.cy.js
@@ -165,8 +165,6 @@ describe("Collection panel tests", function () {
         cy.get("[data-cy=form-dialog]").should("exist").and("contain", "Collection with the same name already exists");
     });
 
-    
-
     it("uses the property editor (from edit dialog) with vocabulary terms", function () {
         cy.createCollection(adminUser.token, {
             name: `Test collection ${Math.floor(Math.random() * 999999)}`,
@@ -210,8 +208,6 @@ describe("Collection panel tests", function () {
             });
     });
 
-    
-
     it("uses the editor (from details panel) with vocabulary terms", function () {
         cy.createCollection(adminUser.token, {
             name: `Test collection ${Math.floor(Math.random() * 999999)}`,
@@ -1320,8 +1316,7 @@ describe("Collection panel tests", function () {
 
                     cy.get("[data-cy=form-submit-btn]").click();
 
-                    cy.get("button[aria-label=Remove]").should("exist");
-                    cy.get("button[aria-label=Remove]").click({ multiple: true, force: true });
+                    cy.get("button[aria-label=Remove]").should("exist").click({ multiple: true});
 
                     cy.get("[data-cy=form-submit-btn]").should("not.exist");
 

commit 97b0134409146503e051faeb9e6eb4b808f6cb28
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Feb 22 16:50:30 2024 -0300

    21461: Allows running individual spec files through `make`.
    
    Example:
    
    $ make integration-tests-in-docker SPECFILE=cypress/e2e/collection.cy.js
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/services/workbench2/Makefile b/services/workbench2/Makefile
index 0b0175a77d..1a68d6fd77 100644
--- a/services/workbench2/Makefile
+++ b/services/workbench2/Makefile
@@ -9,6 +9,9 @@ SHELL := /bin/bash
 GOPATH?=~/go
 APP_NAME?=arvados-workbench2
 
+# Cypress test file that can be passed to the integration-test target
+SPECFILE?=ALL
+
 # VERSION uses all the above to produce X.Y.Z.timestamp
 # something in the lines of 1.2.0.20180612145021, this will be the package version
 # it can be overwritten when invoking make as in make packages VERSION=1.2.0
@@ -82,7 +85,11 @@ unit-tests: yarn-install
 
 integration-tests: yarn-install check-arvados-directory
 	yarn run cypress install
+ifeq ($(SPECFILE), ALL)
 	$(WORKSPACE)/tools/run-integration-tests.sh -a $(ARVADOS_DIRECTORY)
+else
+	$(WORKSPACE)/tools/run-integration-tests.sh -a $(ARVADOS_DIRECTORY) -- --spec $(SPECFILE)
+endif
 
 integration-tests-in-docker: workbench2-build-image check-arvados-directory
 	docker run -ti --rm \
@@ -92,7 +99,7 @@ integration-tests-in-docker: workbench2-build-image check-arvados-directory
 		-v $(ARVADOS_DIRECTORY):/usr/src/arvados \
 		-w /usr/src/arvados/services/workbench2 \
 		workbench2-build \
-		make arvados-server-install integration-tests
+		make arvados-server-install integration-tests SPECFILE=$(SPECFILE)
 
 unit-tests-in-docker: workbench2-build-image check-arvados-directory
 	docker run -ti --rm \

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list