diff --git a/.github/workflows/cypress-workflow.yml b/.github/workflows/cypress-workflow.yml
index 442c41fb2..6407f550d 100644
--- a/.github/workflows/cypress-workflow.yml
+++ b/.github/workflows/cypress-workflow.yml
@@ -77,13 +77,13 @@ jobs:
command: yarn run cypress run
# Screenshots are only captured on failure, will change this once we do visual regression tests
- - uses: actions/upload-artifact@v1
+ - uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: OpenSearch-Dashboards/plugins/alerting-dashboards-plugin/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- - uses: actions/upload-artifact@v1
+ - uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml
index f50a6e7e3..c8428744b 100644
--- a/.github/workflows/release-workflow.yml
+++ b/.github/workflows/release-workflow.yml
@@ -89,7 +89,7 @@ jobs:
asset_path: ${{ steps.build_zip.outputs.zip_path }}
asset_content_type: application/zip
- name: Upload Workflow Artifacts
- uses: actions/upload-artifact@v1
+ uses: actions/upload-artifact@v4
with:
name: alerting-plugin
path: ${{ steps.build_zip.outputs.zip_path }}
diff --git a/cypress/integration/bucket_level_monitor_spec.js b/cypress/integration/bucket_level_monitor_spec.js
index 1d8077af0..766bdba6b 100644
--- a/cypress/integration/bucket_level_monitor_spec.js
+++ b/cypress/integration/bucket_level_monitor_spec.js
@@ -338,8 +338,8 @@ describe('Bucket-Level Monitors', () => {
// Add a trigger
addTriggerToVisualEditorMonitor(SAMPLE_TRIGGER, 0, SAMPLE_ACTION, true);
- // Click update button to save monitor changes
- cy.get('button').contains('Update').last().click({ force: true });
+ // Click save to save monitor changes
+ cy.get('button').contains('Save').last().click({ force: true });
// Confirm we can see only one row in the trigger list by checking
element
cy.contains('This table contains 1 row');
@@ -375,8 +375,8 @@ describe('Bucket-Level Monitors', () => {
timeout: 25000,
});
- // Click the update button
- cy.get('button').contains('Update').last().click({ force: true });
+ // Click the save button
+ cy.get('button').contains('Save').last().click({ force: true });
// Confirm we're on the Monitor Details page by searching for the History element
cy.contains('History', { timeout: 20000 });
diff --git a/cypress/integration/cluster_metrics_monitor_spec.js b/cypress/integration/cluster_metrics_monitor_spec.js
index e66145e7c..2ba38e5bf 100644
--- a/cypress/integration/cluster_metrics_monitor_spec.js
+++ b/cypress/integration/cluster_metrics_monitor_spec.js
@@ -369,8 +369,8 @@ describe('ClusterMetricsMonitor', () => {
'ctx.results[0].number_of_pending_tasks >= 0'
);
- // Click update button to save monitor changes
- cy.get('button').contains('Update').last().click({ force: true });
+ // Click save button to save monitor changes
+ cy.get('button').contains('Save').last().click({ force: true });
// Confirm we can see only one row in the trigger list by checking
element
cy.contains('This table contains 1 row');
diff --git a/cypress/integration/composite_level_monitor_spec.js b/cypress/integration/composite_level_monitor_spec.js
index dc2c72cf4..9bf785dea 100644
--- a/cypress/integration/composite_level_monitor_spec.js
+++ b/cypress/integration/composite_level_monitor_spec.js
@@ -75,7 +75,7 @@ describe('CompositeLevelMonitor', () => {
.type('{backspace}')
.type('Composite trigger');
- cy.intercept('api/alerting/workflows').as('createMonitorRequest');
+ cy.intercept('api/alerting/workflows*').as('createMonitorRequest');
cy.intercept(`api/alerting/monitors?*`).as('getMonitorsRequest');
cy.get('button').contains('Create').click({ force: true });
@@ -116,7 +116,7 @@ describe('CompositeLevelMonitor', () => {
cy.visit(
`${Cypress.env('opensearch_dashboards')}/app/${PLUGIN_NAME}#/monitors/${
createdMonitor._id
- }?action=update-monitor&type=workflow`
+ }?action=update-monitor&type=workflow&dataSourceId=`
);
} else {
cy.log('Failed to get created monitor ', SAMPLE_VISUAL_EDITOR_MONITOR);
@@ -130,6 +130,7 @@ describe('CompositeLevelMonitor', () => {
it('by visual editor', () => {
// Verify edit page
+ cy.contains('Edit').click({ force: true });
cy.contains('Edit monitor', { timeout: 20000 });
cy.get('input[name="name"]').type('_edited');
@@ -150,7 +151,7 @@ describe('CompositeLevelMonitor', () => {
.type('{enter}');
cy.intercept('api/alerting/workflows/*').as('updateMonitorRequest');
- cy.get('button').contains('Update').click({ force: true });
+ cy.get('button').contains('Save').click({ force: true });
// Wait for monitor to be created
cy.wait('@updateMonitorRequest').then(() => {
diff --git a/cypress/integration/document_level_monitor_spec.js b/cypress/integration/document_level_monitor_spec.js
index 9e82db039..f43c3930f 100644
--- a/cypress/integration/document_level_monitor_spec.js
+++ b/cypress/integration/document_level_monitor_spec.js
@@ -380,8 +380,8 @@ describe('DocumentLevelMonitor', () => {
// TODO: Test with Notifications plugin
- // Click the update button
- cy.get('button').contains('Update').last().click({ force: true });
+ // Click the save button
+ cy.get('button').contains('Save').last().click({ force: true });
// Confirm we can see only one row in the trigger list by checking
element
cy.contains('This table contains 2 rows');
@@ -446,8 +446,8 @@ describe('DocumentLevelMonitor', () => {
// TODO: Test with Notifications plugin
- // Click the create button
- cy.get('button').contains('Update').last().click({ force: true });
+ // Click the save button
+ cy.get('button').contains('Save').last().click({ force: true });
// Confirm we can see only one row in the trigger list by checking
element
cy.contains('This table contains 1 row');
@@ -489,8 +489,8 @@ describe('DocumentLevelMonitor', () => {
cy.get('[data-test-subj="indicesComboBox"]').should('not.have.text', TESTING_INDEX_A);
cy.get('[data-test-subj="indicesComboBox"]').contains(TESTING_INDEX_B, { timeout: 20000 });
- // Click the update button
- cy.get('button').contains('Update').last().click({ force: true });
+ // Click the save button
+ cy.get('button').contains('Save').last().click({ force: true });
// Confirm we're on the Monitor Details page by searching for the History element
cy.contains('History', { timeout: 20000 });
diff --git a/cypress/integration/query_level_monitor_spec.js b/cypress/integration/query_level_monitor_spec.js
index 6743d7d1a..57f1af4c4 100644
--- a/cypress/integration/query_level_monitor_spec.js
+++ b/cypress/integration/query_level_monitor_spec.js
@@ -178,8 +178,8 @@ describe('Query-Level Monitors', () => {
.clear()
.type(UPDATED_MONITOR, { force: true });
- // Click Update button
- cy.get('button').contains('Update').last().click({ force: true });
+ // Click save button
+ cy.get('button').contains('Save').last().click({ force: true });
// Confirm the update process is done and the page loaded
cy.contains('Edit monitor');
@@ -222,8 +222,8 @@ describe('Query-Level Monitors', () => {
timeout: 25000,
});
- // Click the update button
- cy.get('button').contains('Update').last().click();
+ // Click the save button
+ cy.get('button').contains('Save').last().click();
// Confirm we're on the Monitor Details page by searching for the History element
cy.contains('History', { timeout: 25000 });
@@ -339,8 +339,8 @@ describe('Query-Level Monitors', () => {
addVisualQueryLevelTrigger(trigger.name, i, true, `IS ${trigger.enum}`, `${i}`);
}
- // Click Update button
- cy.get('button').contains('Update').last().click({ force: true });
+ // Click save button
+ cy.get('button').contains('Save').last().click({ force: true });
// Confirm we can see the correct number of rows in the trigger list by checking