23 lines
720 B
JavaScript
23 lines
720 B
JavaScript
describe('ZoneBasicData', () => {
|
|
const priceBasicData = '[data-cy="ZoneBasicDataPrice"]';
|
|
const saveBtn = '.q-btn-group > .q-btn--standard';
|
|
|
|
beforeEach(() => {
|
|
cy.viewport(1280, 720);
|
|
cy.login('developer');
|
|
cy.visit('/#/zone/4/basic-data');
|
|
});
|
|
|
|
it('should throw an error if the price is empty', () => {
|
|
cy.get(priceBasicData).clear();
|
|
cy.get(saveBtn).click();
|
|
cy.get('.q-field__messages > div').should('have.text', 'Field required');
|
|
});
|
|
|
|
it("should edit the basicData's zone name", () => {
|
|
cy.get('.q-card > :nth-child(1)').type(' modified');
|
|
cy.get(saveBtn).click();
|
|
cy.checkNotification('Data saved');
|
|
});
|
|
});
|