[arvados] updated: 2.7.0-6517-gd8f96fba6c
git repository hosting
git at public.arvados.org
Tue Apr 23 17:39:11 UTC 2024
Summary of changes:
services/workbench2/cypress/e2e/details-card.cy.js | 56 ++++++++++------------
.../project-details-card/project-details-card.tsx | 5 +-
2 files changed, 29 insertions(+), 32 deletions(-)
via d8f96fba6c5f1ee0533817ac1c489a09e09cf490 (commit)
from 3e42f3e2f6d75535240e085c3fbba5ef0dd2d30a (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 d8f96fba6c5f1ee0533817ac1c489a09e09cf490
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Apr 23 13:39:07 2024 -0400
21224: fixed description collapse test Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/services/workbench2/cypress/e2e/details-card.cy.js b/services/workbench2/cypress/e2e/details-card.cy.js
index 778fe6baea..f37e68a693 100644
--- a/services/workbench2/cypress/e2e/details-card.cy.js
+++ b/services/workbench2/cypress/e2e/details-card.cy.js
@@ -39,23 +39,18 @@ describe('User Details Card tests', function () {
});
it('shows the appropriate buttons in the multiselect toolbar', () => {
-
- const msButtonTooltips = [
- 'API Details',
- 'Attributes',
- 'User account',
- ];
+ const msButtonTooltips = ['API Details', 'Attributes', 'User account'];
cy.loginAs(activeUser);
- cy.get('[data-cy=multiselect-button]').should('have.length', msButtonTooltips.length)
+ cy.get('[data-cy=multiselect-button]').should('have.length', msButtonTooltips.length);
for (let i = 0; i < msButtonTooltips.length; i++) {
cy.get('[data-cy=multiselect-button]').eq(i).trigger('mouseover');
- cy.get('body').contains(msButtonTooltips[i]).should('exist')
+ cy.get('body').contains(msButtonTooltips[i]).should('exist');
cy.get('[data-cy=multiselect-button]').eq(i).trigger('mouseout');
}
- })
+ });
});
describe('Project Details Card tests', function () {
@@ -109,12 +104,7 @@ describe('Project Details Card tests', function () {
});
it('shows the appropriate buttons in the multiselect toolbar', () => {
-
- const msButtonTooltips = [
- 'View details',
- 'Open in new tab',
- 'Copy link to clipboard',
- ];
+ const msButtonTooltips = ['View details', 'Open in new tab', 'Copy link to clipboard'];
const msOverflowMenuButtonTooltips = [
'Open with 3rd party client',
@@ -146,26 +136,31 @@ describe('Project Details Card tests', function () {
for (let i = 0; i < msButtonTooltips.length; i++) {
cy.get('[data-cy=multiselect-button]').eq(i).trigger('mouseover');
- cy.get('body').contains(msButtonTooltips[i]).should('exist')
+ cy.get('body').contains(msButtonTooltips[i]).should('exist');
cy.get('[data-cy=multiselect-button]').eq(i).trigger('mouseout');
}
cy.get('[data-cy=overflow-menu-button]').click();
- cy.get('[data-cy=overflow-menu]').should('be.visible').within(() => {
- cy.get('[data-cy=multiselect-button]').should('exist');
-
-
- for (let i = 0; i < msOverflowMenuButtonTooltips.length; i++) {
- cy.get('li').eq(i).within(() => {
- cy.get(`span`).should('have.prop', 'title', msOverflowMenuButtonTooltips[i]);
- });
- }
- })
+ cy.get('[data-cy=overflow-menu]')
+ .should('be.visible')
+ .within(() => {
+ cy.get('[data-cy=multiselect-button]').should('exist');
+
+ for (let i = 0; i < msOverflowMenuButtonTooltips.length; i++) {
+ cy.get('li')
+ .eq(i)
+ .within(() => {
+ cy.get(`span`).should('have.prop', 'title', msOverflowMenuButtonTooltips[i]);
+ });
+ }
+ });
});
it('should toggle description display', () => {
const projName = `Test project (${Math.floor(999999 * Math.random())})`;
- const projDescription = 'Lorem ipsum dolor sit amet, consectetur adipiscing vultures, whose wings are dull realities.';
+ //must be long enough to require a 2nd line
+ const projDescription =
+ 'Science! true daughter of Old Time thou art! Who alterest all things with thy peering eyes. Why preyest thou thus upon the poet’s heart, Vulture, whose wings are dull realities? '
cy.loginAs(adminUser);
// Create project
@@ -195,13 +190,14 @@ describe('Project Details Card tests', function () {
cy.get('[data-cy=project-details-card]').contains(projName).should('be.visible');
//toggle description
- cy.get('[data-cy=toggle-description').click();
+ cy.get('[data-cy=project-details-card]').invoke('height').should('be.lt', 90);
+ cy.get('[data-cy=toggle-description]').click();
cy.waitForDom();
- cy.get('[data-cy=project-description]').should('be.visible');
+ cy.get('[data-cy=project-details-card]').invoke('height').should('be.gt', 91);
cy.get('[data-cy=project-details-card]').contains(projDescription).should('be.visible');
cy.get('[data-cy=toggle-description').click();
cy.waitForDom();
- cy.get('[data-cy=project-description]').should('be.hidden');
+ cy.get('[data-cy=project-details-card]').invoke('height').should('be.lt', 90);
});
it('should display key/value pairs', () => {
diff --git a/services/workbench2/src/views-components/project-details-card/project-details-card.tsx b/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
index 7863511f3b..e620cca446 100644
--- a/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
+++ b/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
@@ -314,7 +314,7 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ classes, currentResource, fro
</Tooltip>
)}
</section>
- {!description && <Typography className={classes.noDescription}>no description available</Typography>}
+ {!description && <Typography data-cy="no-description" className={classes.noDescription}>no description available</Typography>}
</section>
}
/>
@@ -325,6 +325,7 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ classes, currentResource, fro
<section
onClick={toggleDescription}
className={classes.descriptionToggle}
+ data-cy="toggle-description"
>
<ExpandChevronRight expanded={showDescription} />
<section className={classes.showMore}>
@@ -352,7 +353,7 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ classes, currentResource, fro
className={classes.descriptionToggle}
>
<div className={classes.chipToggle}>
- <ExpandChevronRight expanded={showProperties} />
+ <ExpandChevronRight data-cy="toggle-chips" expanded={showProperties} />
</div>
<section className={classes.showMore}>
<Collapse
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list