File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -230,5 +230,35 @@ void main() {
230
230
final container = ProviderScope .containerOf (collectionPane);
231
231
expect (container.read (selectedIdEditStateProvider), null );
232
232
});
233
+
234
+ testWidgets (
235
+ 'selectedIdEditStateProvider should not be null after rename button has been tapped' ,
236
+ (tester) async {
237
+ await tester.pumpWidget (
238
+ const ProviderScope (
239
+ child: MaterialApp (
240
+ home: CollectionPane (),
241
+ ),
242
+ ),
243
+ );
244
+
245
+ // Tap on the three dots to open the request card menu
246
+ await tester.tap (find.byType (RequestList ));
247
+ await tester.pump ();
248
+ await tester.tap (find.byType (RequestItem ));
249
+ await tester.pump ();
250
+ await tester.tap (find.byIcon (Icons .more_vert).first);
251
+ await tester.pumpAndSettle ();
252
+
253
+ // Tap on the "Rename" option in the menu
254
+ await tester.tap (find.text ('Rename' ));
255
+ await tester.pumpAndSettle ();
256
+
257
+ // Verify that the selectedIdEditStateProvider is not null
258
+ final collectionPane = tester.element (find.byType (CollectionPane ));
259
+ final container = ProviderScope .containerOf (collectionPane);
260
+ expect (container.read (selectedIdEditStateProvider), isNotNull);
261
+ expect ((container.read (selectedIdEditStateProvider)).runtimeType, String );
262
+ });
233
263
});
234
264
}
You can’t perform that action at this time.
0 commit comments