Skip to content

Commit

Permalink
fix: [M3-9073] - Fix duplicate specs in Cypress Slack / GH notificati…
Browse files Browse the repository at this point in the history
…ons (linode#11489)

* Avoid duplicating specs in run command output, reduce Slack failure list to 4

* Add changeset
  • Loading branch information
jdamore-linode authored Jan 15, 2025
1 parent 514cb97 commit d51015d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11489-tests-1736348080190.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Fix test notification formatting and output issues ([#11489](https://github.com/linode/manager/pull/11489))
2 changes: 1 addition & 1 deletion scripts/junit-summary/formatters/slack-formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { cypressRunCommand } from '../util/cypress';
* The Slack notification has a maximum character limit, so we must truncate
* the failure results to reduce the risk of hitting that limit.
*/
const FAILURE_SUMMARY_LIMIT = 6;
const FAILURE_SUMMARY_LIMIT = 4;

/**
* Outputs test result summary formatted as a Slack message.
Expand Down
3 changes: 2 additions & 1 deletion scripts/junit-summary/util/cypress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @returns Cypress run command to run `testFiles`.
*/
export const cypressRunCommand = (testFiles: string[]): string => {
const testFilesList = testFiles.join(',');
const dedupedTestFiles = Array.from(new Set(testFiles));
const testFilesList = dedupedTestFiles.join(',');
return `yarn cy:run -s "${testFilesList}"`;
};

0 comments on commit d51015d

Please sign in to comment.