From 0c87a7cd0ff92083c5236c242524d41c2054125f Mon Sep 17 00:00:00 2001 From: Matej Cotman Date: Mon, 13 Dec 2021 07:59:27 +0000 Subject: [PATCH 1/4] feat(atest): replace TEMPDIR with OUTPUT_DIR --- .github/workflows/tests.yml | 13 ++++--------- tests/atest/calculator.robot | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e36148..3b3e0ae 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -72,13 +72,8 @@ jobs: - name: Archive acceptances test results uses: actions/upload-artifact@v1.0.0 with: - name: log-${{ matrix.python-version }}-${{ matrix.os }} - path: log.html + name: output-${{ matrix.python-version }}-${{ matrix.os }} + path: | + log.html + Atest.Calculator-screenshot-1.png if: always() && job.status == 'failure' - - - name: Archive acceptances test failure screenshot on Linux - uses: actions/upload-artifact@v1.0.0 - with: - name: screenshot-${{ matrix.python-version }}-${{ matrix.os }} - path: /tmp/Atest.Calculator-screenshot-1.png - if: always() && job.status == 'failure' && contains(matrix.os, 'ubuntu') diff --git a/tests/atest/calculator.robot b/tests/atest/calculator.robot index 70ee52e..8fd167d 100755 --- a/tests/atest/calculator.robot +++ b/tests/atest/calculator.robot @@ -1,5 +1,5 @@ *** Settings *** -Library ImageHorizonLibrary ${CURDIR}${/}reference_images${/}calculator screenshot_folder=${TEMPDIR} +Library ImageHorizonLibrary ${CURDIR}${/}reference_images${/}calculator screenshot_folder=${OUTPUT_DIR} *** Test cases *** From 18d52ce66ef7cfd8682d1c08864ba03bd5de2c60 Mon Sep 17 00:00:00 2001 From: Matej Cotman Date: Mon, 13 Dec 2021 08:13:58 +0000 Subject: [PATCH 2/4] fix(atest): update upload-artifact version to support multiple paths --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3b3e0ae..bfd8d1b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -70,10 +70,10 @@ jobs: python tests/atest/run_tests.py - name: Archive acceptances test results - uses: actions/upload-artifact@v1.0.0 + uses: actions/upload-artifact@v2.3.0 with: name: output-${{ matrix.python-version }}-${{ matrix.os }} path: | log.html - Atest.Calculator-screenshot-1.png + ./*.png if: always() && job.status == 'failure' From cc5848168f347f599c6ff6a8de31fb9d55452700 Mon Sep 17 00:00:00 2001 From: Matej Cotman Date: Thu, 9 Dec 2021 07:22:08 +0000 Subject: [PATCH 3/4] fix(atest): replace inputs.png with the new ones - local, ci windows and ci linux --- .../calculator/inputs_folder/inputs.png | Bin 220 -> 0 bytes .../calculator/inputs_folder/inputs_local.png | Bin 0 -> 233 bytes .../calculator/inputs_folder/inputs_ubuntu.png | Bin 0 -> 225 bytes .../calculator/inputs_folder/inputs_windows.png | Bin 0 -> 236 bytes 4 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tests/atest/reference_images/calculator/inputs_folder/inputs.png create mode 100644 tests/atest/reference_images/calculator/inputs_folder/inputs_local.png create mode 100644 tests/atest/reference_images/calculator/inputs_folder/inputs_ubuntu.png create mode 100644 tests/atest/reference_images/calculator/inputs_folder/inputs_windows.png diff --git a/tests/atest/reference_images/calculator/inputs_folder/inputs.png b/tests/atest/reference_images/calculator/inputs_folder/inputs.png deleted file mode 100644 index cdce707792a431276c00f9a1d3b7fe53354d97ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^0YL1{!2~2TlBO>LQq09po*^6@9Je3(KLB#4c)B=- zRLpsM>mVnyArHerjV1r5&CTEO=Y7JK;6`yto%wuf98(g!q3kgJOY&T1L;O4)e9aR_^X${lkd~C*GKQH{&xC&wBBrH wivlK)ISBHOSLNx{M|Sfp%K6m565j)?BkLt*894vc2D+WW)78&qol`;+0AmkVLI3~& literal 0 HcmV?d00001 diff --git a/tests/atest/reference_images/calculator/inputs_folder/inputs_ubuntu.png b/tests/atest/reference_images/calculator/inputs_folder/inputs_ubuntu.png new file mode 100644 index 0000000000000000000000000000000000000000..9ef7cc16233253fd2e65c433ec2d61a66f10bc8d GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^UO?>6!3HFKWP=X@sTH0sjv*Dd-rjEHJfOhidT_~( z|EFHE91YXq*lB*~qoAhg>Qzpc^;i}-G%~TS@|6_KUC$n$=O*@b)5VYbX3jjP(Qc^` zu)u*+1VlCpfk@fA5kEUp1FPbu#PjQLfhC~QOsXJ7OsrlD9R5yFmlNA+?r)=WDv=MQ th=~=Ul>J#}yK8RT6rd7_C`;B#={z2ZIn|RbP6OS{;OXk;vd$@?2>{evNEiSB literal 0 HcmV?d00001 diff --git a/tests/atest/reference_images/calculator/inputs_folder/inputs_windows.png b/tests/atest/reference_images/calculator/inputs_folder/inputs_windows.png new file mode 100644 index 0000000000000000000000000000000000000000..7b53f413fc18dad91cbd6c556e0a1bde5388837a GIT binary patch literal 236 zcmeAS@N?(olHy`uVBq!ia0vp^zCawn!3HE_9DjTTQky+p978H@y}j+t*Py`TaPV5e zf9>nKifaE3?3hvB;wgA^LTKp1=v%z^|t39g&K098}-R*PU zM4Hhg;{pq>6oSkxdi(0&Y@b`ZJ&W(;UIOX$y?{whdphg93iN(e)6}AODx}+Wr7S)%eYW?lh5Ls#Jq}UsSAP5XYh3Ob6Mw<&;$TyePIaz literal 0 HcmV?d00001 From 793bfe4562adc842c8cebbd1274c5339c59855b2 Mon Sep 17 00:00:00 2001 From: Matej Cotman Date: Mon, 13 Dec 2021 14:23:43 +0000 Subject: [PATCH 4/4] fix(atest): replace chromium with chrome on Ubuntu and edge on Windows --- .github/workflows/tests.yml | 2 +- tests/atest/calculator/calculator.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bfd8d1b..5d18a4b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,7 +53,7 @@ jobs: - name: Install test tools to Linux run: | sudo apt-get update - sudo apt-get -y -q install xvfb scrot chromium-browser + sudo apt-get -y -q install xvfb scrot touch ~/.Xauthority if: contains(matrix.os, 'ubuntu') diff --git a/tests/atest/calculator/calculator.py b/tests/atest/calculator/calculator.py index c5743d6..ecbe16e 100644 --- a/tests/atest/calculator/calculator.py +++ b/tests/atest/calculator/calculator.py @@ -13,4 +13,6 @@ def close(): sys.exit(0) -eel.start('main.html', size=(300, 380)) +mode = 'edge' if os.name == 'nt' else 'chrome' + +eel.start('main.html', size=(300, 380), mode=mode)