Skip to content

Commit fb1b61d

Browse files
author
Eric Olkowski
committed
Testing cypress update for test failure
1 parent 627a9bc commit fb1b61d

File tree

1 file changed

+37
-24
lines changed

1 file changed

+37
-24
lines changed

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

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,46 @@ describe('Tab Demo Test', () => {
33
cy.visit('http://localhost:3000/tabs-horizontal-overflow-demo-nav-link');
44
});
55

6-
it('Allows users to select a tab from the overflow menu', () => {
7-
// verify that the expected tabs are showing/not showing as expected based on screen size
8-
['Tab item 1', 'Tab item 2', 'Tab item 3', 'Tab item 4', 'Tab item 5', 'Tab item 6', 'Tab item 7', 'More'].forEach(
9-
(tab) => cy.contains('.pf-v6-c-tabs__link', tab).should('exist')
10-
);
11-
['Tab item 8', 'Tab item 9', 'Tab item 10', 'Tab item 11'].forEach((tab) => cy.contains(tab).should('not.exist'));
6+
it(
7+
'Allows users to select a tab from the overflow menu',
8+
{
9+
defaultCommandTimeout: 10000
10+
},
11+
() => {
12+
// verify that the expected tabs are showing/not showing as expected based on screen size
13+
[
14+
'Tab item 1',
15+
'Tab item 2',
16+
'Tab item 3',
17+
'Tab item 4',
18+
'Tab item 5',
19+
'Tab item 6',
20+
'Tab item 7',
21+
'More'
22+
].forEach((tab) => cy.contains('.pf-v6-c-tabs__link', tab).should('exist'));
23+
['Tab item 8', 'Tab item 9', 'Tab item 10', 'Tab item 11'].forEach((tab) => cy.contains(tab).should('not.exist'));
1224

13-
// open the overflow menu and verify that the overflowing tabs are now visible within it
14-
cy.contains('.pf-v6-c-tabs__link', 'More').click();
15-
['Tab item 8', 'Tab item 9', 'Tab item 10', 'Tab item 11'].forEach((menuItem) =>
16-
cy.contains(menuItem).should('exist')
17-
);
25+
// open the overflow menu and verify that the overflowing tabs are now visible within it
26+
cy.contains('.pf-v6-c-tabs__link', 'More').click();
27+
['Tab item 8', 'Tab item 9', 'Tab item 10', 'Tab item 11'].forEach((menuItem) =>
28+
cy.contains(menuItem).should('exist')
29+
);
1830

19-
// select a tab and verify that it replaces the default overflow tab text, closes the overflow menu, and shows its content
20-
cy.contains('Tab item 9').click();
21-
cy.contains('.pf-v6-c-tabs__link', 'More').should('not.exist');
22-
cy.contains('.pf-v6-c-tabs__link', 'Tab item 9').should('exist');
23-
['Tab item 8', 'Tab item 10', 'Tab item 11'].forEach((menuItem) => cy.contains(menuItem).should('not.exist'));
24-
cy.contains('Tab 9 section').should('not.be.hidden');
31+
// select a tab and verify that it replaces the default overflow tab text, closes the overflow menu, and shows its content
32+
cy.contains('Tab item 9').click();
33+
cy.contains('.pf-v6-c-tabs__link', 'More').should('not.exist');
34+
cy.contains('.pf-v6-c-tabs__link', 'Tab item 9').should('exist');
35+
['Tab item 8', 'Tab item 10', 'Tab item 11'].forEach((menuItem) => cy.contains(menuItem).should('not.exist'));
36+
cy.contains('Tab 9 section').should('not.be.hidden');
2537

26-
// select a non-overflow tab and verify that overflow tab text returns to the default and the now selected tab content shows
27-
cy.contains('Tab item 1').click();
28-
cy.contains('Tab item 9').should('not.exist');
29-
cy.contains('.pf-v6-c-tabs__link', 'More').should('exist');
30-
cy.contains('Tab 9 section').should('be.hidden');
31-
cy.contains('Tab 1 section').should('not.be.hidden');
32-
});
38+
// select a non-overflow tab and verify that overflow tab text returns to the default and the now selected tab content shows
39+
cy.contains('Tab item 1').click();
40+
cy.contains('Tab item 9').should('not.exist');
41+
cy.contains('.pf-v6-c-tabs__link', 'More').should('exist');
42+
cy.contains('Tab 9 section').should('be.hidden');
43+
cy.contains('Tab 1 section').should('not.be.hidden');
44+
}
45+
);
3346

3447
// Re-enable once https://github.com/patternfly/patternfly/issues/7449 is resolved
3548
xit('Adjusts tabs showing on resize', () => {

0 commit comments

Comments
 (0)