From 89f755c2df3eef9c27bc27242ccf318ff1577bed Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Mon, 9 May 2022 16:04:02 -0400 Subject: [PATCH] Replace references to LinearProgressIndicator in CircularProgressIndicator example (#103349) * Replace references to LinearProgressIndicator in CircularProgressIndicator example * Add test * fix copyright header --- .../circular_progress_indicator.0.dart | 4 ++-- .../circular_progress_indicator.0_test.dart | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 examples/api/test/material/progress_indicator/circular_progress_indicator.0_test.dart diff --git a/examples/api/lib/material/progress_indicator/circular_progress_indicator.0.dart b/examples/api/lib/material/progress_indicator/circular_progress_indicator.0.dart index e07d0006c6f..5b8082a74b0 100644 --- a/examples/api/lib/material/progress_indicator/circular_progress_indicator.0.dart +++ b/examples/api/lib/material/progress_indicator/circular_progress_indicator.0.dart @@ -61,12 +61,12 @@ class _MyStatefulWidgetState extends State mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Text( - 'Linear progress indicator with a fixed color', + 'Circular progress indicator with a fixed color', style: Theme.of(context).textTheme.headline6, ), CircularProgressIndicator( value: controller.value, - semanticsLabel: 'Linear progress indicator', + semanticsLabel: 'Circular progress indicator', ), ], ), diff --git a/examples/api/test/material/progress_indicator/circular_progress_indicator.0_test.dart b/examples/api/test/material/progress_indicator/circular_progress_indicator.0_test.dart new file mode 100644 index 00000000000..4f65f35e782 --- /dev/null +++ b/examples/api/test/material/progress_indicator/circular_progress_indicator.0_test.dart @@ -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 'package:flutter_api_samples/material/progress_indicator/circular_progress_indicator.0.dart' + as example; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Finds CircularProgressIndicator', (WidgetTester tester) async { + await tester.pumpWidget( + const example.MyApp(), + ); + expect( + find.bySemanticsLabel('Circular progress indicator'), + findsOneWidget, + ); + }); +}