Skip to content

Commit

Permalink
updated keys to be more unique
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNordicOne committed Apr 28, 2024
1 parent da6e7a7 commit 1ab979e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions integration_test/features/settings/settings_page_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ void main() {
await tester.pumpWidget(MainApp(routerConfig: routerConfig));

expect(find.text("General Settings"), findsOneWidget);
await tapOnKey(tester, "language-dropdown");
await tapOnKey(tester, "de-DE");
await tapOnKey(tester, "settings:language-dropdown");
await tapOnKey(tester, "settings:de-DE");
expect(find.text("Allgemeine Einstellungen"), findsOneWidget);
}, timeout: const Timeout(Duration(minutes: 1)));
});
Expand Down
4 changes: 2 additions & 2 deletions lib/features/settings/general_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class GeneralSettings extends StatelessWidget with WatchItMixin {

final supportedLocales = S.delegate.supportedLocales
.map((locale) => DropdownMenuItem(
key: Key(locale.toLanguageTag()),
key: Key("settings:${locale.toLanguageTag()}"),
value: locale,
child: Text(intlStateService.getDisplayName(locale)),
))
Expand All @@ -28,7 +28,7 @@ class GeneralSettings extends StatelessWidget with WatchItMixin {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: CoreDropdown(
dropdownKey: const Key("language-dropdown"),
dropdownKey: const Key("settings:language-dropdown"),
value: intlStateService.localeSync,
items: supportedLocales,
label: S.of(context).Language,
Expand Down

0 comments on commit 1ab979e

Please sign in to comment.