2025-02-18 14:00:58 +00:00
|
|
|
/// <reference types="cypress" />
|
|
|
|
describe('ShelvingList', () => {
|
2025-02-26 07:04:04 +00:00
|
|
|
const parking =
|
|
|
|
'.q-card > :nth-child(1) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container';
|
2025-02-18 14:00:58 +00:00
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1920, 1080);
|
|
|
|
cy.login('developer');
|
|
|
|
cy.visit(`/#/shelving/1/basic-data`);
|
|
|
|
});
|
|
|
|
|
2025-02-21 12:02:12 +00:00
|
|
|
it('should give an error if the code aldready exists', () => {
|
2025-02-26 07:04:04 +00:00
|
|
|
cy.dataCy('Code_input').should('exist').clear().type('AA7');
|
2025-02-21 12:02:12 +00:00
|
|
|
cy.saveCard();
|
|
|
|
cy.get('.q-notification__message').should('have.text', 'The code already exists');
|
|
|
|
});
|
2025-02-18 14:00:58 +00:00
|
|
|
it('should edit the data and save', () => {
|
|
|
|
cy.selectOption(parking, 'P-01-1');
|
2025-02-26 07:04:04 +00:00
|
|
|
cy.dataCy('Code_input').clear().type('AA1');
|
|
|
|
cy.dataCy('Priority_input').clear().type('10');
|
2025-02-18 14:00:58 +00:00
|
|
|
cy.get(':nth-child(2) > .q-checkbox > .q-checkbox__inner').click();
|
|
|
|
cy.saveCard();
|
|
|
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
|
|
|
});
|
2025-02-21 12:02:12 +00:00
|
|
|
});
|