From 38e806a76c0a5babb539777dee97155d69753754 Mon Sep 17 00:00:00 2001 From: Lisa Knox Date: Fri, 23 Feb 2024 10:17:17 -0500 Subject: [PATCH] 21386: not found test passes Arvados-DCO-1.1-Signed-off-by: Lisa Knox --- .../cypress/integration/page-not-found.spec.js | 13 +++++++++++-- .../data-table-default-view.tsx | 2 +- .../src/components/data-table/data-table.tsx | 2 +- .../src/components/default-view/default-view.tsx | 1 + 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/services/workbench2/cypress/integration/page-not-found.spec.js b/services/workbench2/cypress/integration/page-not-found.spec.js index 6eab27c827..9c47a86ae7 100644 --- a/services/workbench2/cypress/integration/page-not-found.spec.js +++ b/services/workbench2/cypress/integration/page-not-found.spec.js @@ -34,8 +34,6 @@ describe('Page not found tests', function() { [ '/projects/zzzzz-j7d0g-nonexistingproj', '/projects/zzzzz-tpzed-nonexistinguser', - '/processes/zzzzz-xvhdp-nonexistingproc', - '/collections/zzzzz-4zz18-nonexistingcoll' ].forEach(function(path) { // Using de slower loginAs() method to avoid bumping into dialog // dismissal issues that are not related to this test. @@ -45,6 +43,17 @@ describe('Page not found tests', function() { cy.goToPath(path); // then + cy.get('[data-cy=default-view]').should('exist'); + }); + + [ + '/processes/zzzzz-xvhdp-nonexistingproc', + '/collections/zzzzz-4zz18-nonexistingcoll' + ].forEach(function(path) { + cy.loginAs(adminUser); + + cy.goToPath(path); + cy.get('[data-cy=not-found-view]').should('exist'); }); }); diff --git a/services/workbench2/src/components/data-table-default-view/data-table-default-view.tsx b/services/workbench2/src/components/data-table-default-view/data-table-default-view.tsx index caf0bef752..b245c19ba9 100644 --- a/services/workbench2/src/components/data-table-default-view/data-table-default-view.tsx +++ b/services/workbench2/src/components/data-table-default-view/data-table-default-view.tsx @@ -24,5 +24,5 @@ export const DataTableDefaultView = withStyles(styles)( const icon = props.icon || DetailsIcon; const filterWarning: string[] = props.filtersApplied ? ['Filters are applied to the data.'] : []; const messages = filterWarning.concat(props.messages || ['No items found']); - return ; + return ; }); diff --git a/services/workbench2/src/components/data-table/data-table.tsx b/services/workbench2/src/components/data-table/data-table.tsx index f58bbce1e3..5029e39cfd 100644 --- a/services/workbench2/src/components/data-table/data-table.tsx +++ b/services/workbench2/src/components/data-table/data-table.tsx @@ -333,7 +333,7 @@ export const DataTable = withStyles(styles)( /> ); } else { - //if (isLoaded && !working && !isNotFound) + // isLoaded && !working && !isNotFound return ( } {messages.map((msg: string, index: number) => { return {msg}; })} -- 2.30.2