mirror of
https://github.com/flutter/flutter
synced 2024-08-25 02:46:31 +00:00
[framework] Skip 5 failing framework tests. (#143618)
Part of https://github.com/flutter/flutter/issues/143616
This commit is contained in:
parent
e0f126a45e
commit
bb1c7a6ccb
19
packages/flutter/test/impeller_test_helpers.dart
Normal file
19
packages/flutter/test/impeller_test_helpers.dart
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 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:io' as io;
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
/// Whether or not Flutter CI has configured Impeller for this test run.
|
||||
///
|
||||
/// This is intended only to be used for a migration effort to enable Impeller
|
||||
/// on Flutter CI.
|
||||
///
|
||||
/// See also: https://github.com/flutter/flutter/issues/143616
|
||||
bool get impellerEnabled {
|
||||
if (kIsWeb) {
|
||||
return false;
|
||||
}
|
||||
return io.Platform.environment.containsKey('FLUTTER_TEST_IMPELLER');
|
||||
}
|
|
@ -8,6 +8,8 @@ import 'dart:ui' as ui;
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import '../impeller_test_helpers.dart';
|
||||
|
||||
const double _crispText = 100.0; // this font size is selected to avoid needing any antialiasing.
|
||||
const String _expText = 'Éxp'; // renders in the test font as:
|
||||
|
||||
|
@ -38,7 +40,7 @@ void main() {
|
|||
const Offset(799, 599): const Color(0x00000000), // the background
|
||||
},
|
||||
);
|
||||
}, skip: !canCaptureImage); // [intended] Test relies on captureImage, which is not supported on web currently.
|
||||
}, skip: !canCaptureImage || impellerEnabled); // [intended] Test relies on captureImage, which is not supported on web currently.
|
||||
|
||||
testWidgets('Default text color', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const ColoredBox(
|
||||
|
@ -63,7 +65,7 @@ void main() {
|
|||
const Offset(799, 599): const Color(0xFFABCDEF), // the background
|
||||
},
|
||||
);
|
||||
}, skip: !canCaptureImage); // [intended] Test relies on captureImage, which is not supported on web currently.
|
||||
}, skip: !canCaptureImage || impellerEnabled); // [intended] Test relies on captureImage, which is not supported on web currently.
|
||||
|
||||
testWidgets('Default text selection color', (WidgetTester tester) async {
|
||||
final GlobalKey key = GlobalKey();
|
||||
|
@ -118,7 +120,7 @@ void main() {
|
|||
const Offset(799, 599): const Color(0xFFFFFFFF), // the background
|
||||
},
|
||||
);
|
||||
}, skip: !canCaptureImage); // [intended] Test relies on captureImage, which is not supported on web currently.
|
||||
}, skip: !canCaptureImage || impellerEnabled); // [intended] Test relies on captureImage, which is not supported on web currently.
|
||||
}
|
||||
|
||||
Color _getPixel(ByteData bytes, int x, int y, int width) {
|
||||
|
|
|
@ -15,6 +15,8 @@ import 'package:flutter/rendering.dart';
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
||||
|
||||
import '../impeller_test_helpers.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('SnapshotWidget can rasterize child', (WidgetTester tester) async {
|
||||
final SnapshotController controller = SnapshotController(allowSnapshotting: true);
|
||||
|
@ -325,7 +327,7 @@ void main() {
|
|||
|
||||
await expectLater(find.byKey(repaintBoundaryKey), matchesReferenceImage(imageWhenDisabled));
|
||||
},
|
||||
skip: kIsWeb); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/106689
|
||||
skip: kIsWeb || impellerEnabled); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/106689
|
||||
|
||||
test('SnapshotPainter dispatches memory events', () async {
|
||||
await expectLater(
|
||||
|
|
|
@ -21,6 +21,7 @@ import 'package:flutter/rendering.dart';
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:leak_tracker/leak_tracker.dart';
|
||||
|
||||
import '../impeller_test_helpers.dart';
|
||||
import 'widget_inspector_test_utils.dart';
|
||||
|
||||
// Start of block of code where widget creation location line numbers and
|
||||
|
@ -3869,7 +3870,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||
_CreationLocation location = knownLocations[id]!;
|
||||
expect(location.file, equals(file));
|
||||
// ClockText widget.
|
||||
expect(location.line, equals(56));
|
||||
expect(location.line, equals(57));
|
||||
expect(location.column, equals(9));
|
||||
expect(location.name, equals('ClockText'));
|
||||
expect(count, equals(1));
|
||||
|
@ -3879,7 +3880,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||
location = knownLocations[id]!;
|
||||
expect(location.file, equals(file));
|
||||
// Text widget in _ClockTextState build method.
|
||||
expect(location.line, equals(94));
|
||||
expect(location.line, equals(95));
|
||||
expect(location.column, equals(12));
|
||||
expect(location.name, equals('Text'));
|
||||
expect(count, equals(1));
|
||||
|
@ -3906,7 +3907,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||
location = knownLocations[id]!;
|
||||
expect(location.file, equals(file));
|
||||
// ClockText widget.
|
||||
expect(location.line, equals(56));
|
||||
expect(location.line, equals(57));
|
||||
expect(location.column, equals(9));
|
||||
expect(location.name, equals('ClockText'));
|
||||
expect(count, equals(3)); // 3 clock widget instances rebuilt.
|
||||
|
@ -3916,7 +3917,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||
location = knownLocations[id]!;
|
||||
expect(location.file, equals(file));
|
||||
// Text widget in _ClockTextState build method.
|
||||
expect(location.line, equals(94));
|
||||
expect(location.line, equals(95));
|
||||
expect(location.column, equals(12));
|
||||
expect(location.name, equals('Text'));
|
||||
expect(count, equals(3)); // 3 clock widget instances rebuilt.
|
||||
|
@ -4551,7 +4552,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||
screenshot12,
|
||||
matchesGoldenFile('inspector.sizedBox_debugPaint_margin.png'),
|
||||
);
|
||||
});
|
||||
}, skip: impellerEnabled); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/143616
|
||||
|
||||
group('layout explorer', () {
|
||||
const String group = 'test-group';
|
||||
|
|
Loading…
Reference in a new issue