Repository navigation
test(ui): theme-switch and behavior suites for the UI Kit - #1099
Merged
Merged
Conversation
…test-hang' into issue/1043-ui-kit-tests
…test-hang' into issue/1043-ui-kit-tests
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Most per-component suites for the UI Kit already exist (
querya_badge_test,querya_empty_state_test,querya_icon_button_test,querya_modal_dialog_testincl.QueryaConfirmDialog,querya_search_field_test,querya_spinner_test). This PR adds the missing piece from #1043 and fills gaps in them.querya_ui_kit_theme_switch_test.dart: one tree with a sample of every themed component (spinner, status / PK / FK badges, the environment badge, icon buttons, empty state). It asserts each component uses the colors of the active theme (workbench accent, success, warning, destructive, muted foreground; semantic palette types; shadcn foreground) for the dark and the light default theme, that switching dark -> light -> dark rebuilds the same instances with the new colors and raises no exception, and that component state (typed text) survives a switch. It also asserts the two themes differ, so the check is meaningful.querya_ui_kit_behavior_test.dart:onPressed, tooltip message attached.QueryaConfirmDialog.show: confirm resolves totrue, cancel tofalse, destructive state uses the destructive button.Not covered: the blur animation of the confirm dialog and the hover animations of the icon button (timing- and platform-dependent), and "no white flashes" on theme change, which a headless test cannot observe.
Written without running locally; CI is the first run.
Refs #1043