From d913eba277e1dfd136ceff037fa074e553259a40 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 9 Dec 2024 15:18:45 -0300 Subject: [PATCH] Tests adjustments --- .../integration/admin/PhotosView.spec.js | 1 + .../checkout/CheckoutStepper.commands.js | 2 +- .../integration/config/AccountConfig.spec.js | 1 + src/test/cypress/reports/index.html | 17 +++++++++++++++++ src/test/cypress/support/commands.js | 2 +- 5 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/test/cypress/reports/index.html diff --git a/src/test/cypress/integration/admin/PhotosView.spec.js b/src/test/cypress/integration/admin/PhotosView.spec.js index 3df15fb6..f5253b4e 100644 --- a/src/test/cypress/integration/admin/PhotosView.spec.js +++ b/src/test/cypress/integration/admin/PhotosView.spec.js @@ -15,6 +15,7 @@ describe('Photo Uploader Component', () => { it('should allow selecting a photo collection', () => { // Simular la selección de una colección de fotos + cy.wait(500); cy.selectOption('[data-testid="photoCollectionSelect"]', 'Enlace'); cy.getValue('[data-testid="photoCollectionSelect"]').should( 'equal', diff --git a/src/test/cypress/integration/checkout/CheckoutStepper.commands.js b/src/test/cypress/integration/checkout/CheckoutStepper.commands.js index f9ae426c..827bab94 100644 --- a/src/test/cypress/integration/checkout/CheckoutStepper.commands.js +++ b/src/test/cypress/integration/checkout/CheckoutStepper.commands.js @@ -1,5 +1,5 @@ const checkoutNextStep = () => { - cy.dataCy('checkoutStepperRightButton').should('be.visible').click(); + cy.dataCy('checkoutStepperRightButton').last().should('be.visible').click(); }; Cypress.Commands.add('createOrderReceive', () => { diff --git a/src/test/cypress/integration/config/AccountConfig.spec.js b/src/test/cypress/integration/config/AccountConfig.spec.js index 97cd10dc..c2309589 100644 --- a/src/test/cypress/integration/config/AccountConfig.spec.js +++ b/src/test/cypress/integration/config/AccountConfig.spec.js @@ -11,6 +11,7 @@ describe('Changes user nickname', () => { it('changes site lang when changing user lang', () => { cy.dataCy('configViewLang').should('exist'); + cy.wait(500); cy.selectOption('[data-testid="configViewLang"]', 'Español'); cy.dataCy('headerTitle').should('contain', 'Configuración'); cy.selectOption('[data-testid="configViewLang"]', 'English'); diff --git a/src/test/cypress/reports/index.html b/src/test/cypress/reports/index.html new file mode 100644 index 00000000..785bb0d1 --- /dev/null +++ b/src/test/cypress/reports/index.html @@ -0,0 +1,17 @@ + +Hedera-Web E2E Reporter
\ No newline at end of file diff --git a/src/test/cypress/support/commands.js b/src/test/cypress/support/commands.js index b4ec3d42..b5befaf4 100644 --- a/src/test/cypress/support/commands.js +++ b/src/test/cypress/support/commands.js @@ -80,7 +80,7 @@ Cypress.Commands.add('setSessionStorage', (key, value) => { }); Cypress.Commands.add('resetDB', () => { - cy.exec('npm run resetDatabase'); + cy.exec('pnpm run db'); }); Cypress.Commands.add('setConfirmDialog', () => {