diff --git a/.github/workflows/vdiff.yml b/.github/workflows/vdiff.yml new file mode 100644 index 00000000..b3dcda9e --- /dev/null +++ b/.github/workflows/vdiff.yml @@ -0,0 +1,22 @@ +name: vdiff +on: pull_request +jobs: + vdiff: + timeout-minutes: 5 + runs-on: ubuntu-latest + steps: + - uses: Brightspace/third-party-actions@actions/checkout + - uses: Brightspace/third-party-actions@actions/setup-node + with: + node-version-file: .nvmrc + cache: 'npm' + - name: Install dependencies + run: npm ci + - name: vdiff Tests + uses: BrightspaceUI/actions/vdiff@main + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-session-token: ${{ secrets.AWS_SESSION_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} + test-config: ./test/browser/vdiff.config.js diff --git a/.vdiff.json b/.vdiff.json new file mode 100644 index 00000000..f4e0153c --- /dev/null +++ b/.vdiff.json @@ -0,0 +1,8 @@ +{ + "browsers": [ + { + "name": "Chromium", + "version": 116 + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index e4806ef2..b761b8c2 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "test:bin": "mocha './test/bin/**/*.test.js'", "test:browser": "npx d2l-test-runner --files './test/browser/**/*.test.js'", "test:server": "mocha './test/server/**/*.test.js'", - "test:vdiff": "npx d2l-test-runner --config ./test/browser/vdiff.config.js --group vdiff" + "test:vdiff": "npx d2l-test-runner vdiff --config ./test/browser/vdiff.config.js" }, "bin": { "d2l-test-runner": "./bin/d2l-test-runner.js", diff --git a/test/browser/golden/element-different/chromium/default.png b/test/browser/golden/element-different/chromium/default.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/golden/element-different/chromium/default.png differ diff --git a/test/browser/golden/element-different/chromium/larger.png b/test/browser/golden/element-different/chromium/larger.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/golden/element-different/chromium/larger.png differ diff --git a/test/browser/golden/element-different/chromium/slimer-taller.png b/test/browser/golden/element-different/chromium/slimer-taller.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/golden/element-different/chromium/slimer-taller.png differ diff --git a/test/browser/golden/element-different/chromium/smaller.png b/test/browser/golden/element-different/chromium/smaller.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/golden/element-different/chromium/smaller.png differ diff --git a/test/browser/golden/element-different/chromium/wider-shorter.png b/test/browser/golden/element-different/chromium/wider-shorter.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/golden/element-different/chromium/wider-shorter.png differ diff --git a/test/browser/golden/element-matches/chromium/default.png b/test/browser/golden/element-matches/chromium/default.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/golden/element-matches/chromium/default.png differ diff --git a/test/browser/golden/element-matches/chromium/full-page.png b/test/browser/golden/element-matches/chromium/full-page.png new file mode 100644 index 00000000..1e9a2b91 Binary files /dev/null and b/test/browser/golden/element-matches/chromium/full-page.png differ diff --git a/test/browser/golden/element-matches/chromium/hover.png b/test/browser/golden/element-matches/chromium/hover.png new file mode 100644 index 00000000..66f14458 Binary files /dev/null and b/test/browser/golden/element-matches/chromium/hover.png differ diff --git a/test/browser/golden/element-matches/chromium/no-hover.png b/test/browser/golden/element-matches/chromium/no-hover.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/golden/element-matches/chromium/no-hover.png differ diff --git a/test/browser/golden/element-matches/chromium/rtl.png b/test/browser/golden/element-matches/chromium/rtl.png new file mode 100644 index 00000000..d89bad66 Binary files /dev/null and b/test/browser/golden/element-matches/chromium/rtl.png differ diff --git a/test/browser/golden/element-matches/chromium/transition.png b/test/browser/golden/element-matches/chromium/transition.png new file mode 100644 index 00000000..2c0cf1ae Binary files /dev/null and b/test/browser/golden/element-matches/chromium/transition.png differ diff --git a/test/browser/nested/golden/element-different/chromium/default.png b/test/browser/nested/golden/element-different/chromium/default.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/nested/golden/element-different/chromium/default.png differ diff --git a/test/browser/nested/golden/element-different/chromium/larger.png b/test/browser/nested/golden/element-different/chromium/larger.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/nested/golden/element-different/chromium/larger.png differ diff --git a/test/browser/nested/golden/element-different/chromium/slimer-taller.png b/test/browser/nested/golden/element-different/chromium/slimer-taller.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/nested/golden/element-different/chromium/slimer-taller.png differ diff --git a/test/browser/nested/golden/element-different/chromium/smaller.png b/test/browser/nested/golden/element-different/chromium/smaller.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/nested/golden/element-different/chromium/smaller.png differ diff --git a/test/browser/nested/golden/element-different/chromium/wider-shorter.png b/test/browser/nested/golden/element-different/chromium/wider-shorter.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/nested/golden/element-different/chromium/wider-shorter.png differ diff --git a/test/browser/nested/golden/element-matches/chromium/default.png b/test/browser/nested/golden/element-matches/chromium/default.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/nested/golden/element-matches/chromium/default.png differ diff --git a/test/browser/nested/golden/element-matches/chromium/full-page.png b/test/browser/nested/golden/element-matches/chromium/full-page.png new file mode 100644 index 00000000..1e9a2b91 Binary files /dev/null and b/test/browser/nested/golden/element-matches/chromium/full-page.png differ diff --git a/test/browser/nested/golden/element-matches/chromium/hover.png b/test/browser/nested/golden/element-matches/chromium/hover.png new file mode 100644 index 00000000..66f14458 Binary files /dev/null and b/test/browser/nested/golden/element-matches/chromium/hover.png differ diff --git a/test/browser/nested/golden/element-matches/chromium/no-hover.png b/test/browser/nested/golden/element-matches/chromium/no-hover.png new file mode 100644 index 00000000..56901da2 Binary files /dev/null and b/test/browser/nested/golden/element-matches/chromium/no-hover.png differ diff --git a/test/browser/nested/golden/element-matches/chromium/rtl.png b/test/browser/nested/golden/element-matches/chromium/rtl.png new file mode 100644 index 00000000..d89bad66 Binary files /dev/null and b/test/browser/nested/golden/element-matches/chromium/rtl.png differ diff --git a/test/browser/nested/golden/element-matches/chromium/transition.png b/test/browser/nested/golden/element-matches/chromium/transition.png new file mode 100644 index 00000000..2c0cf1ae Binary files /dev/null and b/test/browser/nested/golden/element-matches/chromium/transition.png differ