From e7684927039d4b24b762e9ec2dabc4127964c1bc Mon Sep 17 00:00:00 2001 From: Vladimir Druzhinin <128374224+StateOf-Vlado@users.noreply.github.com> Date: Mon, 9 Oct 2023 11:38:48 +0200 Subject: [PATCH] Fix/143 image comparison (#150) * Attach squish server config to test report * Fix image comparison on CI #143 * Fix failed image comparison #143 * List branches added #144 --- test/e2e/.gitignore | 3 +++ test/e2e/ci/Jenkinsfile | 20 +++++++++++++++--- .../general_channel_icon_in_list.png | Bin 930 -> 939 bytes test/e2e/fixtures/squish.py | 2 ++ test/e2e/scripts/tools/image.py | 2 +- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/test/e2e/.gitignore b/test/e2e/.gitignore index 558f93cfc4..ddd050c7f9 100644 --- a/test/e2e/.gitignore +++ b/test/e2e/.gitignore @@ -7,3 +7,6 @@ configs/_local.py *.pyc tmp/ + +*.DS_Store + diff --git a/test/e2e/ci/Jenkinsfile b/test/e2e/ci/Jenkinsfile index 8927aa58d2..f8f4fad6af 100644 --- a/test/e2e/ci/Jenkinsfile +++ b/test/e2e/ci/Jenkinsfile @@ -20,6 +20,19 @@ pipeline { } parameters { + + gitParameter( + branch: '', + branchFilter: 'origin/(.*)', + defaultValue: 'master', + description: 'Git branch to checkout.', + name: 'GIT_REF', + quickFilterEnabled: false, + selectedValue: 'DEFAULT', + sortMode: 'ASCENDING_SMART', + tagFilter: '*', + type: 'PT_BRANCH' + ) string( name: 'BUILD', description: 'Paste a number of PR that you want to test.', @@ -27,17 +40,17 @@ pipeline { ) string( name: 'TEST_NAME', - description: 'Paste test name/part of test name to run specific test', + description: 'Paste test name/part of test name to run specific test.', defaultValue: '' ) string( name: 'TEST_SCOPE', - description: 'Paste tag to run specific scope of tests', + description: 'Paste tag to run specific scope of tests.', defaultValue: '' ) string( name: 'TESTRAIL_RUN_ID', - description: 'Test run ID in Test Rail', + description: 'Test run ID in Test Rail.', defaultValue: '' ) } @@ -82,6 +95,7 @@ pipeline { autoDisplayName: true, parallelBuild: true, screen: '1920x1080x24', + additionalOptions: '-dpi 1' ]) { script { sh "fluxbox &" env.TESTRAIL_USR = "${CREDS_USR}" diff --git a/test/e2e/ext/vp/communities/test_communities/test_edit_community_channel/general_channel_icon_in_list.png b/test/e2e/ext/vp/communities/test_communities/test_edit_community_channel/general_channel_icon_in_list.png index fdac5b790895dc167ce235e84a95abbafddd19f2..d8d56915877eff7a42cd2827bf15b59d5938d301 100644 GIT binary patch delta 917 zcmV;G18V%D2df8=B!6;AL_t(I5tYI3YZG@I2k`gj?vh-7G)<$MbxASP&TXckpj~mT zSY+#u2U{)DjtVLak#&E74>lkA%x7~T$b?lH1AkBp4sFLaixw@e*fBH3S-fhpd9#=1 z^6M^_+nHzPm&0>GYt6 zWJN{Qm23KiNv)tUyc)lk_VjxDc8I7VSy2H@&6LhvE*3O~mGFCMsNdJq=>b5pqDo2g z82!DTQI1r2SBrEFJcyaQ&j(S9^qMl7HuAqylPmOyE#!?COdb`8}gFc!| zq>rA+W%CxCgpjy`{&HWU9$p*V1PR^+CXCy^6Bv+p5yiG{-kkR2q;_9 zg8rz$MOwx6jUdy!c`<$IF@w|oK_4AHmYPc#aB6-p{D0Z|f?$+?JfE5Vhv7ehYu8X{ z*BUDPnf>|)JqL%aaW{SX#iPZ)OxTgoH5~3+i|ilj@u`xAXLvW~cY~R%s4)``Z$&g~x97iw>S z^ow%pH-D3Xi}!~|-sVuna@x0Natj9R{9dAiUp{`As=$tf?vd~ZuOst&=J-!W3Dmqn zjCw(h;)m@nud1Colang2TlWS}hmWP^5(XTor7L`J8_(;;#qTq}s;J`L?F;XHhbukI zeKnzF;jlICrm+e6^mq|Y6c9&7f}8xXv`QkOFMk%fwd=*rQBGji{H65y1q)952Yob` zNFP0s%jPXOdDi&%4){0t@IQ-5vzhN^%NiVl0q)3X1IdayHeQ^(uA>eK{JOWqwiY4i zVmYOJ_ny9xVGPgf?Gg_R`bbt(DQTWOo0n21RxTFd4-E%mQJ!Q)1u!*JI(NBP&=^+2 z?|-GCeqT?g2LQ>6imEHu^b3<(L1TC|elP9m_4e%$QAM(%qGoEQbahsjQYKy|7U8=) z#GXzMYDiX8*hoop`c~=2yphdYc#&X$+rGuUv)vPm@~|OUQBf!P#JuyMoVZ_ES~i!K rEh2iYi3^9g_(q|v)fH{#QRiR20f!x*mkuyU00000NkvXXu0mjf#nQ>l delta 908 zcmV;719SYV2cid%B!6j1L_t(I5tYGBXdGo62jJiTo$S}_huKX7)}?l>iCPz}7$vo9 zBzRa;N_G7 zW@dKw|#*=TK{$0Qp(i&X1KrG7ZdPkCVzFl%28wBgnvjEFUxmxWz=B%dt#^GV%7hQ zt2Yd}iVd`{GxG7vWg#oPTfSf4s*5w*S-S!+Qx1p0i57jqCrE;T8-K9Xl@>MF(z8o+DpG zKWfI~nScDyeANbfJ00t5Ct~CgfOTv5r@~?xZeoDwtHC8n=BUBmJJ!;-kIIkq@5W5k z!7~K3ydS;riKj_5fB0FKIow`-MWBn9<-55uY6aU~`ud133`d$>`{j1Uu;FhB96ug@ zCxZOK+P8m}%c#+j^wP+La&5vy9TMI>9PN99F@M0RI+jg74;aBNltyo8_jS}6I3d!V z2l-1w>jm9L9mZb&AabSG5@Lhr!lbC$@VJ@DT4;#KA7G-# zu}s^nprLfif99k}imFL6zj9rdWR9In#D%l{p+sCDMb!XgvexKi(J&qCL{OwtJ%Mz} z4}X9ZRl|nKX=^M~G)xCCCMZ&GI?&VQ#|BbV4VyAqYih0}$sF5B#D(roUpnQ-CQ?)l zE|Scr=1Q{*<$`Xbkw}OgJmBr_^d;f~Tu4zhY_Yt;bBmSS!|Ib&{&dwQpf$!?nuTP0 iQ?kvoXSaYY{s%c-fe<`ZxWfPd002ovP6b4+LSTY4mc01@ diff --git a/test/e2e/fixtures/squish.py b/test/e2e/fixtures/squish.py index 7b767c9151..acb3a2373c 100644 --- a/test/e2e/fixtures/squish.py +++ b/test/e2e/fixtures/squish.py @@ -1,3 +1,4 @@ +import allure import pytest from driver.server import SquishServer @@ -18,3 +19,4 @@ def start_squish_server(): pytest.exit(err) yield squish_server squish_server.stop() + allure.attach.file('Squish server config', str(squish_server.config)) diff --git a/test/e2e/scripts/tools/image.py b/test/e2e/scripts/tools/image.py index 502a53a26f..4fe5a5b3be 100755 --- a/test/e2e/scripts/tools/image.py +++ b/test/e2e/scripts/tools/image.py @@ -230,6 +230,6 @@ def compare(actual: Image, _logger.warning(f'VP file updated: {expected_fp}') break else: - raise AssertionError('Comparison failed') + raise AssertionError('Images comparison failed') _logger.info(f'Screenshot comparison passed')