Fix how tests count open SemanticsHandles (#121571)
Fix how tests count open SemanticsHandles
This commit is contained in:
committed by
GitHub
parent
f97a51533b
commit
6de42a70f1
@@ -473,7 +473,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('works when semantics are enabled', (WidgetTester tester) async {
|
||||
final SemanticsHandle semantics = RendererBinding.instance.pipelineOwner.ensureSemantics();
|
||||
final SemanticsHandle semantics = tester.ensureSemantics();
|
||||
await tester.pumpWidget(
|
||||
const Text('hello', textDirection: TextDirection.ltr));
|
||||
|
||||
@@ -497,7 +497,7 @@ void main() {
|
||||
}, semanticsEnabled: false);
|
||||
|
||||
testWidgets('throws state error multiple matches are found', (WidgetTester tester) async {
|
||||
final SemanticsHandle semantics = RendererBinding.instance.pipelineOwner.ensureSemantics();
|
||||
final SemanticsHandle semantics = tester.ensureSemantics();
|
||||
await tester.pumpWidget(
|
||||
Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
|
||||
Reference in New Issue
Block a user