26 lines
927 B
JavaScript
26 lines
927 B
JavaScript
describe('WorkerList', () => {
|
|
const workerFieldNames =
|
|
'.card-list-body > .list-items > :nth-child(1) > .value > span';
|
|
beforeEach(() => {
|
|
cy.viewport(1280, 720);
|
|
cy.login('developer');
|
|
cy.visit('/#/worker/list');
|
|
});
|
|
|
|
it('should load workers', () => {
|
|
cy.get(workerFieldNames).eq(2).should('have.text', 'jessicajones');
|
|
cy.get(workerFieldNames).eq(3).should('have.text', 'brucebanner');
|
|
cy.get(workerFieldNames).eq(4).should('have.text', 'charlesxavier');
|
|
});
|
|
|
|
it('should open the worker summary', () => {
|
|
cy.openListSummary(2);
|
|
cy.get('.summaryHeader div').should('have.text', '1110 - Jessica Jones');
|
|
cy.get('.summary .header-link')
|
|
.eq(0)
|
|
.invoke('text')
|
|
.should('include', 'Basic data');
|
|
cy.get('.summary .header-link').eq(2).should('have.text', 'User data ');
|
|
});
|
|
});
|