test: refs #8862 add Cypress isolation tests for various ticket and zone components
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Benjamin Esteve 2025-04-10 12:57:09 +02:00
parent d24e153033
commit b22d693a44
57 changed files with 16 additions and 6 deletions

View File

@ -1,6 +1,9 @@
import { defineConfig } from 'cypress';
let urlHost, reporter, reporterOptions, timeouts;
let urlHost;
let reporter;
let reporterOptions;
let timeouts;
if (process.env.CI) {
urlHost = 'front';
@ -50,6 +53,12 @@ export default defineConfig({
watchForFileChanges: true,
reporter,
reporterOptions,
setupNodeEvents(on, config) {
if (config.specPattern.includes('isolation.spec.js')) {
config.testIsolation = true;
}
return config;
},
component: {
componentFolder: 'src',
testFiles: '**/*.spec.js',
@ -60,5 +69,6 @@ export default defineConfig({
...timeouts,
includeShadowDom: true,
waitForAnimations: true,
testIsolation: false,
},
});

View File

@ -9,9 +9,9 @@ describe('Client consignee', () => {
cy.get('.q-card').should('be.visible');
});
it('check as equalizated', function () {
it('check as equalizated', () => {
cy.get('.q-card__section > .address-card').then(($el) => {
let addressCards_before = $el.length;
const addressCards_before = $el.length;
cy.get('.q-page-sticky > div > .q-btn').click();
const addressName = 'test';

View File

@ -53,15 +53,15 @@ describe('VnLocation', () => {
cy.waitForElement('.q-card');
cy.get(inputLocation).click();
});
it('Show all options', function () {
it('Show all options', () => {
cy.get(locationOptions).should('have.length.at.least', 5);
});
it('input filter location as "al"', function () {
it('input filter location as "al"', () => {
cy.get(inputLocation).clear();
cy.get(inputLocation).type('al');
cy.get(locationOptions).should('have.length.at.least', 4);
});
it('input filter location as "ecuador"', function () {
it('input filter location as "ecuador"', () => {
cy.get(inputLocation).clear();
cy.get(inputLocation).type('ecuador');
cy.get(locationOptions).should('have.length.at.least', 1);