forked from verdnatura/salix-front
refs #6722 test: improve
This commit is contained in:
parent
7b5f4230df
commit
5916cb29d4
|
@ -60,8 +60,8 @@ const onEnterPress = () => {
|
||||||
<slot name="prepend" />
|
<slot name="prepend" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #append>
|
<template #append v-if="$slots.append">
|
||||||
<slot name="append" v-if="$slots.append" />
|
<slot name="append" />
|
||||||
<QIcon
|
<QIcon
|
||||||
name="close"
|
name="close"
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const locationOptions ='[role="listbox"] > div.q-virtual-scroll__content > .q-item'
|
const locationOptions ='[role="listbox"] > div.q-virtual-scroll__content > .q-item'
|
||||||
describe('VnLocation', () => {
|
describe('VnLocation', () => {
|
||||||
describe('Create',()=>{
|
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(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -26,7 +26,7 @@ describe('VnLocation', () => {
|
||||||
cy.get(inputLocation).type('ecuador');
|
cy.get(inputLocation).type('ecuador');
|
||||||
cy.get(locationOptions).should('have.length',1);
|
cy.get(locationOptions).should('have.length',1);
|
||||||
cy.get(`${locationOptions}:nth-child(1)`).click();
|
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();
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('InvoiceInBasicData', () => {
|
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 appendBtns = 'label button';
|
||||||
const dialogAppendBtns = '.q-dialog label button';
|
const dialogAppendBtns = '.q-dialog label button';
|
||||||
const dialogInputs = '.q-dialog input';
|
const dialogInputs = '.q-dialog input';
|
||||||
|
|
|
@ -64,6 +64,7 @@ Cypress.Commands.add('getValue', (selector) => {
|
||||||
|
|
||||||
// Fill Inputs
|
// Fill Inputs
|
||||||
Cypress.Commands.add('selectOption', (selector, option) => {
|
Cypress.Commands.add('selectOption', (selector, option) => {
|
||||||
|
cy.waitForElement(selector);
|
||||||
cy.get(selector).find('.q-select__dropdown-icon').click();
|
cy.get(selector).find('.q-select__dropdown-icon').click();
|
||||||
cy.get('.q-menu .q-item').contains(option).click();
|
cy.get('.q-menu .q-item').contains(option).click();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue