forked from verdnatura/salix-front
refactor: use data-cy in VnSelectSupplier component and refactored e2e
This commit is contained in:
parent
aa6c6f0e69
commit
73f02cf8bd
|
@ -15,6 +15,7 @@ const model = defineModel({ type: [String, Number, Object] });
|
||||||
:fields="['id', 'name', 'nickname', 'nif']"
|
:fields="['id', 'name', 'nickname', 'nif']"
|
||||||
:filter-options="['id', 'name', 'nickname', 'nif']"
|
:filter-options="['id', 'name', 'nickname', 'nif']"
|
||||||
sort-by="name ASC"
|
sort-by="name ASC"
|
||||||
|
data-cy="vnSupplierSelect"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
|
@ -121,7 +121,6 @@ function deleteFile(dmsFk) {
|
||||||
hide-selected
|
hide-selected
|
||||||
:is-clearable="false"
|
:is-clearable="false"
|
||||||
:required="true"
|
:required="true"
|
||||||
data-cy="vnSupplierSelect"
|
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
clearable
|
clearable
|
||||||
|
|
|
@ -14,7 +14,10 @@ describe('InvoiceInBasicData', () => {
|
||||||
cy.dataCy('UnDeductibleVatSelect').type('4751000000');
|
cy.dataCy('UnDeductibleVatSelect').type('4751000000');
|
||||||
cy.get('.q-menu .q-item').contains('4751000000').click();
|
cy.get('.q-menu .q-item').contains('4751000000').click();
|
||||||
cy.get(resetBtn).click();
|
cy.get(resetBtn).click();
|
||||||
cy.dataCy('vnSupplierSelect').type('Bros nick');
|
|
||||||
|
cy.waitForElement('#formModel').within(() => {
|
||||||
|
cy.dataCy('vnSupplierSelect').type('Bros nick');
|
||||||
|
})
|
||||||
cy.get('.q-menu .q-item').contains('Bros nick').click();
|
cy.get('.q-menu .q-item').contains('Bros nick').click();
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
cy.get(`${firstFormSelect} input`).invoke('val').should('eq', 'Bros nick');
|
cy.get(`${firstFormSelect} input`).invoke('val').should('eq', 'Bros nick');
|
||||||
|
|
Loading…
Reference in New Issue