Skip to content

Commit 340f59e

Browse files
test: preserve my page app bar actions without title
1 parent ddfdd02 commit 340f59e

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

‎test/widgets/navigation/mine_content_center_test.dart‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@ import 'dart:io';
33
import 'package:flutter_test/flutter_test.dart';
44

55
void main() {
6+
test('my app bar has no title and retains notification and dress actions',
7+
() {
8+
final source = File(
9+
'lib/Screens/Navigation/mine_screen.dart',
10+
).readAsStringSync();
11+
final start = source.indexOf('PreferredSizeWidget _buildAppBar()');
12+
final end =
13+
source.indexOf('List<ScrollController> getScrollControllers()', start);
14+
expect(start, isNonNegative);
15+
expect(end, greaterThan(start));
16+
final appBar = source.substring(start, end);
17+
18+
expect(appBar, contains('ResponsiveAppBar('));
19+
expect(appBar, isNot(contains('title:')));
20+
expect(appBar, contains('globalControl.showDress'));
21+
expect(appBar, contains('const SuitScreen()'));
22+
expect(appBar, contains('const SystemNoticeScreen()'));
23+
expect(appBar, contains('LoftifyIcons.dress'));
24+
expect(appBar, contains('LoftifyIcons.notifications'));
25+
});
26+
627
test('content center keeps downloads without duplicating app bar actions',
728
() {
829
final source = File(

0 commit comments

Comments
 (0)