2025-02-18 14:00:58 +00:00
|
|
|
/// <reference types="cypress" />
|
|
|
|
describe('ShelvingList', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1920, 1080);
|
|
|
|
cy.login('developer');
|
|
|
|
cy.visit(`/#/shelving/list`);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should redirect on clicking a shelving', () => {
|
2025-02-26 07:04:04 +00:00
|
|
|
cy.typeSearchbar('{enter}');
|
2025-02-21 12:02:12 +00:00
|
|
|
cy.dataCy('cardBtn').eq(0).click();
|
|
|
|
cy.get('.summaryHeader > .header > .q-icon').click();
|
|
|
|
cy.url().should('include', '/shelving/1/summary');
|
2025-02-18 14:00:58 +00:00
|
|
|
});
|
|
|
|
|
2025-02-21 12:02:12 +00:00
|
|
|
it('should redirect from preview to basic-data', () => {
|
2025-02-26 07:04:04 +00:00
|
|
|
cy.typeSearchbar('{enter}');
|
2025-02-21 12:02:12 +00:00
|
|
|
cy.dataCy('cardBtn').eq(0).click();
|
|
|
|
cy.get('.q-card > .header').click();
|
|
|
|
cy.url().should('include', '/shelving/1/basic-data');
|
2025-02-26 07:04:04 +00:00
|
|
|
});
|
2025-02-21 12:02:12 +00:00
|
|
|
|
2025-02-18 14:00:58 +00:00
|
|
|
it('should filter and redirect if only one result', () => {
|
|
|
|
cy.selectOption('[data-cy="Parking_select"]', 'P-02-2');
|
|
|
|
cy.dataCy('Parking_select').type('{enter}');
|
|
|
|
cy.url().should('match', /\/shelving\/\d+\/summary/);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should create a new shelving', () => {
|
|
|
|
cy.dataCy('vnTableCreateBtn').click();
|
|
|
|
cy.dataCy('code-create-popup').type('Test');
|
|
|
|
cy.dataCy('Priority_input').type('10');
|
|
|
|
cy.selectOption(
|
2025-02-26 07:04:04 +00:00
|
|
|
'.grid-create > .q-select > .q-field__inner > .q-field__control > .q-field__control-container',
|
|
|
|
'100-01',
|
|
|
|
);
|
2025-02-18 14:00:58 +00:00
|
|
|
cy.dataCy('FormModelPopup_save').click();
|
|
|
|
cy.checkNotification('Data created');
|
|
|
|
cy.url().should('match', /\/shelving\/\d+\/basic-data/);
|
|
|
|
});
|
|
|
|
});
|