-
Notifications
You must be signed in to change notification settings - Fork 355
/
datalist.spec.ts
37 lines (31 loc) · 1.19 KB
/
datalist.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
35
36
37
describe('Data List Demo Test', () => {
it('Navigate to demo section', () => {
cy.visit('http://localhost:3000/data-list-demo-nav-link');
});
it('Verify rows selectable', () => {
cy.get('#row1.pf-m-selectable').should('exist');
cy.get('#row2.pf-m-selectable').should('exist');
cy.get('#row1.pf-m-selected').should('not.exist');
cy.get('#row2.pf-m-selected').should('not.exist');
cy.get('#row1').click();
cy.get('#row1.pf-m-selected').should('exist');
cy.get('#row2.pf-m-selected').should('not.exist');
cy.get('#row2').click();
cy.get('#row1.pf-m-selected').should('not.exist');
cy.get('#row2.pf-m-selected').should('exist');
});
});
describe('Data List Draggable Demo Test', () => {
it('Navigate to demo section', () => {
cy.visit('http://localhost:3000/data-list-draggable-demo-nav-link');
});
it('Verify drag', () => {
cy.get('#data1').contains('Item 1');
cy.get('#drag1').type(' ');
cy.get('#drag1').type('{downarrow}');
cy.get('#data1').should('have.class', 'pf-m-ghost-row');
cy.get('#drag1').type('{downarrow}');
cy.get('#drag1').type('{enter}');
cy.get('#data1').should('not.have.class', 'pf-m-ghost-row');
});
});