Merge pull request 'test: refs #6897 enable 'Create entry, modify travel and add buys' test case' (!1470) from 6897-fixEntryE2e into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1470 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
f465b8219e
|
@ -1,11 +1,6 @@
|
||||||
import { defineConfig } from 'cypress';
|
import { defineConfig } from 'cypress';
|
||||||
// https://docs.cypress.io/app/tooling/reporters
|
|
||||||
// https://docs.cypress.io/app/references/configuration
|
|
||||||
// https://www.npmjs.com/package/cypress-mochawesome-reporter
|
|
||||||
|
|
||||||
let urlHost,
|
let urlHost, reporter, reporterOptions;
|
||||||
reporter,
|
|
||||||
reporterOptions;
|
|
||||||
|
|
||||||
if (process.env.CI) {
|
if (process.env.CI) {
|
||||||
urlHost = 'front';
|
urlHost = 'front';
|
||||||
|
@ -30,12 +25,13 @@ if (process.env.CI) {
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
baseUrl: `http://${urlHost}:9000`,
|
baseUrl: `http://${urlHost}:9000`,
|
||||||
experimentalStudio: false, // Desactivado para evitar tiempos de espera innecesarios
|
experimentalStudio: false,
|
||||||
defaultCommandTimeout: 10000,
|
defaultCommandTimeout: 10000,
|
||||||
trashAssetsBeforeRuns: false,
|
trashAssetsBeforeRuns: false,
|
||||||
requestTimeout: 10000,
|
requestTimeout: 10000,
|
||||||
responseTimeout: 30000,
|
responseTimeout: 30000,
|
||||||
pageLoadTimeout: 60000,
|
pageLoadTimeout: 60000,
|
||||||
|
defaultBrowser: 'chromium',
|
||||||
fixturesFolder: 'test/cypress/fixtures',
|
fixturesFolder: 'test/cypress/fixtures',
|
||||||
screenshotsFolder: 'test/cypress/screenshots',
|
screenshotsFolder: 'test/cypress/screenshots',
|
||||||
supportFile: 'test/cypress/support/index.js',
|
supportFile: 'test/cypress/support/index.js',
|
||||||
|
@ -51,23 +47,7 @@ export default defineConfig({
|
||||||
componentFolder: 'src',
|
componentFolder: 'src',
|
||||||
testFiles: '**/*.spec.js',
|
testFiles: '**/*.spec.js',
|
||||||
supportFile: 'test/cypress/support/unit.js',
|
supportFile: 'test/cypress/support/unit.js',
|
||||||
},/*
|
},
|
||||||
setupNodeEvents: async (on, config) => {
|
|
||||||
const plugin = await import('cypress-mochawesome-reporter/plugin');
|
|
||||||
plugin.default(on);
|
|
||||||
const fs = await import('fs');
|
|
||||||
on('task', {
|
|
||||||
deleteFile(filePath) {
|
|
||||||
if (fs.existsSync(filePath)) {
|
|
||||||
fs.unlinkSync(filePath);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return config;
|
|
||||||
},*/
|
|
||||||
viewportWidth: 1280,
|
viewportWidth: 1280,
|
||||||
viewportHeight: 720,
|
viewportHeight: 720,
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,7 +20,7 @@ describe('Entry', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('Create entry, modify travel and add buys', () => {
|
it('Create entry, modify travel and add buys', () => {
|
||||||
createEntryAndBuy();
|
createEntryAndBuy();
|
||||||
cy.get('a[data-cy="EntryBasicData-menu-item"]').click();
|
cy.get('a[data-cy="EntryBasicData-menu-item"]').click();
|
||||||
selectTravel('two');
|
selectTravel('two');
|
||||||
|
@ -184,9 +184,8 @@ describe('Entry', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteEntry() {
|
function deleteEntry() {
|
||||||
cy.get('[data-cy="descriptor-more-opts"]').click();
|
cy.get('[data-cy="descriptor-more-opts"]').should('be.visible').click();
|
||||||
cy.waitForElement('div[data-cy="delete-entry"]');
|
cy.waitForElement('div[data-cy="delete-entry"]').click();
|
||||||
cy.get('div[data-cy="delete-entry"]').should('be.visible').click();
|
|
||||||
cy.url().should('include', 'list');
|
cy.url().should('include', 'list');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue