21600: used the force Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox@curii.com>
authorLisa Knox <lisaknox83@gmail.com>
Mon, 18 Mar 2024 14:20:55 +0000 (10:20 -0400)
committerLisa Knox <lisaknox83@gmail.com>
Mon, 18 Mar 2024 14:20:55 +0000 (10:20 -0400)
services/workbench2/cypress/e2e/banner-tooltip.cy.js
services/workbench2/src/views-components/main-app-bar/notifications-menu.tsx

index 64ba5e8be064780518ddaaf2c4d37532fb67bd22..b8943912827587cd6184c18071f498add6e0dbe4 100644 (file)
@@ -72,8 +72,8 @@ describe('Banner / tooltip tests', function () {
 
         cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
 
-        cy.get('[title=Notifications]').click();
-        cy.get('[data-cy=restore-banner-li]').click();
+        cy.get('[title=Notifications]').click({ force: true });
+        cy.get('[data-cy=restore-banner-li]').click({ force: true });
 
         cy.get('[data-cy=confirmation-dialog-ok-btn]').should('be.visible');
     });
@@ -90,7 +90,7 @@ describe('Banner / tooltip tests', function () {
         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=disable-tooltip-toggle]').click({ force: true });
 
         cy.get('[data-cy=side-panel-tree]').then(($el) => {
             const el = $el.get(0) //native DOM element
index ce1bc5b1cf932fccf1aa2da1fd30d38da709bc87..631d3162ebedd2a412c8dd1feb2842699b5f239e 100644 (file)
@@ -57,13 +57,13 @@ export const NotificationsMenuComponent = (props: NotificationsMenuComponentProp
 
     if (tooltipResult) {
         menuItems.push(
-            <MenuItem onClick={toggleTooltips}>
+            <MenuItem onClick={toggleTooltips} data-cy="enable-tooltip-toggle">
                 <span>Enable tooltips</span>
             </MenuItem>
         );
     } else {
         menuItems.push(
-            <MenuItem onClick={toggleTooltips}>
+            <MenuItem onClick={toggleTooltips} data-cy="disable-tooltip-toggle">
                 <span>Disable tooltips</span>
             </MenuItem>
         );