forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
labelgroupwithcategory.spec.ts
29 lines (27 loc) · 1.02 KB
/
labelgroupwithcategory.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
describe('Label Group with Category Demo Test', () => {
it('Navigate to demo section', () => {
cy.visit('http://localhost:3000/');
cy.get('#labelgroup-with-category-demo-nav-item-link').click();
cy.url().should('eq', 'http://localhost:3000/labelgroup-with-category-demo-nav-link');
});
it('Verify delete button on first label group', () => {
const labelGroup = cy.get('.pf-c-label-group').first();
const labelGroupButton = labelGroup.get('#remove_group_pf-random-id-0');
labelGroupButton.should('be.visible');
labelGroupButton.click();
labelGroup.should('not.exist');
});
it('Displays Tooltip', () => {
cy.get('.pf-c-label-group__label')
.last()
.then((tooltipLink: JQuery<HTMLHeadingElement>) => {
cy.get('.pf-c-tooltip').should('not.exist');
cy.wrap(tooltipLink)
.trigger('mouseenter')
.get('.pf-c-tooltip')
.should('exist')
.get('.pf-c-tooltip')
.contains('Category 3 has a very long name');
});
});
});