diff --git a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/create_detector_spec.js b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/create_detector_spec.js index 556e0b981..a1829941a 100644 --- a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/create_detector_spec.js +++ b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/create_detector_spec.js @@ -15,6 +15,7 @@ context('Create detector workflow', () => { // Index some sample data first beforeEach(() => { + cy.visit(AD_URL.OVERVIEW, { timeout: 10000 }); cy.deleteAllIndices(); cy.deleteADSystemIndices(); cy.fixture(AD_FIXTURE_BASE_PATH + 'sample_test_data.txt').then((data) => { diff --git a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/detector_configuration_spec.js b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/detector_configuration_spec.js index 66b4f97ac..c4a626e9d 100644 --- a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/detector_configuration_spec.js +++ b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/detector_configuration_spec.js @@ -9,6 +9,7 @@ context('Detector configuration page', () => { // Creating a sample detector and visiting the config page. Stopping the detector // for easier checks when editing detector before(() => { + cy.visit(AD_URL.OVERVIEW, { timeout: 10000 }); cy.deleteAllIndices(); cy.deleteADSystemIndices(); cy.visit(AD_URL.OVERVIEW); diff --git a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/historical_analysis_spec.js b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/historical_analysis_spec.js index 1cf93e8c9..929814808 100644 --- a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/historical_analysis_spec.js +++ b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/historical_analysis_spec.js @@ -52,10 +52,12 @@ describe('Historical results page', () => { // Creating a sample detector and visiting the config page before(() => { + cy.visit(AD_URL.OVERVIEW, { timeout: 10000 }); cy.deleteAllIndices(); cy.deleteADSystemIndices(); cy.wait(5000); - cy.visit(AD_URL.OVERVIEW); + cy.visit(AD_URL.OVERVIEW, { timeout: 10000 }); + cy.wait(2000); cy.get('[data-test-subj=createHttpSampleDetectorButton]').then(() => { cy.getElementByTestId('createHttpSampleDetectorButton').click(); cy.wait(10000); diff --git a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/overview_spec.js b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/overview_spec.js index c8e7acb9c..26b1cdb46 100644 --- a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/overview_spec.js +++ b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/overview_spec.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { AD_URL } from '../../../utils/constants'; +import { AD_URL } from '../../../utils/plugins/anomaly-detection-dashboards-plugin/constants'; context('Overview page', () => { function validatePageElements() { diff --git a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/sample_detector_spec.js b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/sample_detector_spec.js index ebcab7e29..8fcb07f89 100644 --- a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/sample_detector_spec.js +++ b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/sample_detector_spec.js @@ -4,8 +4,12 @@ */ import { createSampleDetector } from '../../../utils/helpers'; +import { AD_URL } from '../../../utils/plugins/anomaly-detection-dashboards-plugin/constants'; context('Sample detectors', () => { + before(() => { + cy.visit(AD_URL.OVERVIEW, { timeout: 10000 }); + }); beforeEach(() => { cy.deleteAllIndices(); cy.deleteADSystemIndices(); diff --git a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/associate_detector_spec.js b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/associate_detector_spec.js index 042546d83..e345b7d53 100644 --- a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/associate_detector_spec.js +++ b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/associate_detector_spec.js @@ -20,6 +20,7 @@ import { INDEX_SETTINGS_FILEPATH_SIMPLE, SAMPLE_DATA_FILEPATH_SIMPLE, } from '../../../../utils/constants'; +import { AD_URL } from '../../../../utils/plugins/anomaly-detection-dashboards-plugin/constants'; describe('Anomaly detection integration with vis augmenter', () => { const indexName = 'ad-vis-augmenter-sample-index'; @@ -51,6 +52,7 @@ describe('Anomaly detection integration with vis augmenter', () => { dashboardName, [visualizationSpec] ); + cy.visit(AD_URL.OVERVIEW, { timeout: 10000 }); }); after(() => { diff --git a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/augment_vis_saved_object_spec.js b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/augment_vis_saved_object_spec.js index 1f02b0f90..76827c712 100644 --- a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/augment_vis_saved_object_spec.js +++ b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/augment_vis_saved_object_spec.js @@ -18,6 +18,7 @@ import { INDEX_SETTINGS_FILEPATH_SIMPLE, SAMPLE_DATA_FILEPATH_SIMPLE, } from '../../../../utils/constants'; +import { AD_URL } from '../../../../utils/plugins/anomaly-detection-dashboards-plugin/constants'; describe('AD augment-vis saved objects', () => { const commonUI = new CommonUI(cy); @@ -50,6 +51,7 @@ describe('AD augment-vis saved objects', () => { dashboardName, [visualizationSpec] ); + cy.visit(AD_URL.OVERVIEW, { timeout: 10000 }); }); after(() => { diff --git a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/view_anomaly_events_spec.js b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/view_anomaly_events_spec.js index 40583a39f..b195edeaf 100644 --- a/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/view_anomaly_events_spec.js +++ b/cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/view_anomaly_events_spec.js @@ -17,6 +17,7 @@ import { INDEX_SETTINGS_FILEPATH_SIMPLE, SAMPLE_DATA_FILEPATH_SIMPLE, } from '../../../../utils/constants'; +import { AD_URL } from '../../../../utils/plugins/anomaly-detection-dashboards-plugin/constants'; describe('View anomaly events in flyout', () => { const indexName = 'ad-vis-augmenter-sample-index'; @@ -48,6 +49,7 @@ describe('View anomaly events in flyout', () => { dashboardName, [visualizationSpec] ); + cy.visit(AD_URL.OVERVIEW, { timeout: 10000 }); }); after(() => {