feat: refs #8647 unskipp e2e to test which of them are really failling and fixed VnDms
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
85fa1543c1
commit
2678ac5def
|
@ -62,7 +62,8 @@ function onFileChange(files) {
|
|||
function mapperDms(data) {
|
||||
const formData = new FormData();
|
||||
const { files } = data;
|
||||
if (files) files.forEach((file) => formData.append(file?.name, file));
|
||||
if (files) formData.append(files?.name, files);
|
||||
// if (files) files.forEach((file) => formData.append(file?.name, file));
|
||||
|
||||
const dms = {
|
||||
hasFile: !!data.hasFile,
|
||||
|
|
|
@ -2,7 +2,6 @@ import { createWrapper } from 'app/test/vitest/helper';
|
|||
import { vi, describe, expect, it } from 'vitest';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
||||
|
||||
describe('VnInput', () => {
|
||||
let vm;
|
||||
let wrapper;
|
||||
|
@ -11,26 +10,28 @@ describe('VnInput', () => {
|
|||
function generateWrapper(value, isOutlined, emptyToNull, insertable) {
|
||||
wrapper = createWrapper(VnInput, {
|
||||
props: {
|
||||
modelValue: value,
|
||||
isOutlined, emptyToNull, insertable,
|
||||
maxlength: 101
|
||||
modelValue: value,
|
||||
isOutlined,
|
||||
emptyToNull,
|
||||
insertable,
|
||||
maxlength: 101,
|
||||
},
|
||||
attrs: {
|
||||
label: 'test',
|
||||
required: true,
|
||||
maxlength: 101,
|
||||
maxLength: 10,
|
||||
'max-length':20
|
||||
'max-length': 20,
|
||||
},
|
||||
});
|
||||
wrapper = wrapper.wrapper;
|
||||
vm = wrapper.vm;
|
||||
input = wrapper.find('[data-cy="test_input"]');
|
||||
};
|
||||
}
|
||||
|
||||
describe('value', () => {
|
||||
it('should emit update:modelValue when value changes', async () => {
|
||||
generateWrapper('12345', false, false, true)
|
||||
generateWrapper('12345', false, false, true);
|
||||
await input.setValue('123');
|
||||
expect(wrapper.emitted('update:modelValue')).toBeTruthy();
|
||||
expect(wrapper.emitted('update:modelValue')[0]).toEqual(['123']);
|
||||
|
@ -46,37 +47,36 @@ describe('VnInput', () => {
|
|||
describe('styleAttrs', () => {
|
||||
it('should return empty styleAttrs when isOutlined is false', async () => {
|
||||
generateWrapper('123', false, false, false);
|
||||
expect(vm.styleAttrs).toEqual({});
|
||||
expect(vm.styleAttrs).toEqual({});
|
||||
});
|
||||
|
||||
it('should set styleAttrs when isOutlined is true', async () => {
|
||||
it('should set styleAttrs when isOutlined is true', async () => {
|
||||
generateWrapper('123', true, false, false);
|
||||
expect(vm.styleAttrs.outlined).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('handleKeydown', () => {
|
||||
describe('handleKeydown', () => {
|
||||
it('should do nothing when "Backspace" key is pressed', async () => {
|
||||
generateWrapper('12345', false, false, true);
|
||||
await input.trigger('keydown', { key: 'Backspace' });
|
||||
expect(wrapper.emitted('update:modelValue')).toBeUndefined();
|
||||
const spyhandler = vi.spyOn(vm, 'handleInsertMode');
|
||||
expect(spyhandler).not.toHaveBeenCalled();
|
||||
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
TODO: #8399 REDMINE
|
||||
*/
|
||||
it.skip('handleKeydown respects insertable behavior', async () => {
|
||||
it('handleKeydown respects insertable behavior', async () => {
|
||||
const expectedValue = '12345';
|
||||
generateWrapper('1234', false, false, true);
|
||||
vm.focus()
|
||||
vm.focus();
|
||||
await input.trigger('keydown', { key: '5' });
|
||||
await vm.$nextTick();
|
||||
expect(wrapper.emitted('update:modelValue')).toBeTruthy();
|
||||
expect(wrapper.emitted('update:modelValue')[0]).toEqual([expectedValue ]);
|
||||
expect(vm.value).toBe( expectedValue);
|
||||
expect(wrapper.emitted('update:modelValue')[0]).toEqual([expectedValue]);
|
||||
expect(vm.value).toBe(expectedValue);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -86,6 +86,6 @@ describe('VnInput', () => {
|
|||
const focusSpy = vi.spyOn(input.element, 'focus');
|
||||
vm.focus();
|
||||
expect(focusSpy).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -6,37 +6,44 @@ import { buildFilter } from 'filters/filterPanel';
|
|||
import { isDialogOpened } from 'src/filters';
|
||||
|
||||
export function useArrayData(key, userOptions) {
|
||||
let route = null;
|
||||
let router = null;
|
||||
// let route = null;
|
||||
// let router = null;
|
||||
|
||||
// // Si no hay key, intentamos obtenerla del route
|
||||
// if (!key) {
|
||||
// key = initialRoute?.meta?.moduleName;
|
||||
// route = initialRoute;
|
||||
// router = initialRouter;
|
||||
// }
|
||||
key ??= useRoute().meta.moduleName;
|
||||
|
||||
// Si no hay key, intentamos obtenerla del route
|
||||
if (!key) {
|
||||
key = initialRoute?.meta?.moduleName;
|
||||
route = initialRoute;
|
||||
router = initialRouter;
|
||||
}
|
||||
if (!key) throw new Error('ArrayData: A key is required to use this composable');
|
||||
const arrayDataStore = useArrayDataStore(); // Move inside function
|
||||
|
||||
if (!arrayDataStore.get(key)) arrayDataStore.set(key);
|
||||
|
||||
const store = arrayDataStore.get(key);
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
let canceller = null;
|
||||
|
||||
const { route: initialRoute, router: initialRouter } = (() => {
|
||||
if (!route) route = useRoute();
|
||||
if (!router) router = useRouter();
|
||||
return { route, router };
|
||||
})();
|
||||
// const { route: initialRoute, router: initialRouter } = (() => {
|
||||
// if (!route) route = useRoute();
|
||||
// if (!router) router = useRouter();
|
||||
// return { route, router };
|
||||
// })();
|
||||
onMounted(() => {
|
||||
setOptions();
|
||||
reset(['skip']);
|
||||
route = initialRoute;
|
||||
router = initialRouter;
|
||||
// route = initialRoute;
|
||||
// router = initialRouter;
|
||||
const query = route.query;
|
||||
const searchUrl = store.searchUrl;
|
||||
const query = route.query[searchUrl];
|
||||
if (query) {
|
||||
const params = JSON.parse(query);
|
||||
// const query = route.query[searchUrl];
|
||||
// if (query) {
|
||||
if (query[searchUrl]) {
|
||||
const params = JSON.parse(query[searchUrl]);
|
||||
// const params = JSON.parse(query);
|
||||
const filter =
|
||||
params?.filter && typeof params?.filter == 'object'
|
||||
? params?.filter
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// <reference types="cypress" />
|
||||
describe.skip('ClaimAction', () => {
|
||||
describe('ClaimAction', () => {
|
||||
const claimId = 1;
|
||||
|
||||
const firstRow = 'tbody > :nth-child(1)';
|
||||
|
@ -16,13 +16,13 @@ describe.skip('ClaimAction', () => {
|
|||
});
|
||||
|
||||
// https://redmine.verdnatura.es/issues/8756
|
||||
xit('should change destination', () => {
|
||||
it.skip('should change destination', () => {
|
||||
const rowData = [true, null, null, 'Bueno'];
|
||||
cy.fillRow(firstRow, rowData);
|
||||
});
|
||||
|
||||
// https://redmine.verdnatura.es/issues/8756
|
||||
xit('should change destination from other button', () => {
|
||||
it.skip('should change destination from other button', () => {
|
||||
const rowData = [true];
|
||||
|
||||
cy.fillRow(firstRow, rowData);
|
||||
|
@ -36,7 +36,7 @@ describe.skip('ClaimAction', () => {
|
|||
});
|
||||
|
||||
// https://redmine.verdnatura.es/issues/8756
|
||||
xit('should remove the line', () => {
|
||||
it.skip('should remove the line', () => {
|
||||
cy.fillRow(firstRow, [true]);
|
||||
cy.removeCard();
|
||||
cy.clickConfirm();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// <reference types="cypress" />
|
||||
describe.skip('ClaimDevelopment', () => {
|
||||
describe('ClaimDevelopment', () => {
|
||||
const claimId = 1;
|
||||
const firstLineReason = 'tbody > :nth-child(1) > :nth-child(2)';
|
||||
const thirdRow = 'tbody > :nth-child(3)';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// <reference types="cypress" />
|
||||
describe.skip('Client list', () => {
|
||||
describe('Client list', () => {
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.visit('/#/customer/list', {
|
||||
|
|
|
@ -54,7 +54,7 @@ describe('InvoiceInDescriptor', () => {
|
|||
});
|
||||
});
|
||||
// https://redmine.verdnatura.es/issues/8767
|
||||
it.skip('should download the file properly', () => {
|
||||
it('should download the file properly', () => {
|
||||
cy.visit('/#/invoice-in/1/summary');
|
||||
cy.validateDownload(() => cy.selectDescriptorOption(5));
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ describe('InvoiceOut negative bases', () => {
|
|||
cy.visit(`/#/invoice-out/negative-bases`);
|
||||
});
|
||||
|
||||
it.skip('should open the posible descriptors', () => {
|
||||
it('should open the posible descriptors', () => {
|
||||
cy.get(getDescriptors('clientId')).click();
|
||||
cy.get('.descriptor').should('be.visible');
|
||||
cy.get('.q-item > .q-item__label').should('include.text', '1101');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// <reference types="cypress" />
|
||||
|
||||
describe.skip('Item list', () => {
|
||||
describe('Item list', () => {
|
||||
beforeEach(() => {
|
||||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// <reference types="cypress" />
|
||||
describe.skip('Logout', () => {
|
||||
describe('Logout', () => {
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/dashboard`);
|
||||
|
|
|
@ -34,7 +34,7 @@ describe('OrderCatalog', () => {
|
|||
searchByCustomTagInput('Silver');
|
||||
});
|
||||
|
||||
it.skip('filters by custom value dialog', () => {
|
||||
it('filters by custom value dialog', () => {
|
||||
Cypress.on('uncaught:exception', (err) => {
|
||||
if (err.message.includes('canceled')) {
|
||||
return false;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
describe.skip('RouteAutonomous', () => {
|
||||
describe('RouteAutonomous', () => {
|
||||
const getLinkSelector = (colField) =>
|
||||
`tr:first-child > [data-col-field="${colField}"] > .no-padding > .link`;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
describe.skip('Route extended list', () => {
|
||||
describe('Route extended list', () => {
|
||||
const getSelector = (colField) => `tr:last-child > [data-col-field="${colField}"]`;
|
||||
|
||||
const selectors = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// <reference types="cypress" />
|
||||
// https://redmine.verdnatura.es/issues/8848
|
||||
describe.skip('VnShortcuts', () => {
|
||||
describe('VnShortcuts', () => {
|
||||
const modules = {
|
||||
item: 'a',
|
||||
customer: 'c',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
describe.skip('WorkerBusiness', () => {
|
||||
describe('WorkerBusiness', () => {
|
||||
const saveBtn = '.q-mt-lg > .q-btn--standard';
|
||||
const contributionCode = `Representantes de comercio`;
|
||||
const contractType = `INDEFINIDO A TIEMPO COMPLETO`;
|
||||
|
|
|
@ -18,7 +18,7 @@ describe('ZoneWarehouse', () => {
|
|||
cy.checkNotification(dataError);
|
||||
});
|
||||
|
||||
it.skip('should create & remove a warehouse', () => {
|
||||
it('should create & remove a warehouse', () => {
|
||||
cy.addBtnClick();
|
||||
cy.fillInForm(data);
|
||||
cy.get(saveBtn).click();
|
||||
|
|
Loading…
Reference in New Issue