refs #6722 test: improve

This commit is contained in:
Javier Segarra 2024-02-26 12:00:57 +01:00
parent 7b5f4230df
commit 5916cb29d4
4 changed files with 6 additions and 5 deletions

View File

@ -60,8 +60,8 @@ const onEnterPress = () => {
<slot name="prepend" />
</template>
<template #append>
<slot name="append" v-if="$slots.append" />
<template #append v-if="$slots.append">
<slot name="append" />
<QIcon
name="close"
size="xs"

View File

@ -1,7 +1,7 @@
const locationOptions ='[role="listbox"] > div.q-virtual-scroll__content > .q-item'
describe('VnLocation', () => {
describe('Create',()=>{
const inputLocation = ':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control';
const inputLocation = '.q-form .q-card> :nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
@ -26,7 +26,7 @@ describe('VnLocation', () => {
cy.get(inputLocation).type('ecuador');
cy.get(locationOptions).should('have.length',1);
cy.get(`${locationOptions}:nth-child(1)`).click();
cy.get(':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon').click();
cy.get(inputLocation+'> :nth-child(2) > .q-icon').click();
});
});

View File

@ -1,6 +1,6 @@
/// <reference types="cypress" />
describe('InvoiceInBasicData', () => {
const selects = ':nth-child(1) > :nth-child(1) > .q-field';
const selects = '.q-form .q-card>:nth-child(1) > :nth-child(1) > .q-field';
const appendBtns = 'label button';
const dialogAppendBtns = '.q-dialog label button';
const dialogInputs = '.q-dialog input';

View File

@ -64,6 +64,7 @@ Cypress.Commands.add('getValue', (selector) => {
// Fill Inputs
Cypress.Commands.add('selectOption', (selector, option) => {
cy.waitForElement(selector);
cy.get(selector).find('.q-select__dropdown-icon').click();
cy.get('.q-menu .q-item').contains(option).click();
});