|
|
|
@ -1,3 +1,7 @@
|
|
|
|
|
// Copyright 2021 The Flutter team. All rights reserved.
|
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
// ignore_for_file: avoid_types_on_closure_parameters
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
@ -9,7 +13,7 @@ import 'component_screen_test.dart';
|
|
|
|
|
void main() {
|
|
|
|
|
testWidgets(
|
|
|
|
|
'Surface Tones screen shows correctly when the corresponding icon is '
|
|
|
|
|
'selected on NavigationBar', (WidgetTester tester) async {
|
|
|
|
|
'selected on NavigationBar', (tester) async {
|
|
|
|
|
widgetSetup(tester, 449);
|
|
|
|
|
addTearDown(tester.binding.window.clearPhysicalSizeTestValue);
|
|
|
|
|
await tester.pumpWidget(const Material3Demo());
|
|
|
|
@ -27,7 +31,7 @@ void main() {
|
|
|
|
|
|
|
|
|
|
testWidgets(
|
|
|
|
|
'Surface Tones screen shows correctly when the corresponding icon is '
|
|
|
|
|
'selected on NavigationRail', (WidgetTester tester) async {
|
|
|
|
|
'selected on NavigationRail', (tester) async {
|
|
|
|
|
widgetSetup(tester, 450); // NavigationRail shows only when width is >= 450.
|
|
|
|
|
addTearDown(tester.binding.window.clearPhysicalSizeTestValue);
|
|
|
|
|
await tester.pumpWidget(const Material3Demo());
|
|
|
|
@ -42,8 +46,7 @@ void main() {
|
|
|
|
|
expect(find.text("Surface Tint only"), findsOneWidget);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
testWidgets('Surface Tones screen shows correct content',
|
|
|
|
|
(WidgetTester tester) async {
|
|
|
|
|
testWidgets('Surface Tones screen shows correct content', (tester) async {
|
|
|
|
|
await tester.pumpWidget(MaterialApp(
|
|
|
|
|
home: Scaffold(body: Row(children: const [ElevationScreen()])),
|
|
|
|
|
));
|
|
|
|
|