From b3d396d0d29cbfc45cf055e8507688a7d46e610b Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 17 Oct 2025 10:24:14 -0400 Subject: [PATCH 1/3] [google_sign_in] Disable flaky web test This test is flaking very frequently on WASM. Disabling since it's disrupting the tree, and there hasn't been any progress on investigating the cause of the regression. Tracked in https://github.com/flutter/flutter/issues/176299 --- .../flexible_size_html_element_view_test.dart | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart b/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart index 182552803048..e3196c0bdc43 100644 --- a/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart +++ b/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart @@ -22,21 +22,25 @@ void main() { widgetFactoryNumber++; }); - testWidgets('empty case, calls onElementCreated', ( - WidgetTester tester, - ) async { - final Completer viewCreatedCompleter = Completer(); - - await pumpResizableWidget( - tester, - onElementCreated: (Object view) { - viewCreatedCompleter.complete(view); - }, - ); - await tester.pumpAndSettle(); + testWidgets( + 'empty case, calls onElementCreated', + (WidgetTester tester) async { + final Completer viewCreatedCompleter = Completer(); + + await pumpResizableWidget( + tester, + onElementCreated: (Object view) { + viewCreatedCompleter.complete(view); + }, + ); + await tester.pumpAndSettle(); - await expectLater(viewCreatedCompleter.future, completes); - }); + await expectLater(viewCreatedCompleter.future, completes); + }, + // Extremely flaky on WASM. + // See https://github.com/flutter/flutter/issues/176299 + skip: true, + ); testWidgets('empty case, renders with initial size', ( WidgetTester tester, From 13f7d6853b3d414c9910583f1c3e71ca8f441186 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 17 Oct 2025 11:08:23 -0400 Subject: [PATCH 2/3] Disable the next one --- .../flexible_size_html_element_view_test.dart | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart b/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart index e3196c0bdc43..47b92cbe27f1 100644 --- a/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart +++ b/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart @@ -42,21 +42,25 @@ void main() { skip: true, ); - testWidgets('empty case, renders with initial size', ( - WidgetTester tester, - ) async { - const Size initialSize = Size(160, 100); + testWidgets( + 'empty case, renders with initial size', + (WidgetTester tester) async { + const Size initialSize = Size(160, 100); - final Element element = await pumpResizableWidget( - tester, - initialSize: initialSize, - ); - await tester.pumpAndSettle(); + final Element element = await pumpResizableWidget( + tester, + initialSize: initialSize, + ); + await tester.pumpAndSettle(); - // Expect that the element matches the initialSize. - expect(element.size!.width, initialSize.width); - expect(element.size!.height, initialSize.height); - }); + // Expect that the element matches the initialSize. + expect(element.size!.width, initialSize.width); + expect(element.size!.height, initialSize.height); + }, + // Extremely flaky on WASM. + // See https://github.com/flutter/flutter/issues/176299 + skip: true, + ); testWidgets('initialSize null, adopts size of injected element', ( WidgetTester tester, From f0c8f83fbd8d1d65f6629bf8c08bc3c313762bd4 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 17 Oct 2025 11:37:34 -0400 Subject: [PATCH 3/3] Disable the entire test file --- ...size_html_element_view_test_disabled.dart} | 64 +++++++++---------- 1 file changed, 30 insertions(+), 34 deletions(-) rename packages/google_sign_in/google_sign_in_web/example/integration_test/{flexible_size_html_element_view_test.dart => flexible_size_html_element_view_test_disabled.dart} (82%) diff --git a/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart b/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test_disabled.dart similarity index 82% rename from packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart rename to packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test_disabled.dart index 47b92cbe27f1..b9d85e5fd704 100644 --- a/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test.dart +++ b/packages/google_sign_in/google_sign_in_web/example/integration_test/flexible_size_html_element_view_test_disabled.dart @@ -11,6 +11,10 @@ import 'package:google_sign_in_web/src/flexible_size_html_element_view.dart'; import 'package:integration_test/integration_test.dart'; import 'package:web/web.dart' as web; +// TODO(stuartmorgan): Re-enable this test, by renaming it not to end with +// _disabled. It is currently extremely flaky on WASM, see +// https://github.com/flutter/flutter/issues/176299 + /// Used to keep track of the number of HtmlElementView factories the test has registered. int widgetFactoryNumber = 0; @@ -22,45 +26,37 @@ void main() { widgetFactoryNumber++; }); - testWidgets( - 'empty case, calls onElementCreated', - (WidgetTester tester) async { - final Completer viewCreatedCompleter = Completer(); + testWidgets('empty case, calls onElementCreated', ( + WidgetTester tester, + ) async { + final Completer viewCreatedCompleter = Completer(); - await pumpResizableWidget( - tester, - onElementCreated: (Object view) { - viewCreatedCompleter.complete(view); - }, - ); - await tester.pumpAndSettle(); + await pumpResizableWidget( + tester, + onElementCreated: (Object view) { + viewCreatedCompleter.complete(view); + }, + ); + await tester.pumpAndSettle(); - await expectLater(viewCreatedCompleter.future, completes); - }, - // Extremely flaky on WASM. - // See https://github.com/flutter/flutter/issues/176299 - skip: true, - ); + await expectLater(viewCreatedCompleter.future, completes); + }); - testWidgets( - 'empty case, renders with initial size', - (WidgetTester tester) async { - const Size initialSize = Size(160, 100); + testWidgets('empty case, renders with initial size', ( + WidgetTester tester, + ) async { + const Size initialSize = Size(160, 100); - final Element element = await pumpResizableWidget( - tester, - initialSize: initialSize, - ); - await tester.pumpAndSettle(); + final Element element = await pumpResizableWidget( + tester, + initialSize: initialSize, + ); + await tester.pumpAndSettle(); - // Expect that the element matches the initialSize. - expect(element.size!.width, initialSize.width); - expect(element.size!.height, initialSize.height); - }, - // Extremely flaky on WASM. - // See https://github.com/flutter/flutter/issues/176299 - skip: true, - ); + // Expect that the element matches the initialSize. + expect(element.size!.width, initialSize.width); + expect(element.size!.height, initialSize.height); + }); testWidgets('initialSize null, adopts size of injected element', ( WidgetTester tester,