2024-12-10 06:10:55 +00:00
|
|
|
/// <reference types="cypress" />
|
|
|
|
describe('Item shelving', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1920, 1080);
|
|
|
|
cy.login('developer');
|
|
|
|
cy.visit(`/#/item/list`);
|
2024-12-16 09:24:31 +00:00
|
|
|
cy.typeSearchbar('1{enter}');
|
2024-12-10 06:10:55 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should throw an error if the barcode exists', () => {
|
|
|
|
cy.get('[href="#/item/1/barcode"]').click();
|
|
|
|
cy.get('.q-card > .q-btn > .q-btn__content > .q-icon').click();
|
2024-12-31 07:07:47 +00:00
|
|
|
cy.dataCy('Code_input').eq(3).type('1111111111');
|
2024-12-10 06:11:18 +00:00
|
|
|
cy.dataCy('crudModelDefaultSaveBtn').click();
|
|
|
|
cy.checkNotification('Codes can not be repeated');
|
2024-12-10 06:10:55 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should create a new barcode', () => {
|
|
|
|
cy.get('[href="#/item/1/barcode"]').click();
|
|
|
|
cy.get('.q-card > .q-btn > .q-btn__content > .q-icon').click();
|
2024-12-31 07:07:47 +00:00
|
|
|
cy.dataCy('Code_input').eq(3).type('1231231231');
|
2024-12-10 06:11:18 +00:00
|
|
|
cy.dataCy('crudModelDefaultSaveBtn').click();
|
|
|
|
cy.checkNotification('Data saved');
|
2024-12-10 06:10:55 +00:00
|
|
|
});
|
|
|
|
});
|