Skip to content

Commit

Permalink
[Cypress] Ensure all statuses are available in sauceVisualResult su…
Browse files Browse the repository at this point in the history
…mmary (#139)

Co-authored-by: Logan Graham <[email protected]>
  • Loading branch information
omacranger and Logan Graham authored Sep 25, 2024
1 parent 3a25e36 commit 5991881
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
11 changes: 11 additions & 0 deletions visual-js/.changeset/slow-seas-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@saucelabs/cypress-visual-plugin": patch
"@saucelabs/visual": patch
"@saucelabs/nightwatch-sauce-visual-service": patch
"@saucelabs/visual-playwright": patch
"@saucelabs/visual-storybook": patch
"@saucelabs/wdio-sauce-visual-service": patch
---

Fill out statuses in sauceVisualResults for cypress
Bump all dependencies to use new ignore region calculation system
9 changes: 8 additions & 1 deletion visual-js/visual-cypress/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,14 @@ Sauce Labs Visual: Unable to create new build.

const filterDiffsById = (diff: { id: string; status: DiffStatus }) =>
this.uploadedDiffIds.includes(diff.id);
const initialStatusSummary = {} as Record<DiffStatus, number>;
const initialStatusSummary = {
[DiffStatus.Queued]: 0,
[DiffStatus.Unapproved]: 0,
[DiffStatus.Approved]: 0,
[DiffStatus.Equal]: 0,
[DiffStatus.Errored]: 0,
[DiffStatus.Rejected]: 0,
} satisfies Record<DiffStatus, number>;
const statusSummary = diffsForTestResult.nodes
.filter(filterDiffsById)
.reduce((statusSummary, diff) => {
Expand Down

0 comments on commit 5991881

Please sign in to comment.