From 90c21cc41015e5b615c44094aeef4740ba4295c6 Mon Sep 17 00:00:00 2001 From: Riya <69919272+riysaxen-amzn@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:13:27 -0700 Subject: [PATCH] Fix channel tests (#1507) (#1512) * add ; to tests Signed-off-by: Riya Saxena * fix channel tests in notifications Signed-off-by: Riya Saxena * fix channel tests in notifications Signed-off-by: Riya Saxena --------- Signed-off-by: Riya Saxena (cherry picked from commit 09bf9ce4d661b3f287a3d6454da89be2fafeaf6e) --- .../notifications-dashboards/test_chime_channel.json | 2 +- .../notifications-dashboards/test_slack_channel.json | 2 +- .../plugins/notifications-dashboards/2_channels.spec.js | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cypress/fixtures/plugins/notifications-dashboards/test_chime_channel.json b/cypress/fixtures/plugins/notifications-dashboards/test_chime_channel.json index feb56cc1f..e3e4b214a 100644 --- a/cypress/fixtures/plugins/notifications-dashboards/test_chime_channel.json +++ b/cypress/fixtures/plugins/notifications-dashboards/test_chime_channel.json @@ -5,7 +5,7 @@ "config_type": "chime", "is_enabled": true, "chime": { - "url": "https://sample-chime-webhook" + "url": "https://hooks.chime.aws/incomingwebhooks/sample_chime_url?token=123456" } } } \ No newline at end of file diff --git a/cypress/fixtures/plugins/notifications-dashboards/test_slack_channel.json b/cypress/fixtures/plugins/notifications-dashboards/test_slack_channel.json index 7643b2b0d..e24a94462 100644 --- a/cypress/fixtures/plugins/notifications-dashboards/test_slack_channel.json +++ b/cypress/fixtures/plugins/notifications-dashboards/test_slack_channel.json @@ -5,7 +5,7 @@ "config_type": "slack", "is_enabled": true, "slack": { - "url": "https://sample-slack-webhook" + "url": "https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2" } } } \ No newline at end of file diff --git a/cypress/integration/plugins/notifications-dashboards/2_channels.spec.js b/cypress/integration/plugins/notifications-dashboards/2_channels.spec.js index f0e4ef50b..65619a2ef 100644 --- a/cypress/integration/plugins/notifications-dashboards/2_channels.spec.js +++ b/cypress/integration/plugins/notifications-dashboards/2_channels.spec.js @@ -37,7 +37,7 @@ describe('Test create channels', () => { cy.get('[placeholder="Enter channel name"]').type('Test slack channel'); cy.get('[data-test-subj="create-channel-slack-webhook-input"]').type( - 'https://sample-slack-webhook' + 'https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2' ); cy.wait(NOTIFICATIONS_DELAY); cy.get('[data-test-subj="create-channel-send-test-message-button"]').click({ @@ -46,10 +46,12 @@ describe('Test create channels', () => { cy.wait(NOTIFICATIONS_DELAY); // This needs some time to appear as it will wait for backend call to timeout cy.contains('test message.').should('exist'); + cy.wait(NOTIFICATIONS_DELAY); cy.get('[data-test-subj="create-channel-create-button"]').click({ force: true, }); + cy.wait(NOTIFICATIONS_DELAY); cy.contains('successfully created.').should('exist'); }); @@ -64,13 +66,14 @@ describe('Test create channels', () => { cy.wait(NOTIFICATIONS_DELAY); cy.get('[data-test-subj="create-channel-chime-webhook-input"]').type( - 'https://sample-chime-webhook' + 'https://hooks.chime.aws/incomingwebhooks/sample_chime_url?token=123456' ); cy.wait(NOTIFICATIONS_DELAY); cy.get('[data-test-subj="create-channel-create-button"]').click({ force: true, }); + cy.wait(NOTIFICATIONS_DELAY); cy.contains('successfully created.').should('exist'); });