-
Notifications
You must be signed in to change notification settings - Fork 356
/
Copy pathdatalist.spec.ts
38 lines (32 loc) · 1.25 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
38
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-clickable').should('exist');
cy.get('#row2.pf-m-clickable').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');
});
});
// Skip this test until a new drag and drop is implemented
describe.skip('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');
});
});