From 9559b3a93531831045d99a1eb33a60b8b253f16e Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:50:11 +0800 Subject: [PATCH] Replace all wrong Chime urls with correct ones (#144) (#146) (cherry picked from commit a112f08c58da57564beb55726ed17fe05c89adc7) Signed-off-by: Aniruddh Srivastava Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .cypress/fixtures/test_chime_channel.json | 2 +- .cypress/integration/channels.spec.js | 2 +- .../__snapshots__/ChannelSettingsDetails.test.tsx.snap | 4 ++-- public/pages/CreateChannel/__tests__/ChimeSettings.test.tsx | 4 ++-- test/mocks/mockData.ts | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.cypress/fixtures/test_chime_channel.json b/.cypress/fixtures/test_chime_channel.json index feb56cc1..e3e4b214 100644 --- a/.cypress/fixtures/test_chime_channel.json +++ b/.cypress/fixtures/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/integration/channels.spec.js b/.cypress/integration/channels.spec.js index 7d82fa7b..f9d36954 100644 --- a/.cypress/integration/channels.spec.js +++ b/.cypress/integration/channels.spec.js @@ -62,7 +62,7 @@ describe('Test create channels', () => { cy.wait(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(delay); diff --git a/public/pages/Channels/__tests__/__snapshots__/ChannelSettingsDetails.test.tsx.snap b/public/pages/Channels/__tests__/__snapshots__/ChannelSettingsDetails.test.tsx.snap index 5c5f7e07..a5cfb2e2 100644 --- a/public/pages/Channels/__tests__/__snapshots__/ChannelSettingsDetails.test.tsx.snap +++ b/public/pages/Channels/__tests__/__snapshots__/ChannelSettingsDetails.test.tsx.snap @@ -42,7 +42,7 @@ exports[` spec renders Chime channel 1`] = `
- https://chimehook + https://hooks.chime.aws/incomingwebhooks/sample_chime_url?token=123456
@@ -238,7 +238,7 @@ exports[` spec renders Teams channel 1`] = `
- https://chimehook + https://hooks.chime.aws/incomingwebhooks/sample_chime_url?token=123456
diff --git a/public/pages/CreateChannel/__tests__/ChimeSettings.test.tsx b/public/pages/CreateChannel/__tests__/ChimeSettings.test.tsx index 50270c5b..56fc6763 100644 --- a/public/pages/CreateChannel/__tests__/ChimeSettings.test.tsx +++ b/public/pages/CreateChannel/__tests__/ChimeSettings.test.tsx @@ -69,9 +69,9 @@ describe(' spec', () => { ); const input = utils.getByLabelText('Webhook URL'); - fireEvent.change(input, { target: { value: 'https://test-chime-url' } }); + fireEvent.change(input, { target: { value: 'https://hooks.chime.aws/incomingwebhooks/sample_chime_url?token=123456' } }); fireEvent.blur(input); - expect(setChimeWebhook).toBeCalledWith('https://test-chime-url'); + expect(setChimeWebhook).toBeCalledWith('https://hooks.chime.aws/incomingwebhooks/sample_chime_url?token=123456'); expect(setInputErrors).toBeCalled(); }); }); diff --git a/test/mocks/mockData.ts b/test/mocks/mockData.ts index 786e8096..948da75e 100644 --- a/test/mocks/mockData.ts +++ b/test/mocks/mockData.ts @@ -16,7 +16,7 @@ const mockChime: ChannelItemType = { config_type: 'chime', is_enabled: true, chime: { - url: 'https://chimehook', + url: 'https://hooks.chime.aws/incomingwebhooks/sample_chime_url?token=123456', }, config_id: 'test-chime', created_time_ms: 1622670451891, @@ -166,7 +166,7 @@ const mockMicrosoftTeams: ChannelItemType = { config_type: 'microsoft_teams', is_enabled: false, microsoft_teams: { - url: 'https://chimehook', + url: 'https://hooks.chime.aws/incomingwebhooks/sample_chime_url?token=123456', }, config_id: 'test-slack', created_time_ms: 1622670451891,