diff --git a/cypress.config.js b/cypress.config.js index 84ffc68a8..dfe963a12 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,11 +1,6 @@ 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, - reporter, - reporterOptions; +let urlHost, reporter, reporterOptions; if (process.env.CI) { urlHost = 'front'; @@ -30,12 +25,13 @@ if (process.env.CI) { export default defineConfig({ e2e: { baseUrl: `http://${urlHost}:9000`, - experimentalStudio: false, // Desactivado para evitar tiempos de espera innecesarios + experimentalStudio: false, defaultCommandTimeout: 10000, trashAssetsBeforeRuns: false, requestTimeout: 10000, responseTimeout: 30000, pageLoadTimeout: 60000, + defaultBrowser: 'chromium', fixturesFolder: 'test/cypress/fixtures', screenshotsFolder: 'test/cypress/screenshots', supportFile: 'test/cypress/support/index.js', @@ -51,23 +47,7 @@ export default defineConfig({ componentFolder: 'src', testFiles: '**/*.spec.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, viewportHeight: 720, }, diff --git a/test/cypress/integration/entry/entryList.spec.js b/test/cypress/integration/entry/entryList.spec.js index 4f99f0cb6..6a700c093 100644 --- a/test/cypress/integration/entry/entryList.spec.js +++ b/test/cypress/integration/entry/entryList.spec.js @@ -184,9 +184,8 @@ describe('Entry', () => { } function deleteEntry() { - cy.get('[data-cy="descriptor-more-opts"]').click(); - cy.waitForElement('div[data-cy="delete-entry"]'); - cy.get('div[data-cy="delete-entry"]').should('be.visible').click(); + cy.get('[data-cy="descriptor-more-opts"]').should('be.visible').click(); + cy.waitForElement('div[data-cy="delete-entry"]').click(); cy.url().should('include', 'list'); }