Skip to content

Commit

Permalink
Disable focused_text_field golden on Firefox (flutter#23442)
Browse files Browse the repository at this point in the history
  • Loading branch information
yjbanov authored Jan 6, 2021
1 parent 82a7556 commit f095a77
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
8 changes: 8 additions & 0 deletions e2etests/web/regular_integration_tests/lib/common.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:html';

/// Whether the current browser is Firefox.
bool get isFirefox => window.navigator.userAgent.toLowerCase().contains('firefox');
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import 'dart:js_util' as js_util;
import 'package:flutter/gestures.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:regular_integration_tests/text_editing_main.dart' as app;
import 'package:flutter/material.dart';

import 'package:integration_test/integration_test.dart';

import 'package:regular_integration_tests/text_editing_main.dart' as app;
import 'package:regular_integration_tests/common.dart';

void main() {
final IntegrationTestWidgetsFlutterBinding binding =
IntegrationTestWidgetsFlutterBinding.ensureInitialized()
Expand Down Expand Up @@ -44,7 +45,13 @@ void main() {
// DOM element's value also changes.
expect(input.value, 'New Value');

await binding.takeScreenshot('focused_text_field');
// Firefox can't make up its mind about what the screenshot should
// look like between LUCI and local.
//
// https://github.com/flutter/flutter/issues/73382
if (!isFirefox) {
await binding.takeScreenshot('focused_text_field');
}
});

testWidgets('Input field with no initial value works',
Expand Down

0 comments on commit f095a77

Please sign in to comment.