Skip to content

Commit

Permalink
chore: revert bold implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
nunogois committed Sep 23, 2024
1 parent c625282 commit 701225a
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 133 deletions.
12 changes: 6 additions & 6 deletions src/lib/addons/__snapshots__/datadog.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Datadog integration Should call datadog webhook for archived toggle 1`] = `"{"text":"%%% \\n **[email protected]** archived **some-toggle** in project **** \\n %%% ","title":"Unleash notification update"}"`;
exports[`Datadog integration Should call datadog webhook for archived toggle 1`] = `"{"text":"%%% \\n *[email protected]* archived *some-toggle* in project ** \\n %%% ","title":"Unleash notification update"}"`;

exports[`Datadog integration Should call datadog webhook for archived toggle with project info 1`] = `"{"text":"%%% \\n **[email protected]** archived **some-toggle** in project **[some-project](http://some-url.com/projects/some-project)** \\n %%% ","title":"Unleash notification update"}"`;
exports[`Datadog integration Should call datadog webhook for archived toggle with project info 1`] = `"{"text":"%%% \\n *[email protected]* archived *some-toggle* in project *[some-project](http://some-url.com/projects/some-project)* \\n %%% ","title":"Unleash notification update"}"`;

exports[`Datadog integration Should call datadog webhook 1`] = `"{"text":"%%% \\n **[email protected]** created **[some-toggle](http://some-url.com/projects//features/some-toggle)** in project **** \\n %%% ","title":"Unleash notification update"}"`;
exports[`Datadog integration Should call datadog webhook 1`] = `"{"text":"%%% \\n *[email protected]* created *[some-toggle](http://some-url.com/projects//features/some-toggle)* in project ** \\n %%% ","title":"Unleash notification update"}"`;

exports[`Datadog integration Should call datadog webhook for toggled environment 1`] = `"{"text":"%%% \\n **[email protected]** disabled **[some-toggle](http://some-url.com/projects/default/features/some-toggle)** for the **development** environment in project **[default](http://some-url.com/projects/default)** \\n %%% ","title":"Unleash notification update"}"`;
exports[`Datadog integration Should call datadog webhook for toggled environment 1`] = `"{"text":"%%% \\n *[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)* \\n %%% ","title":"Unleash notification update"}"`;

exports[`Datadog integration Should call datadog webhook with JSON when template set 1`] = `"{"text":"{\\n \\"event\\": \\"feature-created\\",\\n \\"createdBy\\": \\"some@user.com\\"\\n}","title":"Unleash notification update"}"`;

exports[`Datadog integration Should include customHeaders in headers when calling service 1`] = `"{"text":"%%% \\n **[email protected]** disabled **[some-toggle](http://some-url.com/projects/default/features/some-toggle)** for the **development** environment in project **[default](http://some-url.com/projects/default)** \\n %%% ","title":"Unleash notification update"}"`;
exports[`Datadog integration Should include customHeaders in headers when calling service 1`] = `"{"text":"%%% \\n *[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)* \\n %%% ","title":"Unleash notification update"}"`;

exports[`Datadog integration Should include customHeaders in headers when calling service 2`] = `
{
Expand All @@ -20,7 +20,7 @@ exports[`Datadog integration Should include customHeaders in headers when callin
}
`;

exports[`Datadog integration Should not include source_type_name when included in the config 1`] = `"{"text":"%%% \\n **[email protected]** disabled **[some-toggle](http://some-url.com/projects/default/features/some-toggle)** for the **development** environment in project **[default](http://some-url.com/projects/default)** \\n %%% ","title":"Unleash notification update","source_type_name":"my-custom-source-type"}"`;
exports[`Datadog integration Should not include source_type_name when included in the config 1`] = `"{"text":"%%% \\n *[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)* \\n %%% ","title":"Unleash notification update","source_type_name":"my-custom-source-type"}"`;

exports[`Datadog integration Should not include source_type_name when included in the config 2`] = `
{
Expand Down

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/lib/addons/__snapshots__/slack.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Slack integration Should call slack webhook 1`] = `"{"username":"Unleash","icon_emoji":":unleash:","text":"**[email protected]** created **<http://some-url.com/projects/default/features/some-toggle|some-toggle>** in project **<http://some-url.com/projects/default|default>**","channel":"#general","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/projects/default/features/some-toggle"}]}]}"`;
exports[`Slack integration Should call slack webhook 1`] = `"{"username":"Unleash","icon_emoji":":unleash:","text":"*[email protected]* created *<http://some-url.com/projects/default/features/some-toggle|some-toggle>* in project *<http://some-url.com/projects/default|default>*","channel":"#general","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/projects/default/features/some-toggle"}]}]}"`;

exports[`Slack integration Should call slack webhook for archived toggle 1`] = `"{"username":"Unleash","icon_emoji":":unleash:","text":"**[email protected]** archived **some-toggle** in project ****","channel":"#general","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/projects//archive"}]}]}"`;
exports[`Slack integration Should call slack webhook for archived toggle 1`] = `"{"username":"Unleash","icon_emoji":":unleash:","text":"*[email protected]* archived *some-toggle* in project **","channel":"#general","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/projects//archive"}]}]}"`;

exports[`Slack integration Should call slack webhook for archived toggle with project info 1`] = `"{"username":"Unleash","icon_emoji":":unleash:","text":"**[email protected]** archived **some-toggle** in project **<http://some-url.com/projects/some-project|some-project>**","channel":"#general","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/projects/some-project/archive"}]}]}"`;
exports[`Slack integration Should call slack webhook for archived toggle with project info 1`] = `"{"username":"Unleash","icon_emoji":":unleash:","text":"*[email protected]* archived *some-toggle* in project *<http://some-url.com/projects/some-project|some-project>*","channel":"#general","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/projects/some-project/archive"}]}]}"`;

exports[`Slack integration Should call webhook for toggled environment 1`] = `"{"username":"Unleash","icon_emoji":":unleash:","text":"**[email protected]** disabled **<http://some-url.com/projects/default/features/some-toggle|some-toggle>** for the **development** environment in project **<http://some-url.com/projects/default|default>**","channel":"#general","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/projects/default/features/some-toggle"}]}]}"`;
exports[`Slack integration Should call webhook for toggled environment 1`] = `"{"username":"Unleash","icon_emoji":":unleash:","text":"*[email protected]* disabled *<http://some-url.com/projects/default/features/some-toggle|some-toggle>* for the *development* environment in project *<http://some-url.com/projects/default|default>*","channel":"#general","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/projects/default/features/some-toggle"}]}]}"`;

exports[`Slack integration Should include custom headers from parameters in call to service 1`] = `"{"username":"Unleash","icon_emoji":":unleash:","text":"**[email protected]** disabled **<http://some-url.com/projects/default/features/some-toggle|some-toggle>** for the **development** environment in project **<http://some-url.com/projects/default|default>**","channel":"#general","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/projects/default/features/some-toggle"}]}]}"`;
exports[`Slack integration Should include custom headers from parameters in call to service 1`] = `"{"username":"Unleash","icon_emoji":":unleash:","text":"*[email protected]* disabled *<http://some-url.com/projects/default/features/some-toggle|some-toggle>* for the *development* environment in project *<http://some-url.com/projects/default|default>*","channel":"#general","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/projects/default/features/some-toggle"}]}]}"`;

exports[`Slack integration Should include custom headers from parameters in call to service 2`] = `
{
Expand Down
10 changes: 5 additions & 5 deletions src/lib/addons/__snapshots__/teams.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Teams integration Should call teams webhook 1`] = `"{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"**[email protected]** created **[some-toggle](http://some-url.com/projects//features/some-toggle)** in project ****","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"[email protected]"},{"name":"Action","value":"feature-created"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/projects//features/some-toggle"}]}]}"`;
exports[`Teams integration Should call teams webhook 1`] = `"{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"*[email protected]* created *[some-toggle](http://some-url.com/projects//features/some-toggle)* in project **","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"[email protected]"},{"name":"Action","value":"feature-created"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/projects//features/some-toggle"}]}]}"`;

exports[`Teams integration Should call teams webhook for archived toggle 1`] = `"{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"**[email protected]** archived **some-toggle** in project ****","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"[email protected]"},{"name":"Action","value":"feature-archived"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/projects//archive"}]}]}"`;
exports[`Teams integration Should call teams webhook for archived toggle 1`] = `"{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"*[email protected]* archived *some-toggle* in project **","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"[email protected]"},{"name":"Action","value":"feature-archived"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/projects//archive"}]}]}"`;

exports[`Teams integration Should call teams webhook for archived toggle with project info 1`] = `"{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"**[email protected]** archived **some-toggle** in project **[some-project](http://some-url.com/projects/some-project)**","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"[email protected]"},{"name":"Action","value":"feature-archived"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/projects/some-project/archive"}]}]}"`;
exports[`Teams integration Should call teams webhook for archived toggle with project info 1`] = `"{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"*[email protected]* archived *some-toggle* in project *[some-project](http://some-url.com/projects/some-project)*","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"[email protected]"},{"name":"Action","value":"feature-archived"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/projects/some-project/archive"}]}]}"`;

exports[`Teams integration Should call teams webhook for toggled environment 1`] = `"{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"**[email protected]** disabled **[some-toggle](http://some-url.com/projects/default/features/some-toggle)** for the **development** environment in project **[default](http://some-url.com/projects/default)**","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"[email protected]"},{"name":"Action","value":"feature-environment-disabled"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/projects/default/features/some-toggle"}]}]}"`;
exports[`Teams integration Should call teams webhook for toggled environment 1`] = `"{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"*[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)*","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"[email protected]"},{"name":"Action","value":"feature-environment-disabled"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/projects/default/features/some-toggle"}]}]}"`;

exports[`Teams integration Should include custom headers in call to teams 1`] = `"{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"**[email protected]** disabled **[some-toggle](http://some-url.com/projects/default/features/some-toggle)** for the **development** environment in project **[default](http://some-url.com/projects/default)**","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"[email protected]"},{"name":"Action","value":"feature-environment-disabled"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/projects/default/features/some-toggle"}]}]}"`;
exports[`Teams integration Should include custom headers in call to teams 1`] = `"{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"*[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)*","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"[email protected]"},{"name":"Action","value":"feature-environment-disabled"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/projects/default/features/some-toggle"}]}]}"`;

exports[`Teams integration Should include custom headers in call to teams 2`] = `
{
Expand Down
2 changes: 1 addition & 1 deletion src/lib/addons/__snapshots__/webhook.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
exports[`Webhook integration should allow for eventJson and eventMarkdown in bodyTemplate 1`] = `
"{
"json": "{\\"id\\":1,\\"createdAt\\":\\"2024-07-24T00:00:00.000Z\\",\\"createdByUserId\\":-1337,\\"type\\":\\"feature-created\\",\\"createdBy\\":\\"some@user.com\\",\\"featureName\\":\\"some-toggle\\",\\"project\\":\\"default\\",\\"data\\":{\\"name\\":\\"some-toggle\\",\\"enabled\\":false,\\"strategies\\":[{\\"name\\":\\"default\\"}]}}",
"markdown": "**[email protected]** created **[some-toggle](http://some-url.com/projects/default/features/some-toggle)** in project **[default](http://some-url.com/projects/default)**"
"markdown": "*[email protected]* created *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* in project *[default](http://some-url.com/projects/default)*"
}"
`;
Loading

0 comments on commit 701225a

Please sign in to comment.