Commit 56eeccd
authored
refactor(dashboard-manager): Extract focused providers from DashboardManagerProvider (#588)
* refactor(dashboard-manager): Extract focused providers from DashboardManagerProvider
- Extract device info data into dedicated `deviceInfoProvider`
- Extract ethernet ports data into `ethernetPortsProvider`
- Extract router time data into `routerTimeProvider`
- Extract system stats data into `systemStatsProvider`
- Extract WiFi radios data into `wifiRadiosProvider`
- Add `polling_helpers.dart` for shared polling data extraction utilities
- Rename `DashboardManagerProvider` to `SessionProvider` for session operations
- Rename `DashboardManagerService` to `SessionService` for clarity
- Update all consumers to use new focused providers
- Add comprehensive unit tests for all new providers
- Remove obsolete `DashboardManagerState` and related files
* feat(tools): Add --collect flag to run_screenshot_tests.dart
- Add new `--collect` / `-p` flag to collect golden files after tests
- Implement `_copyGoldensToSnapshots()` function to copy all golden files from test directories to snapshots folder
- Fix issue where golden files were never collected when using the Dart tool (since it always passes `-f` to shell script)
* fix(providers): Replace undefined dashboardManagerProvider with ethernetPortsProvider
- Fix instant_verify_view.dart using undefined dashboardManagerProvider
- Fix wifi_bundle_provider.dart using undefined dashboardManagerProvider
* fix(test): Use correct SharedPreferences key constants in session_provider_test
- Add import for pref_key.dart constants
- Replace hardcoded 'currentSN' with pCurrentSN constant
- Replace hardcoded 'selectedNetworkId' with pSelectedNetworkId constant
- Replace hardcoded 'pnpConfiguredSN' with pPnpConfiguredSN constant
* test(wifi-bundle): Refactor wifi_bundle_provider_test.dart for better test design
- Add ethernetPortsProvider mock override to match provider dependencies
- Extract createRadiosTestData() helper function for test data creation
- Refactor seedWithRadios() to properly set state before container creation
- Add documentation comments explaining the test setup sequence1 parent f8539b6 commit 56eeccd
54 files changed
Lines changed: 2840 additions & 1959 deletions
File tree
- lib
- core
- data
- providers
- services
- jnap
- page
- components/shortcuts
- dashboard
- providers
- services
- views
- components/widgets
- instant_admin/views
- instant_device
- providers
- views
- instant_verify
- services
- views
- login/views
- select_network/views
- wifi_settings/providers
- providers/auth
- route
- test
- common
- core
- data
- providers
- services
- jnap
- providers
- services
- mocks
- mockito_specs
- test_data
- page
- dashboard
- localizations
- providers
- services
- login/localizations
- wifi_settings/providers
- providers/auth
- test_data
- tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments