Fixes Text contrast test rect check (#112492)

This commit is contained in:
chunhtai
2022-09-27 12:03:23 -07:00
committed by GitHub
parent aa0485ac3a
commit 86f30978ff
2 changed files with 52 additions and 16 deletions

View File

@@ -225,6 +225,37 @@ void main() {
handle.dispose();
});
testWidgets('Correctly identify failures in complex transforms', (WidgetTester tester) async {
final SemanticsHandle handle = tester.ensureSemantics();
await tester.pumpWidget(
_boilerplate(
Padding(
padding: const EdgeInsets.only(left: 100),
child: Semantics(
container: true,
child: Padding(
padding: const EdgeInsets.only(left: 100),
child: Semantics(
container: true,
child: Container(
width: 100.0,
height: 200.0,
color: Colors.amberAccent,
child: const Text(
'this',
style: TextStyle(color: Colors.amber),
),
),
),
),
),
),
),
);
await expectLater(tester, doesNotMeetGuideline(textContrastGuideline));
handle.dispose();
});
testWidgets('Material text field - default style',
(WidgetTester tester) async {
final SemanticsHandle handle = tester.ensureSemantics();