Skip to content

navigation_drawer_theme_test.dart missing tests #129618

@TahaTesser

Description

@TahaTesser

Is there an existing issue for this?

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"
  • "NavigationDrawer uses Theme.navigationDrawerTheme"
  • "NavigationDrawer properties take priority over NavigationDrawerThemeData"
  • "Local NavigationDrawerTheme takes priority over Theme.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.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions