diff --git a/cypress/integration/acknowledge_alerts_modal_spec.js b/cypress/integration/acknowledge_alerts_modal_spec.js index fd98cc32..4b1a5a47 100644 --- a/cypress/integration/acknowledge_alerts_modal_spec.js +++ b/cypress/integration/acknowledge_alerts_modal_spec.js @@ -46,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', () => { diff --git a/cypress/support/commands.js b/cypress/support/commands.js index c2b0a257..ca8c8197 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -3,6 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +const { method } = require('lodash'); const { API, ADMIN_AUTH } = require('./constants'); // *********************************************** @@ -71,7 +72,12 @@ Cypress.Commands.overwrite('request', (originalFn, ...args) => { }); Cypress.Commands.add('createMonitor', (monitorJSON) => { - cy.request('POST', `${Cypress.env('opensearch')}${API.MONITOR_BASE}`, monitorJSON); + cy.request({ + method: 'POST', + url: `${Cypress.env('opensearch')}${API.MONITOR_BASE}`, + body: monitorJSON, + timeout: 60000 + }); }); Cypress.Commands.add('createAndExecuteMonitor', (monitorJSON) => {