-
Notifications
You must be signed in to change notification settings - Fork 362
/
Copy pathbreadcrumb.spec.ts
33 lines (27 loc) · 1.22 KB
/
breadcrumb.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
describe('Breadcrumb Demo Test', () => {
it('Navigate to demo section', () => {
cy.visit('http://localhost:3000/breadcrumb-demo-nav-link');
});
it('Verify breadcrumb items have link', () => {
cy.get('li').children('a').should('not.be.undefined');
cy.get('li').children('a').should('not.equal', null);
});
it('Verify dropdown breadcrumb item', () => {
cy.get('#badge-dropdown button').should('have.class', 'pf-v6-c-menu-toggle');
});
it('Verify default section home content', () => {
cy.get('.pf-v6-c-breadcrumb__link').first().contains('Section Home');
});
it('Verify default section label defaults', () => {
cy.get('.pf-v6-c-breadcrumb__link').contains('Section Title');
});
it('Verify render props in Fake Section Title ', () => {
cy.get('span.pf-v6-c-breadcrumb__link').contains('Fake Section Title');
cy.get('span.pf-v6-c-breadcrumb__link').should('not.have.attr', 'aria-current');
cy.get('span.pf-v6-c-breadcrumb__link').should('have.attr', 'data-href', '/hello');
});
it('Verify Section Home takes user to home page', () => {
cy.get('.pf-v6-c-breadcrumb__link').first().contains('Section Home').click();
cy.url().should('eq', 'http://localhost:3000/');
});
});