From 68452aefe6bee57a209a97410cb9f4563c0159c5 Mon Sep 17 00:00:00 2001 From: jon Date: Thu, 15 May 2025 14:49:39 +0200 Subject: [PATCH] fix: refs #8944 zone calendar e2e --- .../integration/zone/zoneCalendar.spec.js | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/test/cypress/integration/zone/zoneCalendar.spec.js b/test/cypress/integration/zone/zoneCalendar.spec.js index 9311ec893..aa745bd7c 100644 --- a/test/cypress/integration/zone/zoneCalendar.spec.js +++ b/test/cypress/integration/zone/zoneCalendar.spec.js @@ -40,7 +40,7 @@ describe('ZoneCalendar', { testIsolation: true }, () => { it('should exclude an event', () => { cy.get('.q-mb-sm > .q-radio__inner').click(); cy.get('.q-current-day > .q-calendar-month__day--label__wrapper').click(); - cy.get('.q-mt-lg > .q-btn--standard').click(); + cy.get(submitBtn).click(); cy.get( '.q-current-day > .q-calendar-month__day--content > [data-cy="ZoneCalendarDay"]', ).click(); @@ -48,21 +48,15 @@ describe('ZoneCalendar', { testIsolation: true }, () => { cy.dataCy('VnConfirm_confirm').click(); }); - it( - 'should not exclude an event if there are tickets for that zone and day', - { testIsoaltion: true }, - () => { - cy.visit(`/#/zone/3/events`); - cy.get('.q-mb-sm > .q-radio__inner').click(); - cy.get( - '.q-current-day > .q-calendar-month__day--content > [data-cy="ZoneCalendarDay"]', - ).click(); - cy.intercept('GET', /\/api\/Tickets/).as('tickets'); - cy.get('.q-mt-lg > .q-btn--standard').click(); - cy.wait('@tickets'); - cy.checkNotification( - 'Can not close this zone because there are tickets programmed for that day', - ); - }, - ); + it('should not exclude an event if there are tickets for that zone and day', () => { + cy.get('[data-cy="vn-searchbar_input"]').type('3{enter}'); + cy.get('[aria-label="Exclude"] > .q-radio__label').click(); + cy.get( + '.q-current-day > .q-calendar-month__day--content > [data-cy="ZoneCalendarDay"]', + ).click(); + cy.get(submitBtn).click(); + cy.checkNotification( + 'Can not close this zone because there are tickets programmed for that day', + ); + }); });