diff --git a/test/cypress/integration/shelving/shelvingBasicData.spec.js b/test/cypress/integration/shelving/shelvingBasicData.spec.js index 0e90d2350..d7b0dc692 100644 --- a/test/cypress/integration/shelving/shelvingBasicData.spec.js +++ b/test/cypress/integration/shelving/shelvingBasicData.spec.js @@ -1,7 +1,7 @@ /// describe('ShelvingList', () => { - - const parking = '.q-card > :nth-child(1) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container'; + const parking = + '.q-card > :nth-child(1) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container'; beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); @@ -9,16 +9,14 @@ describe('ShelvingList', () => { }); it('should give an error if the code aldready exists', () => { - cy.dataCy('Code_input').should('exist').clear(); - cy.dataCy('Code_input').type('AA7'); + cy.dataCy('Code_input').should('exist').clear().type('AA7'); cy.saveCard(); cy.get('.q-notification__message').should('have.text', 'The code already exists'); }); it('should edit the data and save', () => { cy.selectOption(parking, 'P-01-1'); - cy.dataCy('Code_input').clear(); - cy.dataCy('Code_input').type('AA1'); - cy.dataCy('Priority_input').type('10'); + cy.dataCy('Code_input').clear().type('AA1'); + cy.dataCy('Priority_input').clear().type('10'); cy.get(':nth-child(2) > .q-checkbox > .q-checkbox__inner').click(); cy.saveCard(); cy.get('.q-notification__message').should('have.text', 'Data saved'); diff --git a/test/cypress/integration/shelving/shelvingList.spec.js b/test/cypress/integration/shelving/shelvingList.spec.js index 86cbabf89..745dd1b78 100644 --- a/test/cypress/integration/shelving/shelvingList.spec.js +++ b/test/cypress/integration/shelving/shelvingList.spec.js @@ -7,18 +7,18 @@ describe('ShelvingList', () => { }); it('should redirect on clicking a shelving', () => { - cy.get('#searchbar input').type('{enter}'); + cy.typeSearchbar('{enter}'); cy.dataCy('cardBtn').eq(0).click(); cy.get('.summaryHeader > .header > .q-icon').click(); cy.url().should('include', '/shelving/1/summary'); }); it('should redirect from preview to basic-data', () => { - cy.get('#searchbar input').type('{enter}'); + cy.typeSearchbar('{enter}'); cy.dataCy('cardBtn').eq(0).click(); cy.get('.q-card > .header').click(); cy.url().should('include', '/shelving/1/basic-data'); - }) + }); it('should filter and redirect if only one result', () => { cy.selectOption('[data-cy="Parking_select"]', 'P-02-2'); @@ -31,8 +31,9 @@ describe('ShelvingList', () => { cy.dataCy('code-create-popup').type('Test'); cy.dataCy('Priority_input').type('10'); cy.selectOption( - '.grid-create > .q-select > .q-field__inner > .q-field__control > .q-field__control-container', '100-01' - ) + '.grid-create > .q-select > .q-field__inner > .q-field__control > .q-field__control-container', + '100-01', + ); cy.dataCy('FormModelPopup_save').click(); cy.checkNotification('Data created'); cy.url().should('match', /\/shelving\/\d+\/basic-data/);