#8372 prevent double submit #1333

Merged
alexm merged 29 commits from 8372-fixDoubleRequest into dev 2025-02-13 12:40:17 +00:00
2 changed files with 7 additions and 7 deletions
Showing only changes of commit 9a946c0f39 - Show all commits

View File

@ -6,7 +6,7 @@ describe('FormModel', () => {
const model = 'mockModel';
const url = 'mockUrl';
const formInitialData = { mockKey: 'mockVal' };
const defaultSaveOpts = { prevent: false };
const prevent = findLastKey;
describe('modelValue', () => {
it('should use the provided model', () => {
@ -88,7 +88,7 @@ describe('FormModel', () => {
it('should not call if there are not changes', async () => {
const { vm } = mount({ propsData: { url, model } });
await vm.save(defaultSaveOpts);
await vm.save(prevent);
jorgep marked this conversation as resolved Outdated
Outdated
Review

Si false es el por defecto, no hace falta pasar false

Si false es el por defecto, no hace falta pasar false
expect(vm.hasChanges).toBe(false);
});
@ -97,7 +97,7 @@ describe('FormModel', () => {
const { vm } = mount({ propsData: { url, model } });
vm.formData.mockKey = 'newVal';
await vm.$nextTick();
await vm.save(defaultSaveOpts);
await vm.save(prevent);
expect(spy).toHaveBeenCalled();
vm.formData.mockKey = 'mockVal';
});
@ -110,7 +110,7 @@ describe('FormModel', () => {
await vm.$nextTick();
vm.formData.mockKey = 'newVal';
await vm.$nextTick();
await vm.save(defaultSaveOpts);
await vm.save(prevent);
expect(spy).toHaveBeenCalled();
vm.formData.mockKey = 'mockVal';
});
@ -124,7 +124,7 @@ describe('FormModel', () => {
await vm.$nextTick();
vm.formData.mockKey = 'newVal';
await vm.$nextTick();
await vm.save(defaultSaveOpts);
await vm.save(prevent);
expect(spyPatch).not.toHaveBeenCalled();
expect(spySaveFn).toHaveBeenCalled();
vm.formData.mockKey = 'mockVal';
@ -138,7 +138,7 @@ describe('FormModel', () => {
vm.formData.mockKey = 'newVal';
await vm.$nextTick();
await vm.save(defaultSaveOpts);
await vm.save(prevent);
vm.formData.mockKey = 'mockVal';
});
});

View File

@ -20,7 +20,7 @@ describe('InvoiceInBasicData', () => {
cy.get(formInputs).eq(1).invoke('val').should('eq', '4739');
});
it.only('should edit, remove and create the dms data', () => {
it('should edit, remove and create the dms data', () => {
const firtsInput = 'Ticket:65';
const secondInput = "I don't know what posting here!";