8627-devToTest #1421
|
@ -6,7 +6,7 @@ describe('FormModel', () => {
|
||||||
const model = 'mockModel';
|
const model = 'mockModel';
|
||||||
const url = 'mockUrl';
|
const url = 'mockUrl';
|
||||||
const formInitialData = { mockKey: 'mockVal' };
|
const formInitialData = { mockKey: 'mockVal' };
|
||||||
const defaultSaveOpts = { prevent: false };
|
const prevent = findLastKey;
|
||||||
|
|
||||||
describe('modelValue', () => {
|
describe('modelValue', () => {
|
||||||
it('should use the provided model', () => {
|
it('should use the provided model', () => {
|
||||||
|
@ -88,7 +88,7 @@ describe('FormModel', () => {
|
||||||
it('should not call if there are not changes', async () => {
|
it('should not call if there are not changes', async () => {
|
||||||
const { vm } = mount({ propsData: { url, model } });
|
const { vm } = mount({ propsData: { url, model } });
|
||||||
|
|
||||||
await vm.save(defaultSaveOpts);
|
await vm.save(prevent);
|
||||||
expect(vm.hasChanges).toBe(false);
|
expect(vm.hasChanges).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ describe('FormModel', () => {
|
||||||
const { vm } = mount({ propsData: { url, model } });
|
const { vm } = mount({ propsData: { url, model } });
|
||||||
vm.formData.mockKey = 'newVal';
|
vm.formData.mockKey = 'newVal';
|
||||||
await vm.$nextTick();
|
await vm.$nextTick();
|
||||||
await vm.save(defaultSaveOpts);
|
await vm.save(prevent);
|
||||||
expect(spy).toHaveBeenCalled();
|
expect(spy).toHaveBeenCalled();
|
||||||
vm.formData.mockKey = 'mockVal';
|
vm.formData.mockKey = 'mockVal';
|
||||||
});
|
});
|
||||||
|
@ -110,7 +110,7 @@ describe('FormModel', () => {
|
||||||
await vm.$nextTick();
|
await vm.$nextTick();
|
||||||
vm.formData.mockKey = 'newVal';
|
vm.formData.mockKey = 'newVal';
|
||||||
await vm.$nextTick();
|
await vm.$nextTick();
|
||||||
await vm.save(defaultSaveOpts);
|
await vm.save(prevent);
|
||||||
expect(spy).toHaveBeenCalled();
|
expect(spy).toHaveBeenCalled();
|
||||||
vm.formData.mockKey = 'mockVal';
|
vm.formData.mockKey = 'mockVal';
|
||||||
});
|
});
|
||||||
|
@ -124,7 +124,7 @@ describe('FormModel', () => {
|
||||||
await vm.$nextTick();
|
await vm.$nextTick();
|
||||||
vm.formData.mockKey = 'newVal';
|
vm.formData.mockKey = 'newVal';
|
||||||
await vm.$nextTick();
|
await vm.$nextTick();
|
||||||
await vm.save(defaultSaveOpts);
|
await vm.save(prevent);
|
||||||
expect(spyPatch).not.toHaveBeenCalled();
|
expect(spyPatch).not.toHaveBeenCalled();
|
||||||
expect(spySaveFn).toHaveBeenCalled();
|
expect(spySaveFn).toHaveBeenCalled();
|
||||||
vm.formData.mockKey = 'mockVal';
|
vm.formData.mockKey = 'mockVal';
|
||||||
|
@ -138,7 +138,7 @@ describe('FormModel', () => {
|
||||||
|
|
||||||
vm.formData.mockKey = 'newVal';
|
vm.formData.mockKey = 'newVal';
|
||||||
await vm.$nextTick();
|
await vm.$nextTick();
|
||||||
await vm.save(defaultSaveOpts);
|
await vm.save(prevent);
|
||||||
vm.formData.mockKey = 'mockVal';
|
vm.formData.mockKey = 'mockVal';
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,7 +20,7 @@ describe('InvoiceInBasicData', () => {
|
||||||
cy.get(formInputs).eq(1).invoke('val').should('eq', '4739');
|
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 firtsInput = 'Ticket:65';
|
||||||
const secondInput = "I don't know what posting here!";
|
const secondInput = "I don't know what posting here!";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue