Skip to content

test(ui): theme-switch and behavior suites for the UI Kit - #1099

Merged
ZhuchkaTriplesix merged 9 commits into
devfrom
issue/1043-ui-kit-tests
Oct 8, 2026
Merged

ZhuchkaTriplesix merged 9 commits into
devfrom
issue/1043-ui-kit-tests

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

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_test incl. 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:
    • search field: Escape clears the text and reports an empty query, only the last keystroke inside the debounce window is reported, the shortcut hint is replaced by the clear button while typing, an external controller is not disposed with the field.
    • icon button: disabled without onPressed, tooltip message attached.
    • spinner: stroke width per preset (2.0 / 2.5 / 3.0), medium is the default, custom dimension / stroke / color override the preset.
    • QueryaConfirmDialog.show: confirm resolves to true, cancel to false, 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

@github-actions github-actions Bot added frontend Theme parser epic label: frontend tests Theme parser epic ui User interface components and widgets P3 Low priority / Polish & Enhancements labels Oct 7, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 33bcd12 into dev Oct 8, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Theme parser epic label: frontend P3 Low priority / Polish & Enhancements tests Theme parser epic ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant