projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c331f88
)
21386: not found test passes Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox...
author
Lisa Knox <lisaknox83@gmail.com>
Fri, 23 Feb 2024 15:17:17 +0000
(10:17 -0500)
committer
Lisa Knox <lisaknox83@gmail.com>
Fri, 23 Feb 2024 15:17:17 +0000
(10:17 -0500)
services/workbench2/cypress/integration/page-not-found.spec.js
patch
|
blob
|
history
services/workbench2/src/components/data-table-default-view/data-table-default-view.tsx
patch
|
blob
|
history
services/workbench2/src/components/data-table/data-table.tsx
patch
|
blob
|
history
services/workbench2/src/components/default-view/default-view.tsx
patch
|
blob
|
history
diff --git
a/services/workbench2/cypress/integration/page-not-found.spec.js
b/services/workbench2/cypress/integration/page-not-found.spec.js
index 6eab27c827dc3b1d0ffbc6b4cd22ce0f79e9b6fb..9c47a86ae73dd517487f03b404414469c779afc5 100644
(file)
--- 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',
[
'/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.
].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.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');
});
});
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 caf0bef75252f04c9291f9f45dead39c3daa03cf..b245c19ba96d27290eacb1f5d11065d97b9522d4 100644
(file)
--- 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']);
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 <DefaultView
data-cy="data-table-default-view"
{...classes} {...{ icon, messages }} />;
+ return <DefaultView {...classes} {...{ icon, messages }} />;
});
});
diff --git
a/services/workbench2/src/components/data-table/data-table.tsx
b/services/workbench2/src/components/data-table/data-table.tsx
index f58bbce1e31957ec1daa6fc95d62790670ac0fcb..5029e39cfd0448380e647be3e71eb5ab21f048af 100644
(file)
--- 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 {
/>
);
} else {
- //
if (isLoaded && !working && !isNotFound)
+ //
isLoaded && !working && !isNotFound
return (
<DataTableDefaultView
icon={this.props.defaultViewIcon}
return (
<DataTableDefaultView
icon={this.props.defaultViewIcon}
diff --git
a/services/workbench2/src/components/default-view/default-view.tsx
b/services/workbench2/src/components/default-view/default-view.tsx
index 5acea6193be906ddb9ec3c865f1d9e80ea068b2f..588dcfa5cce9c7f589a97772ac5c9425d08c4656 100644
(file)
--- a/
services/workbench2/src/components/default-view/default-view.tsx
+++ b/
services/workbench2/src/components/default-view/default-view.tsx
@@
-41,6
+41,7
@@
export const DefaultView = withStyles(styles)(
{Icon && <Icon className={classnames([classes.icon, classIcon])} />}
{messages.map((msg: string, index: number) => {
return <Typography key={index}
{Icon && <Icon className={classnames([classes.icon, classIcon])} />}
{messages.map((msg: string, index: number) => {
return <Typography key={index}
+ data-cy='default-view'
className={classnames([classes.message, classMessage])}>{msg}</Typography>;
})}
</Typography>
className={classnames([classes.message, classMessage])}>{msg}</Typography>;
})}
</Typography>