-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Use case
While working on #129572, I was expecting to update existing tests as they should exist but I found out there are no NavigationDrawerThemeData tests.
The following usual theme tests are missing
- "Default debugFillProperties"
- "Custom debugFillProperties"
- "
NavigationDrawerusesTheme.navigationDrawerTheme" - "
NavigationDrawerproperties take priority overNavigationDrawerThemeData" - "Local
NavigationDrawerThemetakes priority overTheme.navigationDrawerTheme"
This is the entire NavigationDrawerThemeData test class
| // 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/material.dart'; | |
| import 'package:flutter_test/flutter_test.dart'; | |
| void main() { | |
| test('NavigationDrawerThemeData copyWith, ==, hashCode, basics', () { | |
| expect(const NavigationDrawerThemeData(), const NavigationDrawerThemeData().copyWith()); | |
| expect(const NavigationDrawerThemeData().hashCode, const NavigationDrawerThemeData().copyWith().hashCode); | |
| }); | |
| test('NavigationDrawerThemeData lerp special cases', () { | |
| expect(NavigationDrawerThemeData.lerp(null, null, 0), null); | |
| const NavigationDrawerThemeData data = NavigationDrawerThemeData(); | |
| expect(identical(NavigationDrawerThemeData.lerp(data, data, 0.5), data), true); | |
| }); | |
| } |
Proposal
Add missing NavigationDrawerTheme tests.
rydmike and mono0926
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team