Skip to content

Commit 3c677d6

Browse files
authored
Merge pull request #3227 from jtpio/ui-test-references
Create and upload reference screenshots on CI failure
2 parents bf56eb7 + 6f6fe57 commit 3c677d6

File tree

3 files changed

+30
-11
lines changed

3 files changed

+30
-11
lines changed

.github/workflows/tests.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,21 @@ jobs:
213213
if: always()
214214
uses: actions/upload-artifact@v2
215215
with:
216-
name: ui-test-output
216+
name: ipywidgets-ui-test-output
217217
path: |
218218
ui-tests/test-output
219+
- name: Run UI Tests
220+
if: ${{ failure() }}
221+
run: |
222+
cd ui-tests
223+
jlpm run test:create-references
224+
- name: Upload UI Test new reference artifacts
225+
if: ${{ failure() }}
226+
uses: actions/upload-artifact@v2
227+
with:
228+
name: ipywidgets-ui-test-new-reference
229+
path: |
230+
ui-tests/test-output/test/screenshots/*.png
219231
220232
env:
221233
CI: true

ui-tests/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
"scripts": {
77
"start-jlab": "jupyter lab --config ./jupyter_server_config.py",
88
"start-jlab:detached": "yarn run start-jlab&",
9+
"test:create-references": "galata --skip-visual-regression --skip-html-regression",
910
"test": "galata"
1011
},
1112
"author": "Project Jupyter",
1213
"license": "BSD-3-Clause",
1314
"dependencies": {
14-
"@jupyterlab/galata": "3.0.3-3"
15+
"@jupyterlab/galata": "3.0.11-2"
1516
}
1617
}

ui-tests/yarn.lock

+15-9
Original file line numberDiff line numberDiff line change
@@ -473,18 +473,19 @@
473473
"@types/yargs" "^15.0.0"
474474
chalk "^3.0.0"
475475

476-
"@jupyterlab/[email protected].3-3":
477-
version "3.0.3-3"
478-
resolved "https://registry.npmjs.org/@jupyterlab/galata/-/galata-3.0.3-3.tgz#02bc90897e139eff0773dbab2689c621f4a5b8da"
479-
integrity sha512-g334GMDQdSlIOngfWLW9GR8ENc9Kegu3OkCrYPdheE2lYJJsgeiO+3n7lg4Iar5b8LtQTu9P0by3IhEFRtEATA==
476+
"@jupyterlab/[email protected].11-2":
477+
version "3.0.11-2"
478+
resolved "https://registry.npmjs.org/@jupyterlab/galata/-/galata-3.0.11-2.tgz#eeaf1a571a744718d664df7a3decc40907405bdc"
479+
integrity sha512-i8jBhL0JUezAZ0Apa56Gy7lH6K0uuYhlkVwY0AYfrMJJw8ILLnd8yunt7QXAPto0m+QC3ud4VZ82KYck4W9+3w==
480480
dependencies:
481481
"@types/dateformat" "^3.0.1"
482482
"@types/jest" "^25.1.2"
483483
"@types/js-beautify" "^1.8.2"
484484
"@types/node" "^13.1.1"
485485
"@types/pixelmatch" "^5.0.0"
486486
"@types/pngjs" "^3.4.1"
487-
ansi_up "^4.0.4"
487+
"@yarnpkg/lockfile" "^1.1.0"
488+
ansi_up "^5.0.0"
488489
axios "^0.21.1"
489490
chalk "^4.0.0"
490491
cross-spawn "^6.0.5"
@@ -654,6 +655,11 @@
654655
dependencies:
655656
"@types/node" "*"
656657

658+
"@yarnpkg/lockfile@^1.1.0":
659+
version "1.1.0"
660+
resolved "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
661+
integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==
662+
657663
abab@^2.0.0:
658664
version "2.0.5"
659665
resolved "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
@@ -735,10 +741,10 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
735741
dependencies:
736742
color-convert "^2.0.1"
737743

738-
ansi_up@^4.0.4:
739-
version "4.0.4"
740-
resolved "https://registry.npmjs.org/ansi_up/-/ansi_up-4.0.4.tgz#5b8c35f0b02e4476f3f18cf89c3bf48d15d054f6"
741-
integrity sha512-vRxC8q6QY918MbehO869biJW4tiunJdjOhi5fpY6NLOliBQlZhOkKgABJKJqH+JZfb/WfjvjN1chLWI6tODerw==
744+
ansi_up@^5.0.0:
745+
version "5.0.1"
746+
resolved "https://registry.npmjs.org/ansi_up/-/ansi_up-5.0.1.tgz#b66839dba408d3d2f8548904f1ae6fc62d6917ef"
747+
integrity sha512-HGOTjFQECRKZM9fIlGhJfR2pcK8PMUWzFOqcPwqBEnNIa4P2r0Di+g2hxCX0hL0n1NUtAHGRA+fUyA/OajZYFw==
742748

743749
anymatch@^2.0.0:
744750
version "2.0.0"

0 commit comments

Comments
 (0)