/// describe('Client consignee', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); cy.visit('#/customer/1107/address'); cy.domContentLoad(); }); it('Should load layout', () => { cy.get('.q-card').should('be.visible'); }); it('check as equalizated', function () { cy.get('.q-card__section > .address-card').then(($el) => { let addressCards_before = $el.length; cy.get('.q-page-sticky > div > .q-btn').click(); const addressName = 'test'; cy.dataCy('Consignee_input').type(addressName); cy.dataCy('Location_select').click(); cy.get('[role="listbox"] .q-item:nth-child(1)').click(); cy.dataCy('Street address_input').type('TEST ADDRESS'); cy.get('.q-btn-group > .q-btn--standard').click(); cy.location('href').should('contain', '#/customer/1107/address'); cy.get('.q-card__section > .address-card').should( 'have.length', addressCards_before + 1, ); cy.get('.q-card__section > .address-card') .eq(addressCards_before) .should('be.visible') .get('.text-weight-bold') .eq(addressCards_before - 1) .should('contain', addressName) .click(); }); cy.get( '.q-card > :nth-child(1) > :nth-child(2) > .q-checkbox > .q-checkbox__inner', ) .should('have.class', 'q-checkbox__inner--falsy') .click(); cy.get('.q-btn-group > .q-btn--standard > .q-btn__content').click(); cy.get( ':nth-child(2) > :nth-child(2) > .flex > .q-mr-lg > .q-checkbox__inner', ).should('have.class', 'q-checkbox__inner--truthy'); }); });