From d4eebc55c2c39138bd2dd61b23301e1af5b78404 Mon Sep 17 00:00:00 2001 From: Sean Li Date: Thu, 28 Mar 2024 04:38:06 -0700 Subject: [PATCH] try global tenant in before hook Signed-off-by: Sean Li --- .../gantt-chart-dashboards/gantt_ui.spec.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/cypress/integration/plugins/gantt-chart-dashboards/gantt_ui.spec.js b/cypress/integration/plugins/gantt-chart-dashboards/gantt_ui.spec.js index 607ce6b6f..be475be68 100644 --- a/cypress/integration/plugins/gantt-chart-dashboards/gantt_ui.spec.js +++ b/cypress/integration/plugins/gantt-chart-dashboards/gantt_ui.spec.js @@ -56,8 +56,10 @@ describe('Dump test data', () => { }); describe('Save a gantt chart', { defaultCommandTimeout: 20000 }, () => { - beforeEach(() => { + before(() => { CURRENT_TENANT.newTenant = 'global'; + }); + beforeEach(() => { cy.visit(`${BASE_PATH}/app/visualize#`); }); @@ -81,8 +83,10 @@ describe( 'Render and configure a gantt chart', { defaultCommandTimeout: 20000 }, () => { - beforeEach(() => { + before(() => { CURRENT_TENANT.newTenant = 'global'; + }); + beforeEach(() => { cy.visit(`${BASE_PATH}/app/visualize#`); cy.get('.euiFieldSearch').focus().type(GANTT_VIS_NAME); cy.contains(GANTT_VIS_NAME).click({ force: true }); @@ -121,8 +125,10 @@ describe( ); describe('Configure panel settings', { defaultCommandTimeout: 20000 }, () => { - beforeEach(() => { + before(() => { CURRENT_TENANT.newTenant = 'global'; + }); + beforeEach(() => { cy.visit(`${BASE_PATH}/app/visualize#`); cy.get('.euiFieldSearch').focus().type(GANTT_VIS_NAME); cy.contains(GANTT_VIS_NAME).click({ force: true }); @@ -245,6 +251,9 @@ describe( 'Add gantt chart to dashboard', { defaultCommandTimeout: 20000 }, () => { + before(() => { + CURRENT_TENANT.newTenant = 'global'; + }); it('Adds gantt chart to dashboard', () => { cy.visit(`${BASE_PATH}/app/dashboards#/create`); cy.contains('Add an existing').click({ force: true });