forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtruncate.spec.ts
More file actions
23 lines (19 loc) · 791 Bytes
/
truncate.spec.ts
File metadata and controls
23 lines (19 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
describe('Truncate Demo Test', () => {
it('Navigate to demo section', () => {
cy.visit('http://localhost:3000/truncate-demo-nav-link');
});
it('Verify no tooltip renders by default', () => {
cy.get('.pf-v6-c-tooltip').should('not.exist');
});
it('Verify non-truncated content in wide container does not have tabindex', () => {
cy.get('#no-truncate').should('not.have.attr', 'tabindex');
});
it('Verify truncated content in small container does have tabindex', () => {
cy.get('#basic-truncate').should('have.attr', 'tabindex');
});
it('Verify tooltip renders when truncate is focused', () => {
cy.get('#basic-truncate').should('have.attr', 'tabindex');
cy.get('#basic-truncate').focus();
cy.get('.pf-v6-c-tooltip').should('exist');
});
});