From f7a6e3d4719bad97ea280bee2f0df881703b9701 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 27 May 2024 16:13:40 +0200 Subject: [PATCH 1/3] test(ClaimPhoto): refs #7589 fix e2e --- test/cypress/integration/claim/claimPhoto.spec.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js index 6ea1fd8b7..9b2978b19 100755 --- a/test/cypress/integration/claim/claimPhoto.spec.js +++ b/test/cypress/integration/claim/claimPhoto.spec.js @@ -21,8 +21,7 @@ describe('ClaimPhoto', () => { cy.get('.q-notification__message').should('have.text', 'Data saved'); }); - /* it.skip('should open first image dialog change to second and close', () => { - skiped fix on https://redmine.verdnatura.es/issues/7113 + it('should open first image dialog change to second and close', () => { cy.get( ':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image' ).click(); @@ -38,19 +37,23 @@ describe('ClaimPhoto', () => { cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should( 'not.be.visible' ); - }); */ + }); it('should remove third and fourth file', () => { cy.get( '.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon' ).click(); - cy.get('.q-btn--unelevated > .q-btn__content > .block').click(); + cy.get( + '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block' + ).click(); cy.get('.q-notification__message').should('have.text', 'Data deleted'); cy.get( '.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon' ).click(); - cy.get('.q-btn--unelevated > .q-btn__content > .block').click(); + cy.get( + '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block' + ).click(); cy.get('.q-notification__message').should('have.text', 'Data deleted'); }); }); From 3ae523ef040f9113aaae0971771cd4e693202abe Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 27 May 2024 16:52:53 +0200 Subject: [PATCH 2/3] test(WorkerList): refs #7589 fix e2e --- src/components/ui/CardSummary.vue | 17 +++++++++++++---- .../integration/worker/workerList.spec.js | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index 57d1cb19a..ae9a43578 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -56,11 +56,20 @@ async function fetch() { } const showRedirectToSummaryIcon = computed(() => { - const routeExists = route.matched.some( - (route) => route.name === `${route.meta.moduleName}Summary` - ); - return !isSummary.value && route.meta.moduleName && routeExists; + const exist = existSummary(route.matched); + return !isSummary.value && route.meta.moduleName && exist; }); + +function existSummary(routes) { + const hasSummary = routes.some((r) => r.name === `${route.meta.moduleName}Summary`); + if (hasSummary) return hasSummary; + for (const current of routes) { + if (current.path != '/' && current.children) { + const exist = existSummary(current.children); + if (exist) return exist; + } + } +}