Merge branch 'dev' into 7065-testUserPanel
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
722cb938ab
|
@ -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">
|
||||||
|
|
|
@ -149,6 +149,7 @@ function deleteFile(dmsFk) {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="id"
|
option-label="id"
|
||||||
:filter-options="['id', 'name']"
|
:filter-options="['id', 'name']"
|
||||||
|
data-cy="UnDeductibleVatSelect"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('InvoiceInBasicData', () => {
|
describe('InvoiceInBasicData', () => {
|
||||||
const formInputs = '.q-form > .q-card input';
|
|
||||||
const firstFormSelect = '.q-card > .vn-row:nth-child(1) > .q-select';
|
const firstFormSelect = '.q-card > .vn-row:nth-child(1) > .q-select';
|
||||||
const documentBtns = '[data-cy="dms-buttons"] button';
|
|
||||||
const dialogInputs = '.q-dialog input';
|
const dialogInputs = '.q-dialog input';
|
||||||
|
const resetBtn = '.q-btn-group--push > .q-btn--flat';
|
||||||
|
const getDocumentBtns = (opt) => `[data-cy="dms-buttons"] > :nth-child(${opt})`;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -11,13 +11,16 @@ describe('InvoiceInBasicData', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit the provideer and supplier ref', () => {
|
it('should edit the provideer and supplier ref', () => {
|
||||||
cy.selectOption(firstFormSelect, 'Bros');
|
cy.dataCy('UnDeductibleVatSelect').type('4751000000');
|
||||||
cy.get('[title="Reset"]').click();
|
cy.get('.q-menu .q-item').contains('4751000000').click();
|
||||||
cy.get(formInputs).eq(1).type('{selectall}4739');
|
cy.get(resetBtn).click();
|
||||||
cy.saveCard();
|
|
||||||
|
|
||||||
cy.get(`${firstFormSelect} input`).invoke('val').should('eq', 'Plants nick');
|
cy.waitForElement('#formModel').within(() => {
|
||||||
cy.get(formInputs).eq(1).invoke('val').should('eq', '4739');
|
cy.dataCy('vnSupplierSelect').type('Bros nick');
|
||||||
|
})
|
||||||
|
cy.get('.q-menu .q-item').contains('Bros nick').click();
|
||||||
|
cy.saveCard();
|
||||||
|
cy.get(`${firstFormSelect} input`).invoke('val').should('eq', 'Bros nick');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit, remove and create the dms data', () => {
|
it('should edit, remove and create the dms data', () => {
|
||||||
|
@ -25,18 +28,18 @@ describe('InvoiceInBasicData', () => {
|
||||||
const secondInput = "I don't know what posting here!";
|
const secondInput = "I don't know what posting here!";
|
||||||
|
|
||||||
//edit
|
//edit
|
||||||
cy.get(documentBtns).eq(1).click();
|
cy.get(getDocumentBtns(2)).click();
|
||||||
cy.get(dialogInputs).eq(0).type(`{selectall}${firtsInput}`);
|
cy.get(dialogInputs).eq(0).type(`{selectall}${firtsInput}`);
|
||||||
cy.get('textarea').type(`{selectall}${secondInput}`);
|
cy.get('textarea').type(`{selectall}${secondInput}`);
|
||||||
cy.get('[data-cy="FormModelPopup_save"]').click();
|
cy.get('[data-cy="FormModelPopup_save"]').click();
|
||||||
cy.get(documentBtns).eq(1).click();
|
cy.get(getDocumentBtns(2)).click();
|
||||||
cy.get(dialogInputs).eq(0).invoke('val').should('eq', firtsInput);
|
cy.get(dialogInputs).eq(0).invoke('val').should('eq', firtsInput);
|
||||||
cy.get('textarea').invoke('val').should('eq', secondInput);
|
cy.get('textarea').invoke('val').should('eq', secondInput);
|
||||||
cy.get('[data-cy="FormModelPopup_save"]').click();
|
cy.get('[data-cy="FormModelPopup_save"]').click();
|
||||||
cy.checkNotification('Data saved');
|
cy.checkNotification('Data saved');
|
||||||
|
|
||||||
//remove
|
//remove
|
||||||
cy.get(documentBtns).eq(2).click();
|
cy.get(getDocumentBtns(3)).click();
|
||||||
cy.get('[data-cy="VnConfirm_confirm"]').click();
|
cy.get('[data-cy="VnConfirm_confirm"]').click();
|
||||||
cy.checkNotification('Data saved');
|
cy.checkNotification('Data saved');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue