diff --git a/test/cypress/integration/monitor/monitorTicket.spec.js b/test/cypress/integration/monitor/monitorTicket.spec.js index f887293a5..c5d2c30a8 100644 --- a/test/cypress/integration/monitor/monitorTicket.spec.js +++ b/test/cypress/integration/monitor/monitorTicket.spec.js @@ -10,8 +10,21 @@ describe('Monitor Tickets Table', () => { cy.intercept('GET', '**/SalesMonitors/salesFilter*').as('filterRequest'); cy.openFilterPanel(); }); + it.only('should open new tab when ctrl+click on client link', () => { + cy.intercept('GET', '**/SalesMonitors/salesFilter*').as('filterRequest'); - it.only('should filter by column headers and update URL params', () => { + // Mock window.open behavior since Cypress doesn't support multiple tabs + cy.window().then((win) => { + cy.stub(win, 'open').as('windowOpen'); + }); + + // Find and ctrl+click the client link in first row + cy.get(firstRow('provinceFk')).click({ ctrlKey: true }); + + // Verify window.open was called with correct URL + cy.get('@windowOpen').should('be.calledWithMatch', /\/ticket\/\d+\/sale/); + }); + it('should filter by column headers and update URL params', () => { cy.intercept('GET', '**/SalesMonitors/salesFilter*').as('filterRequest'); cy.dataCy('column-filter-id').find(' [data-cy="_input"]').type('13');