fix: refs #7957 vn-searchbar test
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-12-17 10:44:04 +01:00
parent b1ad357bda
commit efeb32fb28
2 changed files with 3 additions and 7 deletions

View File

@ -159,7 +159,7 @@ async function search() {
:placeholder="t(props.label)" :placeholder="t(props.label)"
dense dense
autofocus autofocus
data-cy="vnSearchBar" data-cy="vn-searchbar"
borderless borderless
> >
<template #append> <template #append>

View File

@ -250,15 +250,11 @@ Cypress.Commands.add('openLeftMenu', (element) => {
Cypress.Commands.add('clearSearchbar', (element) => { Cypress.Commands.add('clearSearchbar', (element) => {
if (element) cy.waitForElement(element); if (element) cy.waitForElement(element);
cy.get( cy.get('[data-cy="vn-searchbar"]').clear();
'#searchbar > form > div:nth-child(1) > label > div:nth-child(1) input'
).clear();
}); });
Cypress.Commands.add('writeSearchbar', (value) => { Cypress.Commands.add('writeSearchbar', (value) => {
cy.get('#searchbar > form > div:nth-child(1) > label > div:nth-child(1) input').type( cy.get('[data-cy="vn-searchbar"]').type(value);
value
);
}); });
Cypress.Commands.add('validateContent', (selector, expectedValue) => { Cypress.Commands.add('validateContent', (selector, expectedValue) => {