salix-front/test/cypress/integration/zone/zoneSummary.spec.js

23 lines
858 B
JavaScript

describe('ZoneSummary', () => {
const agency = 'inhouse pickup';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('/#/zone/2/summary');
});
it('should clone the zone, then delete it', () => {
cy.dataCy('descriptor-more-opts').click();
cy.dataCy('Clone_button').click();
cy.dataCy('VnConfirm_confirm').click();
cy.url().should('not.include', 'zone/2/');
cy.url().should('match', /zone\/\d+\/basic-data/);
cy.get('.list-box > :nth-child(1)').should('include.text', agency);
cy.get('.title > span').should('include.text', 'Zone pickup B');
cy.get('.q-page').should('exist');
cy.dataCy('descriptor-more-opts').click();
cy.dataCy('Delete_button').click();
cy.dataCy('VnConfirm_confirm').click();
});
});