DEP: #6394 - Fix bugs VnFilterPanel navigation #193
|
@ -2,6 +2,7 @@ const { defineConfig } = require('cypress');
|
||||||
|
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
|
experimentalStudio: true,
|
||||||
baseUrl: 'http://localhost:9000/',
|
baseUrl: 'http://localhost:9000/',
|
||||||
fixturesFolder: 'test/cypress/fixtures',
|
fixturesFolder: 'test/cypress/fixtures',
|
||||||
screenshotsFolder: 'test/cypress/screenshots',
|
screenshotsFolder: 'test/cypress/screenshots',
|
||||||
|
|
|
@ -73,6 +73,7 @@ watch(
|
||||||
} else {
|
} else {
|
||||||
const parsedParams = JSON.parse(val);
|
const parsedParams = JSON.parse(val);
|
||||||
userParams.value = { ...parsedParams };
|
userParams.value = { ...parsedParams };
|
||||||
|
search();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -84,9 +85,9 @@ async function search() {
|
||||||
store.userParamsChanged = true;
|
store.userParamsChanged = true;
|
||||||
store.filter.skip = 0;
|
store.filter.skip = 0;
|
||||||
store.skip = 0;
|
store.skip = 0;
|
||||||
|
store.userParams = params;
|
||||||
const { params: newParams } = await arrayData.addFilter({ params });
|
const { params: newParams } = await arrayData.addFilter({ params });
|
||||||
userParams.value = newParams;
|
userParams.value = newParams;
|
||||||
|
|
||||||
if (!props.showAll && !Object.values(params).length) store.data = [];
|
if (!props.showAll && !Object.values(params).length) store.data = [];
|
||||||
|
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
|
|
|
@ -27,6 +27,8 @@ export function useArrayData(key, userOptions) {
|
||||||
const query = route.query;
|
const query = route.query;
|
||||||
if (query.params) {
|
if (query.params) {
|
||||||
store.userParams = JSON.parse(query.params);
|
store.userParams = JSON.parse(query.params);
|
||||||
|
store.skip = 0;
|
||||||
|
store.filter.skip = 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,11 @@ describe('InvoiceInList', () => {
|
||||||
':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
|
':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
|
||||||
const firstDetailBtn = '.q-card:nth-child(1) .q-btn:nth-child(2)';
|
const firstDetailBtn = '.q-card:nth-child(1) .q-btn:nth-child(2)';
|
||||||
const summaryHeaders = '.summaryBody .header';
|
const summaryHeaders = '.summaryBody .header';
|
||||||
const screen = '.q-page-container > .q-drawer-container > .fullscreen';
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-in/list`);
|
cy.visit(`/#/invoice-in/list`);
|
||||||
cy.get(screen).click();
|
cy.closeRightMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should redirect on clicking a invoice', () => {
|
it('should redirect on clicking a invoice', () => {
|
||||||
|
|
|
@ -170,6 +170,11 @@ Cypress.Commands.add('openRightMenu', (element) => {
|
||||||
cy.get('#actions-append').click();
|
cy.get('#actions-append').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add('closeRightMenu', (element) => {
|
||||||
|
if (element) cy.waitForElement(element);
|
||||||
|
cy.get('.q-page-container > .q-drawer-container > .fullscreen').click();
|
||||||
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('openLeftMenu', (element) => {
|
Cypress.Commands.add('openLeftMenu', (element) => {
|
||||||
if (element) cy.waitForElement(element);
|
if (element) cy.waitForElement(element);
|
||||||
cy.get('.q-toolbar > .q-btn--round.q-btn--dense > .q-btn__content > .q-icon').click();
|
cy.get('.q-toolbar > .q-btn--round.q-btn--dense > .q-btn__content > .q-icon').click();
|
||||||
|
|
Loading…
Reference in New Issue