Skip to content

Commit 9bbe6a8

Browse files
committed
added test for spacebar
1 parent ea4b10b commit 9bbe6a8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ describe('Description List Demo Test', () => {
33
cy.visit('http://localhost:3000/description-list-demo-nav-link');
44
});
55

6-
it('Verify list with help text', () => {
6+
it('Verify list with help text triggered with mouse', () => {
77
cy.get('#description-list-help-text').should('exist').children('.pf-v6-c-description-list__group');
88
cy.get('.pf-v6-c-popover__content').should('not.exist');
99
cy.get(
@@ -14,12 +14,21 @@ describe('Description List Demo Test', () => {
1414
cy.get('.pf-v6-c-popover__content').should('not.exist');
1515
});
1616

17-
it('Verify list with help text using keyboard', () => {
17+
it('Verify list with help text triggered with enter key', () => {
1818
cy.get('#description-list-help-text').should('exist').children('.pf-v6-c-description-list__group');
1919
cy.get('.pf-v6-c-popover__content').should('not.exist');
2020
cy.tab().type('{enter}');
2121
cy.get('.pf-v6-c-popover__content').should('exist');
2222
cy.get('.pf-v6-c-popover__close').type('{enter}');
2323
cy.get('.pf-v6-c-popover__content').should('not.exist');
2424
});
25+
26+
it('Verify list with help text triggered with spacebar', () => {
27+
cy.get('#description-list-help-text').should('exist').children('.pf-v6-c-description-list__group');
28+
cy.get('.pf-v6-c-popover__content').should('not.exist');
29+
cy.tab().tab().type(' ');
30+
cy.get('.pf-v6-c-popover__content').should('exist');
31+
cy.get('.pf-v6-c-popover__close').type(' ');
32+
cy.get('.pf-v6-c-popover__content').should('not.exist');
33+
});
2534
});

0 commit comments

Comments
 (0)