-
Notifications
You must be signed in to change notification settings - Fork 362
/
Copy pathdescriptionlist.spec.ts
34 lines (31 loc) · 1.56 KB
/
descriptionlist.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
describe('Description List Demo Test', () => {
it('Navigate to demo section', () => {
cy.visit('http://localhost:3000/description-list-demo-nav-link');
});
it('Verify list with help text triggered with mouse', () => {
cy.get('#description-list-help-text').should('exist').children('.pf-v6-c-description-list__group');
cy.get('.pf-v6-c-popover__content').should('not.exist');
cy.get(
'#description-list-help-text > :nth-child(1) > .pf-v6-c-description-list__term .pf-v6-c-description-list__text'
).click();
cy.get('.pf-v6-c-popover__content').should('exist');
cy.get('.pf-v6-c-popover__close').click();
cy.get('.pf-v6-c-popover__content').should('not.exist');
});
it('Verify list with help text triggered with enter key', () => {
cy.get('#description-list-help-text').should('exist').children('.pf-v6-c-description-list__group');
cy.get('.pf-v6-c-popover__content').should('not.exist');
cy.tab().type('{enter}');
cy.get('.pf-v6-c-popover__content').should('exist');
cy.get('.pf-v6-c-popover__close').type('{enter}');
cy.get('.pf-v6-c-popover__content').should('not.exist');
});
it('Verify list with help text triggered with spacebar', () => {
cy.get('#description-list-help-text').should('exist').children('.pf-v6-c-description-list__group');
cy.get('.pf-v6-c-popover__content').should('not.exist');
cy.tab().tab().type(' ');
cy.get('.pf-v6-c-popover__content').should('exist');
cy.get('.pf-v6-c-popover__close').type(' ');
cy.get('.pf-v6-c-popover__content').should('not.exist');
});
});