forked from verdnatura/salix-front
fix: refs refs #4466 tests
This commit is contained in:
parent
1883cb79ab
commit
b76c2a35a8
|
@ -76,13 +76,8 @@ defineExpose({
|
|||
reset,
|
||||
hasChanges,
|
||||
saveChanges,
|
||||
getFormData,
|
||||
});
|
||||
|
||||
function getFormData() {
|
||||
return formData.value;
|
||||
}
|
||||
|
||||
async function fetch(data) {
|
||||
if (data && Array.isArray(data)) {
|
||||
let $index = 0;
|
||||
|
@ -202,7 +197,6 @@ function getChanges() {
|
|||
|
||||
const pk = $props.primaryKey;
|
||||
for (const [i, row] of formData.value.entries()) {
|
||||
console.log(pk, row);
|
||||
if (!row[pk]) {
|
||||
creates.push(row);
|
||||
} else if (originalData.value) {
|
||||
|
@ -217,7 +211,6 @@ function getChanges() {
|
|||
}
|
||||
}
|
||||
const changes = { updates, creates };
|
||||
console.log('ddd', changes);
|
||||
for (let prop in changes) {
|
||||
if (changes[prop].length === 0) changes[prop] = undefined;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
describe('InvoiceInCorrective', () => {
|
||||
const createRectificative = '.q-menu > .q-list > :nth-child(4) > .q-item__section';
|
||||
const rectificativeSection = '.q-drawer-container .q-list > a:nth-child(6)';
|
||||
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';
|
||||
|
||||
it('should create a correcting invoice', () => {
|
||||
cy.login('developer');
|
||||
|
@ -12,7 +13,7 @@ describe('InvoiceInCorrective', () => {
|
|||
cy.openActionsDescriptor();
|
||||
|
||||
cy.get(createRectificative).click();
|
||||
cy.clickConfirm();
|
||||
cy.get(saveDialog).click();
|
||||
cy.openLeftMenu();
|
||||
cy.get(rectificativeSection).click();
|
||||
cy.get('tbody > tr:visible').should('have.length', 1);
|
||||
|
|
|
@ -8,8 +8,7 @@ describe('InvoiceInList', () => {
|
|||
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/invoice-in`);
|
||||
cy.clickFilterSearchBtn();
|
||||
cy.visit(`/#/invoice-in/list`);
|
||||
});
|
||||
|
||||
it('should redirect on clicking a invoice', () => {
|
||||
|
|
|
@ -88,7 +88,7 @@ Cypress.Commands.add('addCard', () => {
|
|||
});
|
||||
Cypress.Commands.add('clickConfirm', () => {
|
||||
cy.waitForElement('.q-dialog__inner > .q-card');
|
||||
cy.get('.q-card > .q-card__actions > .q-btn--standard').click();
|
||||
cy.get('.q-card__actions > .q-btn--unelevated > .q-btn__content > .block').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('notificationHas', (selector, text) => {
|
||||
|
@ -184,10 +184,6 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => {
|
|||
cy.get(selector).should('have.text', expectedValue);
|
||||
});
|
||||
|
||||
Cypress.Commands.add('clickFilterSearchBtn', () => {
|
||||
cy.get('.q-item__section > .q-btn > .q-btn__content > .q-icon').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('openActionsDescriptor', () => {
|
||||
cy.get('.descriptor > .header > .q-btn').click();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue