fix: fixed basic data e2e
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:
parent
0e1f04323c
commit
8c499e3fc3
|
@ -1,23 +1,20 @@
|
||||||
/// <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 documentBtns = '[data-cy="dms-buttons"]';
|
||||||
const dialogInputs = '.q-dialog input';
|
const dialogInputs = '.q-dialog input';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-in/1/basic-data`);
|
cy.visit(`/#/invoice-in/2/basic-data`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit the provideer and supplier ref', () => {
|
it('should edit the provideer and supplier ref', () => {
|
||||||
cy.selectOption(firstFormSelect, 'Bros');
|
cy.selectOption('[data-cy="Undeductible VAT_select"]', '4751000000')
|
||||||
cy.get('[title="Reset"]').click();
|
cy.get('[title="Reset"]').click();
|
||||||
cy.get(formInputs).eq(1).type('{selectall}4739');
|
cy.selectOption(firstFormSelect, 'Bros');
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
|
cy.get(`${firstFormSelect} input`).invoke('val').should('eq', 'Bros nick');
|
||||||
cy.get(`${firstFormSelect} input`).invoke('val').should('eq', 'Plants nick');
|
|
||||||
cy.get(formInputs).eq(1).invoke('val').should('eq', '4739');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit, remove and create the dms data', () => {
|
it('should edit, remove and create the dms data', () => {
|
||||||
|
@ -25,18 +22,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(`${documentBtns} > :nth-child(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(`${documentBtns} > :nth-child(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(`${documentBtns} > :nth-child(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