Skip to content

Commit a057281

Browse files
committed
Test that selectedIdEditStateProvider has initial value of null
1 parent f71bf00 commit a057281

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/providers/ui_providers_test.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'dart:io';
22

33
import 'package:apidash/providers/providers.dart';
44
import 'package:apidash/screens/dashboard.dart';
5+
import 'package:apidash/screens/home_page/collection_pane.dart';
56
import 'package:apidash/screens/home_page/home_page.dart';
67
import 'package:apidash/screens/intro_page.dart';
78
import 'package:apidash/screens/settings_page.dart';
@@ -211,4 +212,23 @@ void main() {
211212
expect(isDisposed, true);
212213
});
213214
});
215+
216+
group("Testing selectedIdEditStateProvider", () {
217+
testWidgets(
218+
'selectedIdEditStateProvider should have an initial value of null',
219+
(tester) async {
220+
await tester.pumpWidget(
221+
const ProviderScope(
222+
child: MaterialApp(
223+
home: CollectionPane(),
224+
),
225+
),
226+
);
227+
228+
// Verify that the initial value is null
229+
final collectionPane = tester.element(find.byType(CollectionPane));
230+
final container = ProviderScope.containerOf(collectionPane);
231+
expect(container.read(selectedIdEditStateProvider), null);
232+
});
233+
});
214234
}

0 commit comments

Comments
 (0)