From fa627e43f86c57835399683eb7f7ea4e4f47efc5 Mon Sep 17 00:00:00 2001 From: nturgut Date: Wed, 16 Sep 2020 14:47:13 -0700 Subject: [PATCH 01/19] enable ios safari screenshot tests --- lib/web_ui/dev/test_runner.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/web_ui/dev/test_runner.dart b/lib/web_ui/dev/test_runner.dart index e459a0c0efcff..9a47be49db03b 100644 --- a/lib/web_ui/dev/test_runner.dart +++ b/lib/web_ui/dev/test_runner.dart @@ -402,7 +402,8 @@ class TestCommand extends Command with ArgUtils { // after solving the git issue faced on macOS and Windows bots: // TODO: https://github.com/flutter/flutter/issues/63710 if ((isChrome && isLuci && io.Platform.isLinux) || - ((isChrome || isSafariIOS) && !isLuci)) { + (isChrome && !isLuci) || (isSafariIOS && isLuci)) { + print('INFO: Also running the screenshot tests.'); // Separate screenshot tests from unit-tests. Screenshot tests must run // one at a time. Otherwise, they will end up screenshotting each other. // This is not an issue for unit-tests. From 894d223d7486b1da0db098eac2fdb0bd6d7fbebb Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 17 Sep 2020 14:40:55 -0700 Subject: [PATCH 02/19] this is the value used for screenshots in the repo. --- lib/web_ui/dev/browser_lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/dev/browser_lock.yaml b/lib/web_ui/dev/browser_lock.yaml index 09f2f56ab5673..14fe8afbe8e95 100644 --- a/lib/web_ui/dev/browser_lock.yaml +++ b/lib/web_ui/dev/browser_lock.yaml @@ -34,7 +34,7 @@ ios-safari: # `heightOfHeader` is the number of pixels taken by the phone's header menu # and the browsers address bar. # TODO: https://github.com/flutter/flutter/issues/65672 - heightOfHeader: 282 + heightOfHeader: 283 # `heightOfFooter` is the number of pixels taken by the phone's navigation # menu. heightOfFooter: 250 From cf1ec4612f2936452d93210afba46c10cb52fb7a Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 17 Sep 2020 14:53:15 -0700 Subject: [PATCH 03/19] change revision --- lib/web_ui/dev/goldens_lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/dev/goldens_lock.yaml b/lib/web_ui/dev/goldens_lock.yaml index 1c38c1ca3a378..e0bc7da583bd0 100644 --- a/lib/web_ui/dev/goldens_lock.yaml +++ b/lib/web_ui/dev/goldens_lock.yaml @@ -1,2 +1,2 @@ repository: https://github.com/flutter/goldens.git -revision: b6efc75885c23f0b5c485d8bd659ed339feec9ec +revision: 29f96fb5ade354bb23d4c59d374f352f0070bb43 From b5f41930b45e4d5dd51e1ab36f8e74fc1025cf72 Mon Sep 17 00:00:00 2001 From: nturgut Date: Fri, 18 Sep 2020 13:36:06 -0700 Subject: [PATCH 04/19] fix the error made in the gaps --- lib/web_ui/dev/browser_lock.yaml | 4 ++-- lib/web_ui/dev/test_runner.dart | 3 ++- .../golden_files/smoke_test.iOS_Safari.png | Bin 2517 -> 2003 bytes 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/web_ui/dev/browser_lock.yaml b/lib/web_ui/dev/browser_lock.yaml index 14fe8afbe8e95..1a68a934932c6 100644 --- a/lib/web_ui/dev/browser_lock.yaml +++ b/lib/web_ui/dev/browser_lock.yaml @@ -34,7 +34,7 @@ ios-safari: # `heightOfHeader` is the number of pixels taken by the phone's header menu # and the browsers address bar. # TODO: https://github.com/flutter/flutter/issues/65672 - heightOfHeader: 283 + heightOfHeader: 189 # `heightOfFooter` is the number of pixels taken by the phone's navigation # menu. heightOfFooter: 250 @@ -45,7 +45,7 @@ ios-safari: # phone screeen we enlarge or shrink the area by applying a linear # transformation by a scale_factor (a.k.a. we perform isotropic scaling). # This value will be differ depending on the phone. - scaleFactor: 1.15 + scaleFactor: 1.145 ## geckodriver is used for testing Firefox Browser. It works with multiple ## Firefox Browser versions. diff --git a/lib/web_ui/dev/test_runner.dart b/lib/web_ui/dev/test_runner.dart index 9a47be49db03b..8f842674c3b77 100644 --- a/lib/web_ui/dev/test_runner.dart +++ b/lib/web_ui/dev/test_runner.dart @@ -402,7 +402,8 @@ class TestCommand extends Command with ArgUtils { // after solving the git issue faced on macOS and Windows bots: // TODO: https://github.com/flutter/flutter/issues/63710 if ((isChrome && isLuci && io.Platform.isLinux) || - (isChrome && !isLuci) || (isSafariIOS && isLuci)) { + ((isChrome || isSafariIOS) && !isLuci) || + (isSafariIOS && isLuci)) { print('INFO: Also running the screenshot tests.'); // Separate screenshot tests from unit-tests. Screenshot tests must run // one at a time. Otherwise, they will end up screenshotting each other. diff --git a/lib/web_ui/test/golden_files/smoke_test.iOS_Safari.png b/lib/web_ui/test/golden_files/smoke_test.iOS_Safari.png index bd156b44e38a51010202fd0d48726cc36b6e8786..2a9a0ad22b2a34db9e7dfd0bea24956235d1ed2b 100644 GIT binary patch literal 2003 zcmeH||2xwO0LLfKb$gQ0br-dk;>y!?$4Rw(*;Ld>txjgonI&}ea1=Ac?90W~h zR$(w0`;g$EFbu{fnW6q}S&ix# zh_Q~QV$#{eR}nFbncf|31)Qel474J0BpcPT1Uhl(h&WpMau3a2?BAO#RnD!z?m7W3 zN3v)8X^M^BM2$=vA+?yTBu&8LaYRWsOv?14b5!MRwauPJ<@+4QCtTuf7LNGfm;4ws6#i@6R!1fxE&_-H%YmQh3kN*E2s zX^4_1(`Ib6j8*|0ef>bH0(iLxA7Gj3S!06bj9HI$nfU0OACQ408rSRt6FeC$PgaHU z)fnrpP&*D~_OWfl=W_?WXBUXN+UCIvlRV0Ox1|qHSx?*M-^bCH1~0nx5w+p$ z_hp6yLkZ$Sp+2qCnVsIq5L{|SbiFeVvxq3J9>$|RFQgYg zZOVWC>x+t`k`{B{K}dd6)ji(boRri`r z4PGT<21bex>L0MY*JI}^aVeyNt5hEEgtqG($oquV$)sa@ZyE2_063r9iT`}1pf*)C zU&5KYDRgZPODR=}v@A#lw@w!&aou&(Q+6KCAm`Z{S}AjnwjP$Mt_e__JV7thMM{xg zLtwlYuYwGd(1K|M*JAY@UC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`pU4Ga)evMKFEx! zG+NywUe{s4yi2)+L)0!Pa@yT~_;t1Oa-JM-7d!g9KarG`bJMcKO{Mvb zuM4s7j2Q7{TDk2O)JAw1cH?R^ahAhAd;1YLECbCIo=q{C>_y_g*%Xx!T1UFicI&su z?}Kr}L$(d=4qeL~0ZK>F&eW6zUtbVQTAiVGf~p~pNI(m=&4AoH5**{IGOv<1OOw&_ z5dFewIJ0_f+Of?`?t~?5U(r(lKNumn5ju_=^(H znS#~2in?Mt8a(bE&a~m`nc#nZiOsvzU;q(jZ$HShfT&^lIP9JjGhQBF#qPG-(iYiG zrY2ivQ&L65Zpmsn7q?|!tvr-r$=L37o7BFDr+oA}7F*-3zw}2T_D|c|KxgkaJI;7% zX~Lo;O(ar=EEzQLk@%qhO*V`nwx-d6nuDu*{Ai^D2zsyQKe0xZn2G}9e>l#3mY>u3 fT!z24pmH6L>U8Ko)jaU&u0aCO!6?=@S8n|uEz@*? From 4e92174d5ab6840eb472361341e780809d90a029 Mon Sep 17 00:00:00 2001 From: nturgut Date: Fri, 18 Sep 2020 14:02:14 -0700 Subject: [PATCH 05/19] do not try to fetch on LUCI --- lib/web_ui/dev/test_platform.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/web_ui/dev/test_platform.dart b/lib/web_ui/dev/test_platform.dart index cc0a5d58feda0..19880d823220f 100644 --- a/lib/web_ui/dev/test_platform.dart +++ b/lib/web_ui/dev/test_platform.dart @@ -197,7 +197,9 @@ class BrowserPlatform extends PlatformPlugin { 'golden_files', ); } else { - await fetchGoldens(); + if (!isLuci) { + await fetchGoldens(); + } goldensDirectory = p.join( env.environment.webUiGoldensRepositoryDirectory.path, 'engine', From 7c08b164f7df654ea5f726aeaa278de9042e131c Mon Sep 17 00:00:00 2001 From: nturgut Date: Fri, 18 Sep 2020 14:37:40 -0700 Subject: [PATCH 06/19] lunix luci migth break existing prs. only skip fetching for mac --- lib/web_ui/dev/test_platform.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/dev/test_platform.dart b/lib/web_ui/dev/test_platform.dart index 19880d823220f..e6f03b355795c 100644 --- a/lib/web_ui/dev/test_platform.dart +++ b/lib/web_ui/dev/test_platform.dart @@ -197,7 +197,7 @@ class BrowserPlatform extends PlatformPlugin { 'golden_files', ); } else { - if (!isLuci) { + if(!isLuci || !Platform.isMacOS) { await fetchGoldens(); } goldensDirectory = p.join( From 7f935db53ca1ea3648d8016f99db8f4f188df1e8 Mon Sep 17 00:00:00 2001 From: nturgut Date: Fri, 18 Sep 2020 17:44:12 -0700 Subject: [PATCH 07/19] add a placeholder tests for shadow golden test --- .../golden_tests/engine/shadow_golden_test.dart | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/web_ui/test/golden_tests/engine/shadow_golden_test.dart b/lib/web_ui/test/golden_tests/engine/shadow_golden_test.dart index 307cdb583caad..1822bc1c3e985 100644 --- a/lib/web_ui/test/golden_tests/engine/shadow_golden_test.dart +++ b/lib/web_ui/test/golden_tests/engine/shadow_golden_test.dart @@ -75,7 +75,8 @@ void testMain() async { builder.pop(); // offset } - void _paintBitmapCanvasShadow(double elevation, Offset offset, bool transparentOccluder) { + void _paintBitmapCanvasShadow( + double elevation, Offset offset, bool transparentOccluder) { final SurfacePath path = SurfacePath() ..addRect(const Rect.fromLTRB(0, 0, 20, 20)); builder.pushOffset(offset.dx, offset.dy); @@ -168,4 +169,15 @@ void testMain() async { }, testOn: 'chrome', ); + + /// For dart testing having `no tests ran` in a file is considered an error + /// and result in exit code 1. + /// See: https://github.com/dart-lang/test/pull/1173 + /// + /// Since screenshot tests run one by one and exit code is checked immediately + /// after that a test file that only runs in chrome will break the other + /// browsers. This method is added as a bandaid solution. + test('dummy tests to pass on other browsers', () async { + expect(2 + 2, 4); + }); } From 3a170aa74780355a93c674e2ca9097e5c2eec33a Mon Sep 17 00:00:00 2001 From: nturgut Date: Mon, 21 Sep 2020 09:02:44 -0700 Subject: [PATCH 08/19] try to use iPhone 11 Pro on LUCI --- lib/web_ui/dev/browser_lock.yaml | 6 +++--- .../golden_files/smoke_test.iOS_Safari.png | Bin 2003 -> 2517 bytes 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/web_ui/dev/browser_lock.yaml b/lib/web_ui/dev/browser_lock.yaml index 1a68a934932c6..b324c09ad3316 100644 --- a/lib/web_ui/dev/browser_lock.yaml +++ b/lib/web_ui/dev/browser_lock.yaml @@ -26,7 +26,7 @@ ios-safari: # `heightOfHeader` during this time. majorVersion: 13 minorVersion: 0 - device: 'iPhone 11' + device: 'iPhone 11 Pro' # `xcrun simctl` command is used to take screenshots. It takes the screenshot # of the entire simulator. Therefore we need to crop all the parts other than # the browsers' content. This file must be in sync with the local and LUCI @@ -34,7 +34,7 @@ ios-safari: # `heightOfHeader` is the number of pixels taken by the phone's header menu # and the browsers address bar. # TODO: https://github.com/flutter/flutter/issues/65672 - heightOfHeader: 189 + heightOfHeader: 282 # `heightOfFooter` is the number of pixels taken by the phone's navigation # menu. heightOfFooter: 250 @@ -45,7 +45,7 @@ ios-safari: # phone screeen we enlarge or shrink the area by applying a linear # transformation by a scale_factor (a.k.a. we perform isotropic scaling). # This value will be differ depending on the phone. - scaleFactor: 1.145 + scaleFactor: 1.15 ## geckodriver is used for testing Firefox Browser. It works with multiple ## Firefox Browser versions. diff --git a/lib/web_ui/test/golden_files/smoke_test.iOS_Safari.png b/lib/web_ui/test/golden_files/smoke_test.iOS_Safari.png index 2a9a0ad22b2a34db9e7dfd0bea24956235d1ed2b..bd156b44e38a51010202fd0d48726cc36b6e8786 100644 GIT binary patch literal 2517 zcmeHJ|2xx*0$wCHF2|m3N{Ws>a-I?u$E=0hv2m0y+c_@fYvE957#7ws-|ChnwnK_# zZ5+pOPq9&&!-muc%h)0Z*Ji$qed;pvZMHGn?ff78@;>kT)B8N{^S;mX-opg@TbLa( zgFqk_0pFs&gFtqrec}s$+w%!8^fu-|AbaTnsPm!3T?$DOIeNj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$4Rw(*;Ld>txjgonI&}ea1=Ac?90W~h zR$(w0`;g$EFbu{fnW6q}S&ix# zh_Q~QV$#{eR}nFbncf|31)Qel474J0BpcPT1Uhl(h&WpMau3a2?BAO#RnD!z?m7W3 zN3v)8X^M^BM2$=vA+?yTBu&8LaYRWsOv?14b5!MRwauPJ<@+4QCtTuf7LNGfm;4ws6#i@6R!1fxE&_-H%YmQh3kN*E2s zX^4_1(`Ib6j8*|0ef>bH0(iLxA7Gj3S!06bj9HI$nfU0OACQ408rSRt6FeC$PgaHU z)fnrpP&*D~_OWfl=W_?WXBUXN+UCIvlRV0Ox1|qHSx?*M-^bCH1~0nx5w+p$ z_hp6yLkZ$Sp+2qCnVsIq5L{|SbiFeVvxq3J9>$|RFQgYg zZOVWC>x+t`k`{B{K}dd6)ji(boRri`r z4PGT<21bex>L0MY*JI}^aVeyNt5hEEgtqG($oquV$)sa@ZyE2_063r9iT`}1pf*)C zU&5KYDRgZPODR=}v@A#lw@w!&aou&(Q+6KCAm`Z{S}AjnwjP$Mt_e__JV7thMM{xg zLtwlYuYwGd(1K|M*JAY@UC(hbp>OBPOrt=LpkBA-}UxwKpWN>zJXqj7@2UZD9iXj?HAfoO?VvqCQgvP&Tbs zEIf*bfCR9Fd@TC4CiZt=33U;8%}iEsP;9Ljezw+XweA*z-AC#h!<3%j;$%mz1Jy+W z@|Dw2ks4kw7lyp%iu}vALh{brf%9G7alE3aZTrO%am&c?TEfC|dB4avF$aO%ADA=D zk60=KcYH39lr{!B@|UyB+HJ+Cw9jON{QxqnuM=K@u}flJ!+dv2rF|ZY``JF{!IfAy z4JIZJzq#O?ZQhy`;rCDM9S=3xJi!t_!A~Rn&rG-`ux+UPHfnGRbo+SLn2>|ipoRmd G&i@BC^rHp< From cc99a7b6cead46d87c78c9471ae842a0fcf629c3 Mon Sep 17 00:00:00 2001 From: nturgut Date: Mon, 21 Sep 2020 14:04:46 -0700 Subject: [PATCH 09/19] change the scale and the smoke test image --- lib/web_ui/dev/browser_lock.yaml | 7 ++++--- .../golden_files/smoke_test.iOS_Safari.png | Bin 2517 -> 1839 bytes 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/web_ui/dev/browser_lock.yaml b/lib/web_ui/dev/browser_lock.yaml index b324c09ad3316..b1a83fe5869a0 100644 --- a/lib/web_ui/dev/browser_lock.yaml +++ b/lib/web_ui/dev/browser_lock.yaml @@ -26,7 +26,7 @@ ios-safari: # `heightOfHeader` during this time. majorVersion: 13 minorVersion: 0 - device: 'iPhone 11 Pro' + device: 'iPhone 11' # `xcrun simctl` command is used to take screenshots. It takes the screenshot # of the entire simulator. Therefore we need to crop all the parts other than # the browsers' content. This file must be in sync with the local and LUCI @@ -34,7 +34,7 @@ ios-safari: # `heightOfHeader` is the number of pixels taken by the phone's header menu # and the browsers address bar. # TODO: https://github.com/flutter/flutter/issues/65672 - heightOfHeader: 282 + heightOfHeader: 189 # `heightOfFooter` is the number of pixels taken by the phone's navigation # menu. heightOfFooter: 250 @@ -45,7 +45,8 @@ ios-safari: # phone screeen we enlarge or shrink the area by applying a linear # transformation by a scale_factor (a.k.a. we perform isotropic scaling). # This value will be differ depending on the phone. - scaleFactor: 1.15 + # For iOS 13.0 iPhone 11 Pro, this number is 1.15. + scaleFactor: 1.00 ## geckodriver is used for testing Firefox Browser. It works with multiple ## Firefox Browser versions. diff --git a/lib/web_ui/test/golden_files/smoke_test.iOS_Safari.png b/lib/web_ui/test/golden_files/smoke_test.iOS_Safari.png index bd156b44e38a51010202fd0d48726cc36b6e8786..7f2995f12a42c8a2a0664bb68447f123a560c6b9 100644 GIT binary patch literal 1839 zcmeH||5K6&0LEXPg>^M+ZIvbBEaxiIT~?ZksArk8q$7b`DjMe3l*kb#BD&_%MS5GM zeKXIy6^mCubV`b-O(#x8uk;m3@vTfv&=3(wzOH{_zxB&=&)w&@=RS8&`Kj2bjq7); z2LNDW^zld>062tw?0wE_KjvMhKo9`d8loe^$gWXpNH2eW}FmzO3O}p?(r(^yVn>pY}Mz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3mY>u3 fT!z24pmH6L>U8Ko)jaU&u0aCO!6?=@S8n|uEz@*? From 5dac5246483d7b4ce1192e618644cf49e393f1da Mon Sep 17 00:00:00 2001 From: nturgut Date: Mon, 21 Sep 2020 17:55:11 -0700 Subject: [PATCH 10/19] add unmerged goldens PR to tests all the screenshots. will be removed later --- lib/web_ui/dev/goldens_lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web_ui/dev/goldens_lock.yaml b/lib/web_ui/dev/goldens_lock.yaml index e0bc7da583bd0..2152f4b9edc88 100644 --- a/lib/web_ui/dev/goldens_lock.yaml +++ b/lib/web_ui/dev/goldens_lock.yaml @@ -1,2 +1,2 @@ -repository: https://github.com/flutter/goldens.git -revision: 29f96fb5ade354bb23d4c59d374f352f0070bb43 +repository: https://github.com/nturgut/goldens.git +revision: 6c0176a45e154f2fa82d3d56ca8f5c6c6cb90833 From 494207e7f7a3aba0e7ba15e35bed870881b2a456 Mon Sep 17 00:00:00 2001 From: nturgut Date: Wed, 23 Sep 2020 10:13:50 -0700 Subject: [PATCH 11/19] change the goldens lock back to flutter/goldens --- lib/web_ui/dev/goldens_lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web_ui/dev/goldens_lock.yaml b/lib/web_ui/dev/goldens_lock.yaml index 2152f4b9edc88..e0bc7da583bd0 100644 --- a/lib/web_ui/dev/goldens_lock.yaml +++ b/lib/web_ui/dev/goldens_lock.yaml @@ -1,2 +1,2 @@ -repository: https://github.com/nturgut/goldens.git -revision: 6c0176a45e154f2fa82d3d56ca8f5c6c6cb90833 +repository: https://github.com/flutter/goldens.git +revision: 29f96fb5ade354bb23d4c59d374f352f0070bb43 From 12775504e431a1399e7814ffa86cfa281a2a4e73 Mon Sep 17 00:00:00 2001 From: nturgut Date: Wed, 23 Sep 2020 10:30:13 -0700 Subject: [PATCH 12/19] change wrong comment on screenshot tests block --- lib/web_ui/dev/test_runner.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/web_ui/dev/test_runner.dart b/lib/web_ui/dev/test_runner.dart index 8f842674c3b77..5ad1b3b53dfc3 100644 --- a/lib/web_ui/dev/test_runner.dart +++ b/lib/web_ui/dev/test_runner.dart @@ -397,9 +397,8 @@ class TestCommand extends Command with ArgUtils { 'test', )); - // Screenshot tests and smoke tests only run on: "Chrome/iOS Safari locally" - // or "Chrome on a Linux bot". We can remove the Linux bot restriction - // after solving the git issue faced on macOS and Windows bots: + // Screenshot tests and smoke tests only run on: "Chrome/iOS Safari" + // locally and on LUCI. They are not available on Windows bots: // TODO: https://github.com/flutter/flutter/issues/63710 if ((isChrome && isLuci && io.Platform.isLinux) || ((isChrome || isSafariIOS) && !isLuci) || From 75e0e995dd8ab4e6c3203c9d3546e39f1b6c23dc Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 24 Sep 2020 16:23:24 -0700 Subject: [PATCH 13/19] address reviewer comments --- lib/web_ui/dev/test_platform.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/web_ui/dev/test_platform.dart b/lib/web_ui/dev/test_platform.dart index e6f03b355795c..d26be414abab2 100644 --- a/lib/web_ui/dev/test_platform.dart +++ b/lib/web_ui/dev/test_platform.dart @@ -197,7 +197,11 @@ class BrowserPlatform extends PlatformPlugin { 'golden_files', ); } else { - if(!isLuci || !Platform.isMacOS) { + // On LUCI MacOS bots the goldens are fetched by the recipe code. + // Fetch the goldens if: + // - Tests are running on a local machine. + // - Tests are running on an OS other than macOS. + if (!isLuci || !Platform.isMacOS) { await fetchGoldens(); } goldensDirectory = p.join( From d43d7bbbcae3b88c2bb8b6b132cc6f392c2419b3 Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 24 Sep 2020 16:46:31 -0700 Subject: [PATCH 14/19] change the commit number for goldens file --- lib/web_ui/dev/goldens_lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/dev/goldens_lock.yaml b/lib/web_ui/dev/goldens_lock.yaml index e0bc7da583bd0..7e8086c4dec4d 100644 --- a/lib/web_ui/dev/goldens_lock.yaml +++ b/lib/web_ui/dev/goldens_lock.yaml @@ -1,2 +1,2 @@ repository: https://github.com/flutter/goldens.git -revision: 29f96fb5ade354bb23d4c59d374f352f0070bb43 +revision: f35b9cad1754a811e244d741769dc96f01573b75 From 0a8de2d5cb281abde072a5cef61028229c0ef9e5 Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 24 Sep 2020 16:57:28 -0700 Subject: [PATCH 15/19] skip canvas blend mode tests --- .../golden_tests/engine/canvas_image_blend_mode_test.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/web_ui/test/golden_tests/engine/canvas_image_blend_mode_test.dart b/lib/web_ui/test/golden_tests/engine/canvas_image_blend_mode_test.dart index 962d930d8884f..e5581be96687a 100644 --- a/lib/web_ui/test/golden_tests/engine/canvas_image_blend_mode_test.dart +++ b/lib/web_ui/test/golden_tests/engine/canvas_image_blend_mode_test.dart @@ -108,7 +108,9 @@ void testMain() async { rc.restore(); await _checkScreenshot(rc, 'canvas_image_blend_group$blendGroup', maxDiffRatePercent: 8.0); - }); + }, + skip: browserEngine == BrowserEngine.webkit && + operatingSystem == OperatingSystem.iOs); } // Regression test for https://github.com/flutter/flutter/issues/56971 From 7099efbe8d6a9f12569831836012bf556b073b2e Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 24 Sep 2020 17:32:51 -0700 Subject: [PATCH 16/19] debugging LUCI error --- lib/web_ui/dev/test_platform.dart | 7 ++++++- lib/web_ui/dev/test_runner.dart | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/web_ui/dev/test_platform.dart b/lib/web_ui/dev/test_platform.dart index d26be414abab2..dc0e9fad16e39 100644 --- a/lib/web_ui/dev/test_platform.dart +++ b/lib/web_ui/dev/test_platform.dart @@ -202,7 +202,12 @@ class BrowserPlatform extends PlatformPlugin { // - Tests are running on a local machine. // - Tests are running on an OS other than macOS. if (!isLuci || !Platform.isMacOS) { + print('INFO: fetch goldens'); await fetchGoldens(); + } else { + if (!env.environment.webUiGoldensRepositoryDirectory.existsSync()) { + throw Exception('The goldens directory must have been copied'); + } } goldensDirectory = p.join( env.environment.webUiGoldensRepositoryDirectory.path, @@ -218,7 +223,7 @@ class BrowserPlatform extends PlatformPlugin { )); if (!file.existsSync() && !write) { return ''' -Golden file $filename does not exist. +Golden file $filename does not exist on path ${file.absolute.path} To automatically create this file call matchGoldenFile('$filename', write: true). '''; diff --git a/lib/web_ui/dev/test_runner.dart b/lib/web_ui/dev/test_runner.dart index 5ad1b3b53dfc3..8735b545b89dc 100644 --- a/lib/web_ui/dev/test_runner.dart +++ b/lib/web_ui/dev/test_runner.dart @@ -189,6 +189,15 @@ class TestCommand extends Command with ArgUtils { } environment.webUiTestResultsDirectory.createSync(recursive: true); + if (isLuci && + io.Platform.isMacOS && + !environment.webUiGoldensRepositoryDirectory.existsSync()) { + throw Exception('The goldens directory must have been copied'); + } else { + print('found the golden directory printing out the contents'); + + } + // In order to run iOS Safari unit tests we need to make sure iOS Simulator // is booted. if (isSafariIOS) { From 5833817a9992707857a869a69546358d051df3b3 Mon Sep 17 00:00:00 2001 From: nturgut Date: Thu, 24 Sep 2020 17:36:44 -0700 Subject: [PATCH 17/19] debugging LUCI error printing directory contents --- lib/web_ui/dev/test_runner.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/web_ui/dev/test_runner.dart b/lib/web_ui/dev/test_runner.dart index 8735b545b89dc..535dbb778a97b 100644 --- a/lib/web_ui/dev/test_runner.dart +++ b/lib/web_ui/dev/test_runner.dart @@ -195,7 +195,18 @@ class TestCommand extends Command with ArgUtils { throw Exception('The goldens directory must have been copied'); } else { print('found the golden directory printing out the contents'); + final List entities = environment + .webUiGoldensRepositoryDirectory + .listSync(followLinks: false); + for (io.FileSystemEntity e in entities) { + if (e is io.File) { + print('found file: ${e.absolute.path}'); + } + if (e is io.Directory) { + print('directory found: ${e.absolute.path}'); + } + } } // In order to run iOS Safari unit tests we need to make sure iOS Simulator From 33847a82bfc8f65e9396b4f47b503c5904d937a8 Mon Sep 17 00:00:00 2001 From: nturgut Date: Fri, 25 Sep 2020 09:53:35 -0700 Subject: [PATCH 18/19] skip one test, remove the debug logs --- lib/web_ui/dev/test_platform.dart | 1 - lib/web_ui/dev/test_runner.dart | 20 ------------------- .../engine/text_placeholders_test.dart | 10 +++++++++- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/lib/web_ui/dev/test_platform.dart b/lib/web_ui/dev/test_platform.dart index dc0e9fad16e39..18dd92cf1c45e 100644 --- a/lib/web_ui/dev/test_platform.dart +++ b/lib/web_ui/dev/test_platform.dart @@ -202,7 +202,6 @@ class BrowserPlatform extends PlatformPlugin { // - Tests are running on a local machine. // - Tests are running on an OS other than macOS. if (!isLuci || !Platform.isMacOS) { - print('INFO: fetch goldens'); await fetchGoldens(); } else { if (!env.environment.webUiGoldensRepositoryDirectory.existsSync()) { diff --git a/lib/web_ui/dev/test_runner.dart b/lib/web_ui/dev/test_runner.dart index 535dbb778a97b..5ad1b3b53dfc3 100644 --- a/lib/web_ui/dev/test_runner.dart +++ b/lib/web_ui/dev/test_runner.dart @@ -189,26 +189,6 @@ class TestCommand extends Command with ArgUtils { } environment.webUiTestResultsDirectory.createSync(recursive: true); - if (isLuci && - io.Platform.isMacOS && - !environment.webUiGoldensRepositoryDirectory.existsSync()) { - throw Exception('The goldens directory must have been copied'); - } else { - print('found the golden directory printing out the contents'); - final List entities = environment - .webUiGoldensRepositoryDirectory - .listSync(followLinks: false); - - for (io.FileSystemEntity e in entities) { - if (e is io.File) { - print('found file: ${e.absolute.path}'); - } - if (e is io.Directory) { - print('directory found: ${e.absolute.path}'); - } - } - } - // In order to run iOS Safari unit tests we need to make sure iOS Simulator // is booted. if (isSafariIOS) { diff --git a/lib/web_ui/test/golden_tests/engine/text_placeholders_test.dart b/lib/web_ui/test/golden_tests/engine/text_placeholders_test.dart index eece5fcd5e295..8b46adcb3846f 100644 --- a/lib/web_ui/test/golden_tests/engine/text_placeholders_test.dart +++ b/lib/web_ui/test/golden_tests/engine/text_placeholders_test.dart @@ -15,11 +15,17 @@ void main() { internalBootstrapBrowserTest(() => testMain); } +/// Whether we are running on iOS Safari. +// TODO: https://github.com/flutter/flutter/issues/66656 +bool get isIosSafari => browserEngine == BrowserEngine.webkit && + operatingSystem == OperatingSystem.iOs; + void testMain() async { final EngineScubaTester scuba = await EngineScubaTester.initialize( viewportSize: const Size(600, 600), ); + setUpStableTestFonts(); testEachCanvas('draws paragraphs with placeholders', (EngineCanvas canvas) { @@ -40,7 +46,9 @@ void testMain() async { } recordingCanvas.endRecording(); recordingCanvas.apply(canvas, screenRect); - return scuba.diffCanvasScreenshot(canvas, 'text_with_placeholders'); + if (!isIosSafari) { + return scuba.diffCanvasScreenshot(canvas, 'text_with_placeholders'); + } }); testEachCanvas('text alignment and placeholders', (EngineCanvas canvas) { From 382e73321c289c84b34e591ea974679426eac9e5 Mon Sep 17 00:00:00 2001 From: nturgut Date: Fri, 25 Sep 2020 11:28:53 -0700 Subject: [PATCH 19/19] change the revision number to include the correct chrome files --- lib/web_ui/dev/goldens_lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web_ui/dev/goldens_lock.yaml b/lib/web_ui/dev/goldens_lock.yaml index 7e8086c4dec4d..067577a642f6f 100644 --- a/lib/web_ui/dev/goldens_lock.yaml +++ b/lib/web_ui/dev/goldens_lock.yaml @@ -1,2 +1,2 @@ repository: https://github.com/flutter/goldens.git -revision: f35b9cad1754a811e244d741769dc96f01573b75 +revision: 1a4722227af42c3f51450266016b1a07ae459e73