Skip to content

Commit

Permalink
fix: increase timeouts to ensure proper loading of pages
Browse files Browse the repository at this point in the history
Signed-off-by: vikhy-aws <[email protected]>
  • Loading branch information
vikhy-aws committed Jan 7, 2025
1 parent dc739fe commit 7914769
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cypress/integration/acknowledge_alerts_modal_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const QUERY_TRIGGER = 'sample_alerts_flyout_query_level_trigger';

const TWENTY_SECONDS = 20000;

const SIXTY_SECONDS = 60000;

describe('AcknowledgeAlertsModal', () => {
before(() => {
// Delete any existing monitors
Expand All @@ -29,11 +31,11 @@ describe('AcknowledgeAlertsModal', () => {
cy.createMonitor(sampleAlertsFlyoutQueryMonitor);

// Visit Alerting OpenSearch Dashboards
cy.visit(`${Cypress.env('opensearch_dashboards')}/app/${PLUGIN_NAME}#/monitors`, { timeout: 30000 });
cy.visit(`${Cypress.env('opensearch_dashboards')}/app/${PLUGIN_NAME}#/monitors`, { timeout: SIXTY_SECONDS });

// Confirm test monitors were created successfully
cy.contains(BUCKET_MONITOR, { timeout: TWENTY_SECONDS });
cy.contains(QUERY_MONITOR, { timeout: TWENTY_SECONDS });
cy.contains(BUCKET_MONITOR, { timeout: SIXTY_SECONDS });
cy.contains(QUERY_MONITOR, { timeout: SIXTY_SECONDS });

// Wait 1 minute for the test monitors to trigger alerts, then go to the 'Alerts by trigger' dashboard page to view alerts
cy.wait(60000);
Expand All @@ -44,8 +46,8 @@ describe('AcknowledgeAlertsModal', () => {
cy.visit(`${Cypress.env('opensearch_dashboards')}/app/${PLUGIN_NAME}#/dashboard`);

// Confirm dashboard is displaying rows for the test monitors.
cy.contains(BUCKET_MONITOR, { timeout: TWENTY_SECONDS });
cy.contains(QUERY_MONITOR, { timeout: TWENTY_SECONDS });
cy.contains(BUCKET_MONITOR, { timeout: SIXTY_SECONDS });
cy.contains(QUERY_MONITOR, { timeout: SIXTY_SECONDS });
});

it('Acknowledge button disabled when more than 1 trigger selected', () => {
Expand Down

0 comments on commit 7914769

Please sign in to comment.