Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tihuan committed Sep 10, 2024
1 parent 91c6f97 commit a727924
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
name: E2E Tests

<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
# (thuang): Chromatic recommends ONLY running on push instead of pull_request
# https://www.chromatic.com/docs/github-actions/#recommended-configuration-for-build-events
>>>>>>> 33889da2 (test: SCE-6 e2e tests tabilize snapshots)
>>>>>>> a52cbd54 (test: SCE-6 e2e tests tabilize snapshots)
on: push

env:
Expand Down Expand Up @@ -154,13 +148,7 @@ jobs:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
with:
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
# (thuang): Matches the `name` and `path` specified in `Upload Chromatic artifacts` step
>>>>>>> 33889da2 (test: SCE-6 e2e tests tabilize snapshots)
>>>>>>> a52cbd54 (test: SCE-6 e2e tests tabilize snapshots)
path: /home/runner/work/single-cell-explorer/single-cell-explorer/client/playwright-report/chromatic-archives
pattern: chromatic-report-*
merge-multiple: true
Expand Down
8 changes: 8 additions & 0 deletions client/__tests__/e2e/cellxgeneActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,14 @@ export async function assertUndoRedo(

const WAIT_FOR_GRAPH_AS_IMAGE_TIMEOUT_MS = 10_000;

/**
* (thuang): Captures a snapshot of the graph on the canvas element as an image
* for Chromatic snapshot testing.
*
* NOTE: Use this function only for tests that absolutely require graph
* snapshots, as the image layer and graph can sometimes be out of sync,
* potentially leading to false positives in Chromatic if excessive screenshots are taken.
*/
export async function snapshotTestGraph(
page: Page,
name: string,
Expand Down
2 changes: 1 addition & 1 deletion client/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default defineConfig<ChromaticConfig>({
* (thuang): Default is `0.063`, but it's too sensitive for our use case.
* @see: https://www.chromatic.com/docs/threshold/#setting-the-threshold
*/
diffThreshold: 0.15,
// diffThreshold: 0.15,
acceptDownloads: true,
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
Expand Down

0 comments on commit a727924

Please sign in to comment.