0
0
Fork 0

refs #6394 test: e2e fix

This commit is contained in:
Javier Segarra 2024-02-19 09:16:39 +01:00
parent 5093d0b1a6
commit 79a5ba346b
4 changed files with 10 additions and 1 deletions

View File

@ -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',

View File

@ -1,7 +1,8 @@
<script setup> <script setup>
import { onMounted, ref, computed } from 'vue'; import { onMounted, ref, computed, watch } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useArrayData } from 'composables/useArrayData'; import { useArrayData } from 'composables/useArrayData';
import { useRoute } from 'vue-router';
import toDate from 'filters/toDate'; import toDate from 'filters/toDate';
import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue'; import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue';
@ -52,6 +53,7 @@ const emit = defineEmits(['refresh', 'clear', 'search', 'init', 'remove']);
const arrayData = useArrayData(props.dataKey, { const arrayData = useArrayData(props.dataKey, {
exprBuilder: props.exprBuilder, exprBuilder: props.exprBuilder,
}); });
const route = useRoute();
const store = arrayData.store; const store = arrayData.store;
const userParams = ref({}); const userParams = ref({});

View File

@ -9,6 +9,7 @@ describe('InvoiceInList', () => {
beforeEach(() => { beforeEach(() => {
cy.login('developer'); cy.login('developer');
cy.visit(`/#/invoice-in/list`); cy.visit(`/#/invoice-in/list`);
cy.closeRightMenu();
}); });
it('should redirect on clicking a invoice', () => { it('should redirect on clicking a invoice', () => {

View File

@ -163,6 +163,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();