test: refs #8581 validate form
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
813e677a12
commit
6e8f54ec1f
|
@ -1,9 +1,7 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
describe('InvoiceInBasicData', () => {
|
describe('InvoiceInBasicData', () => {
|
||||||
const firstFormSelect = '.q-card > .vn-row:nth-child(1) > .q-select';
|
|
||||||
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})`;
|
const getDocumentBtns = (opt) => `[data-cy="dms-buttons"] > :nth-child(${opt})`;
|
||||||
const futureDate = moment().add(1, 'days').format('DD-MM-YYYY');
|
const futureDate = moment().add(1, 'days').format('DD-MM-YYYY');
|
||||||
const mock = {
|
const mock = {
|
||||||
|
@ -17,7 +15,7 @@ describe('InvoiceInBasicData', () => {
|
||||||
type: 'date',
|
type: 'date',
|
||||||
},
|
},
|
||||||
invoiceInBasicDataDeductibleExpenseFk: {
|
invoiceInBasicDataDeductibleExpenseFk: {
|
||||||
val: 'Retenciones',
|
val: '4751000000',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
},
|
},
|
||||||
invoiceInBasicDataCurrencyFk: { val: 'USD', type: 'select' },
|
invoiceInBasicDataCurrencyFk: { val: 'USD', type: 'select' },
|
||||||
|
@ -36,38 +34,38 @@ describe('InvoiceInBasicData', () => {
|
||||||
it('should edit every field', () => {
|
it('should edit every field', () => {
|
||||||
cy.fillInForm(mock, { attr: 'data-cy' });
|
cy.fillInForm(mock, { attr: 'data-cy' });
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
// cy.get(`${firstFormSelect} input`).invoke('val').should('eq', 'Bros nick');
|
cy.validateForm(mock, { attr: 'data-cy' });
|
||||||
});
|
});
|
||||||
|
|
||||||
// it.skip('should edit, remove and create the dms data', () => {
|
it('should edit, remove and create the dms data', () => {
|
||||||
// const firtsInput = 'Ticket:65';
|
const firtsInput = 'Ticket:65';
|
||||||
// const secondInput = "I don't know what posting here!";
|
const secondInput = "I don't know what posting here!";
|
||||||
|
|
||||||
// //edit
|
//edit
|
||||||
// cy.get(getDocumentBtns(2)).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(getDocumentBtns(2)).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(getDocumentBtns(3)).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');
|
||||||
|
|
||||||
// //create
|
//create
|
||||||
// cy.get('[data-cy="invoiceInBasicDataDmsAdd"]').eq(0).click();
|
cy.get('[data-cy="invoiceInBasicDataDmsAdd"]').eq(0).click();
|
||||||
// cy.get('[data-cy="VnDms_inputFile"').selectFile(
|
cy.get('[data-cy="VnDms_inputFile"').selectFile(
|
||||||
// 'test/cypress/fixtures/image.jpg',
|
'test/cypress/fixtures/image.jpg',
|
||||||
// {
|
{
|
||||||
// force: true,
|
force: true,
|
||||||
// },
|
},
|
||||||
// );
|
);
|
||||||
// cy.get('[data-cy="FormModelPopup_save"]').click();
|
cy.get('[data-cy="FormModelPopup_save"]').click();
|
||||||
// cy.checkNotification('Data saved');
|
cy.checkNotification('Data saved');
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue