2024-09-02 11:44:25 +00:00
|
|
|
describe('ZoneBasicData', () => {
|
2024-07-15 08:44:28 +00:00
|
|
|
const notification = '.q-notification__message';
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1280, 720);
|
|
|
|
cy.login('developer');
|
|
|
|
cy.visit('/#/zone/4/basic-data');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should throw an error if the name is empty', () => {
|
|
|
|
cy.get('.q-card > :nth-child(1)').clear();
|
|
|
|
cy.get('.q-btn-group > .q-btn--standard').click();
|
|
|
|
cy.get(notification).should('contains.text', "can't be blank");
|
|
|
|
});
|
|
|
|
|
|
|
|
it("should edit the basicData's zone", () => {
|
|
|
|
cy.get('.q-card > :nth-child(1)').type(' modified');
|
|
|
|
cy.get('.q-btn-group > .q-btn--standard').click();
|
|
|
|
cy.get(notification).should('contains.text', 'Data saved');
|
|
|
|
});
|
|
|
|
});
|