forked from verdnatura/salix-front
Merge branch 'dev' into 7671_dense_itemFixedPrices
This commit is contained in:
commit
3affd8712c
|
@ -11,7 +11,9 @@ describe('WagonCreate', () => {
|
|||
cy.get('input').eq(1).type('1234ABCD');
|
||||
cy.get('input').eq(2).type('100');
|
||||
cy.get('input').eq(3).click();
|
||||
cy.get('div[role="listbox"]').find('div.q-item').click();
|
||||
cy.get('.q-select > .q-field__inner > .q-field__control').type(
|
||||
'{downarrow}{enter}'
|
||||
);
|
||||
|
||||
// Save
|
||||
cy.get('button[type="submit"]').click();
|
||||
|
@ -19,12 +21,22 @@ describe('WagonCreate', () => {
|
|||
// Check data has been saved successfully
|
||||
cy.waitForElement('.q-card');
|
||||
|
||||
cy.get('.title').should('have.text', '1234');
|
||||
cy.get('[title-label="Plate"] > .value > span').should('have.text', '1234ABCD');
|
||||
cy.get(':nth-child(2) > .value > span').should('have.text', '100');
|
||||
cy.get(':nth-child(3) > .value > span').should('have.text', 'Wagon Type #1');
|
||||
cy.get(
|
||||
'[to="/null/1"] > .q-card > .no-padding > .q-py-none > .cursor-text'
|
||||
).should('have.text', '1234');
|
||||
cy.get(
|
||||
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(1) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
||||
).should('have.text', '1234ABCD');
|
||||
cy.get(
|
||||
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(2) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
||||
).should('have.text', '100');
|
||||
cy.get(
|
||||
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(3) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
||||
).should('have.text', 'Wagon Type #1');
|
||||
|
||||
// Delete wagon type created
|
||||
cy.get('.actions > .q-btn--standard').click();
|
||||
cy.get(
|
||||
'[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
|
||||
).click();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,7 +13,7 @@ describe('WagonTypeCreate', () => {
|
|||
});
|
||||
it('delete a wagon type', () => {
|
||||
cy.get(
|
||||
':nth-child(2) > :nth-child(1) > .card-list-body > .actions > .q-btn--standard'
|
||||
'[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
|
||||
).click();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('WagonTypeEdit', () => {
|
|||
beforeEach(() => {
|
||||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
cy.visit('/#/wagon/type/2/edit');
|
||||
cy.visit('/#/wagon/type/1/edit');
|
||||
});
|
||||
|
||||
it('should edit the name and the divisible field of the wagon type', () => {
|
||||
|
@ -14,14 +14,14 @@ describe('WagonTypeEdit', () => {
|
|||
cy.get('.q-btn--standard').click();
|
||||
});
|
||||
|
||||
it('should create a tray', () => {
|
||||
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get('input').last().type('150');
|
||||
cy.get(trayColorRow).type('{downArrow}{downArrow}{enter}');
|
||||
});
|
||||
|
||||
it('should delete a tray', () => {
|
||||
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').first().click();
|
||||
cy.reload();
|
||||
});
|
||||
|
||||
it('should create a tray', () => {
|
||||
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').last().click();
|
||||
cy.get('input').last().type('150');
|
||||
cy.get(trayColorRow).type('{downArrow}{downArrow}{downArrow}{enter}');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue