0
0
Fork 0

Compare commits

...

3 Commits

5 changed files with 11 additions and 3 deletions

View File

@ -2,6 +2,7 @@ const { defineConfig } = require('cypress');
module.exports = defineConfig({
e2e: {
experimentalStudio: true,
baseUrl: 'http://localhost:9000/',
fixturesFolder: 'test/cypress/fixtures',
screenshotsFolder: 'test/cypress/screenshots',

View File

@ -73,6 +73,7 @@ watch(
} else {
const parsedParams = JSON.parse(val);
userParams.value = { ...parsedParams };
search();
}
}
);
@ -84,9 +85,9 @@ async function search() {
store.userParamsChanged = true;
store.filter.skip = 0;
store.skip = 0;
store.userParams = params;
const { params: newParams } = await arrayData.addFilter({ params });
userParams.value = newParams;
if (!props.showAll && !Object.values(params).length) store.data = [];
isLoading.value = false;

View File

@ -27,6 +27,8 @@ export function useArrayData(key, userOptions) {
const query = route.query;
if (query.params) {
store.userParams = JSON.parse(query.params);
store.skip = 0;
store.filter.skip = 0;
}
});

View File

@ -5,12 +5,11 @@ describe('InvoiceInList', () => {
':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 summaryHeaders = '.summaryBody .header';
const screen = '.q-page-container > .q-drawer-container > .fullscreen';
beforeEach(() => {
cy.login('developer');
cy.visit(`/#/invoice-in/list`);
cy.get(screen).click();
cy.closeRightMenu();
});
it('should redirect on clicking a invoice', () => {

View File

@ -170,6 +170,11 @@ Cypress.Commands.add('openRightMenu', (element) => {
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) => {
if (element) cy.waitForElement(element);
cy.get('.q-toolbar > .q-btn--round.q-btn--dense > .q-btn__content > .q-icon').click();