Update Send button and tests

This commit is contained in:
Ashita Prasad
2024-12-16 03:41:26 +05:30
parent fe558a066a
commit 3da407b899
4 changed files with 8 additions and 10 deletions

View File

@ -17,7 +17,7 @@ void main() {
final icon = find.byIcon(Icons.snippet_folder_rounded);
Finder button = find.ancestor(
of: icon,
matching: find.byWidgetPredicate((widget) => widget is ElevatedButton));
matching: find.byWidgetPredicate((widget) => widget is FilledButton));
expect(button, findsOneWidget);
expect(find.text(kLabelSelectFile), findsOneWidget);
@ -37,7 +37,7 @@ void main() {
final icon = find.byIcon(Icons.snippet_folder_rounded);
Finder button = find.ancestor(
of: icon,
matching: find.byWidgetPredicate((widget) => widget is ElevatedButton));
matching: find.byWidgetPredicate((widget) => widget is FilledButton));
expect(button, findsOneWidget);
expect(find.text(testValue), findsOneWidget);
@ -61,7 +61,7 @@ void main() {
final icon = find.byIcon(Icons.snippet_folder_rounded);
Finder button = find.ancestor(
of: icon,
matching: find.byWidgetPredicate((widget) => widget is ElevatedButton));
matching: find.byWidgetPredicate((widget) => widget is FilledButton));
await tester.tap(button);
await tester.pump();

View File

@ -56,7 +56,6 @@ void main() {
// Verify initial cancel state
expect(find.byIcon(Icons.send), findsNothing);
expect(find.text(kLabelSend), findsNothing);
expect(find.byIcon(Icons.cancel), findsOneWidget);
expect(find.text(kLabelCancel), findsOneWidget);
// Tap and verify callback
@ -94,7 +93,6 @@ void main() {
await tester.pump();
// Verify cancel state
expect(find.byIcon(Icons.cancel), findsOneWidget);
expect(find.text(kLabelCancel), findsOneWidget);
// Tap to cancel