From 738bb76e10b1900b6e4c900b32faf96989da69a2 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 31 Dec 2024 12:16:17 +0100 Subject: [PATCH] fix: refs #8220 itemTag test --- test/cypress/integration/item/itemTag.spec.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/test/cypress/integration/item/itemTag.spec.js b/test/cypress/integration/item/itemTag.spec.js index a3bd152d8..0df21622e 100644 --- a/test/cypress/integration/item/itemTag.spec.js +++ b/test/cypress/integration/item/itemTag.spec.js @@ -3,16 +3,16 @@ describe('Item tag', () => { beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); - cy.visit(`/#/item/list`); - cy.typeSearchbar('1{enter}'); + cy.visit(`/#/item/1/tags`); }); it('should throw an error adding an existent tag', () => { - cy.get('[href="#/item/1/tags"]').click(); + cy.get('.q-page').should('be.visible'); + + // cy.waitForElement('[data-cy="itemTags"]'); + cy.get('.q-page-sticky > div').click(); - cy.get( - ':nth-child(8) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native' - ).type('Tallos'); +: test cy.dataCy('Tag_select').eq(7).type('Tallos'); cy.get('.q-menu .q-item').contains('Tallos').click(); cy.get( ':nth-child(8) > [label="Value"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Value_input"]' @@ -22,11 +22,10 @@ describe('Item tag', () => { }); it('should add a new tag', () => { - cy.get('[href="#/item/1/tags"]').click(); + cy.get('.q-page').should('be.visible'); + cy.get('.q-page-sticky > div').click(); - cy.get( - ':nth-child(8) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native' - ).type('Ancho de la base'); + cy.dataCy('Tag_select').eq(7).click(); cy.get('.q-menu .q-item').contains('Ancho de la base').click(); cy.get( ':nth-child(8) > [label="Value"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Value_input"]'