Merge pull request 'Warmfix[Wagon]: Fixed wagons e2e' (!1330) from Fix-WagonModuleE2E into test
gitea/salix-front/pipeline/head This commit looks good Details
gitea/salix-front/pipeline/pr-dev This commit looks good Details

Reviewed-on: #1330
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Alex Moreno 2025-02-05 06:20:32 +00:00
commit 8c6a61a165
2 changed files with 7 additions and 11 deletions

View File

@ -8,16 +8,16 @@ describe('WagonCreate', () => {
it('should create and delete a new wagon', () => {
cy.dataCy('vnTableCreateBtn').click();
cy.get(
'.grid-create > [label="Label"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Label_input"]'
'.grid-create > [label="Label"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Label_input"]',
).type('1234');
cy.get(
'.grid-create > [label="Plate"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Plate_input"]'
'.grid-create > [label="Plate"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Plate_input"]',
).type('1234ABCD');
cy.get(
'.grid-create > [label="Volume"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Volume_input"]'
'.grid-create > [label="Volume"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Volume_input"]',
).type('100');
cy.dataCy('Type_select').type('{downarrow}{enter}');
// // Delete wagon type created
cy.get('[to="/null/1"] > .q-card > .column > [title="Remove"]').click();
cy.get('[title="Remove"] > .q-btn__content > .q-icon').click();
});
});

View File

@ -6,14 +6,10 @@ describe('WagonTypeCreate', () => {
cy.waitForElement('.q-page', 6000);
});
it('should create a new wagon type', () => {
it('should create a new wagon type and then delete it', () => {
cy.get('.q-page-sticky > div > .q-btn').click();
cy.get('input').first().type('Example for testing');
cy.get('button[type="submit"]').click();
});
it('delete a wagon type', () => {
cy.get(
'[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
).click();
cy.get('[title="Remove"] > .q-btn__content > .q-icon').first().click();
});
});