fix: refs #8220 itemTag test

This commit is contained in:
Javier Segarra 2024-12-31 12:16:17 +01:00
parent 8e0e15840b
commit 738bb76e10
1 changed files with 9 additions and 10 deletions

View File

@ -3,16 +3,16 @@ describe('Item tag', () => {
beforeEach(() => { beforeEach(() => {
cy.viewport(1920, 1080); cy.viewport(1920, 1080);
cy.login('developer'); cy.login('developer');
cy.visit(`/#/item/list`); cy.visit(`/#/item/1/tags`);
cy.typeSearchbar('1{enter}');
}); });
it('should throw an error adding an existent tag', () => { 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('.q-page-sticky > div').click();
cy.get( : test cy.dataCy('Tag_select').eq(7).type('Tallos');
':nth-child(8) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native'
).type('Tallos');
cy.get('.q-menu .q-item').contains('Tallos').click(); cy.get('.q-menu .q-item').contains('Tallos').click();
cy.get( cy.get(
':nth-child(8) > [label="Value"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Value_input"]' ':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', () => { 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('.q-page-sticky > div').click();
cy.get( cy.dataCy('Tag_select').eq(7).click();
':nth-child(8) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native'
).type('Ancho de la base');
cy.get('.q-menu .q-item').contains('Ancho de la base').click(); cy.get('.q-menu .q-item').contains('Ancho de la base').click();
cy.get( cy.get(
':nth-child(8) > [label="Value"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Value_input"]' ':nth-child(8) > [label="Value"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Value_input"]'