Skip to content

Commit 8d8daf5

Browse files
committed
test(integration): update popper visibility checks to wait for opacity transition
Update Cypress integration tests to check for opacity: '1' instead of .should('be.visible') to properly handle the requestAnimationFrame delay in the Popper component. Signed-off-by: Mohamed Fall <ps.hackmaster@gmail.com>
1 parent 161cb88 commit 8d8daf5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/react-integration/cypress/integration/button.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('Button Demo Test', () => {
99
.focus()
1010
.should('have.attr', 'aria-describedby', 'button-with-tooltip-1');
1111
});
12-
cy.get('.pf-v6-c-tooltip').should('be.visible');
12+
cy.get('.pf-v6-c-tooltip').should('have.css', 'opacity', '1');
1313
});
1414

1515
it('Verify isAriaDisabled button has tooltip when hovered', () => {
@@ -18,7 +18,7 @@ describe('Button Demo Test', () => {
1818
.trigger('mouseover')
1919
.should('have.attr', 'aria-describedby', 'button-with-tooltip-1');
2020
});
21-
cy.get('.pf-v6-c-tooltip').should('be.visible');
21+
cy.get('.pf-v6-c-tooltip').should('have.css', 'opacity', '1');
2222
});
2323

2424
it('Verify isAriaDisabled button prevents default actions', () => {

packages/react-integration/cypress/integration/overflowmenu.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('OverflowMenu Demo Test', () => {
3232
it('Verify dropdown menu expanded', () => {
3333
cy.get('#simple-overflow-menu button').last().click({ force: true });
3434
cy.get('#simple-overflow-menu .pf-v6-c-menu-toggle').should('have.class', 'pf-m-expanded');
35-
cy.get('.simple-overflow-menu.pf-v6-c-menu').should('be.visible');
35+
cy.get('.simple-overflow-menu.pf-v6-c-menu').should('have.css', 'opacity', '1');
3636
// close overflow menu again
3737
cy.get('#simple-overflow-menu button').last().click({ force: true });
3838
});
@@ -107,7 +107,7 @@ describe('OverflowMenu Demo Test', () => {
107107
it('Verify dropdown menu expanded', () => {
108108
cy.get('#persist-overflow-menu button').last().click({ force: true });
109109
cy.get('#persist-overflow-menu .pf-v6-c-menu-toggle').should('have.class', 'pf-m-expanded');
110-
cy.get('.persist-overflow-menu.pf-v6-c-menu').should('be.visible');
110+
cy.get('.persist-overflow-menu.pf-v6-c-menu').should('have.css', 'opacity', '1');
111111
});
112112
});
113113
});
@@ -142,7 +142,7 @@ describe('OverflowMenu Demo Test', () => {
142142
it('Verify dropdown menu expanded', () => {
143143
cy.get('#container-breakpoint-overflow-menu button').last().click({ force: true });
144144
cy.get('#container-breakpoint-overflow-menu .pf-v6-c-menu-toggle').should('have.class', 'pf-m-expanded');
145-
cy.get('.container-breakpoint-overflow-menu.pf-v6-c-menu').should('be.visible');
145+
cy.get('.container-breakpoint-overflow-menu.pf-v6-c-menu').should('have.css', 'opacity', '1');
146146
// close overflow menu again
147147
cy.get('#container-breakpoint-overflow-menu button').last().click({ force: true });
148148
});

packages/react-integration/cypress/integration/tabsdisable.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ describe('Disabled Tab Demo Test', () => {
4040

4141
it('Verify aria-disabled with tooltip', () => {
4242
cy.get(withTooltip.button).trigger('mouseover');
43-
cy.get('.pf-v6-c-tooltip').should('be.visible');
43+
cy.get('.pf-v6-c-tooltip').should('have.css', 'opacity', '1');
4444
});
4545
});

0 commit comments

Comments
 (0)