19 lines
643 B
Dart
19 lines
643 B
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
/// Closed chats start folded away; opens that section when it is shown.
|
|
Future<void> expandClosedChats(WidgetTester tester) async {
|
|
final section = find.byKey(const ValueKey('chat-section-Closed'));
|
|
if (section.evaluate().isEmpty) {
|
|
await tester.scrollUntilVisible(
|
|
section,
|
|
200,
|
|
scrollable: find.byType(Scrollable).first,
|
|
);
|
|
}
|
|
final heading = find.descendant(of: section, matching: find.text('Closed'));
|
|
await tester.ensureVisible(heading.first);
|
|
await tester.tap(heading.first);
|
|
await tester.pumpAndSettle();
|
|
}
|