Skip to content

test(web-ui): restore OHOS E2E locators and strengthen model selector semantics - #108

Merged
SWangHash merged 2 commits into
mainfrom
ztx0625
Jun 26, 2026
Merged

SWangHash merged 2 commits into
mainfrom
ztx0625

Conversation

@azi44eo

@azi44eo azi44eo commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR improves Web UI E2E test locator coverage for OHOS automation. It restores missing navigation/skills locators and adds richer data-* attributes for chat model selection and settings model configuration flows, with matching documentation updates.

Changes

Restore OHOS E2E locators

  • Sessions nav: add nav-session-menu-btn, nav-session-menu, nav-session-menu-rename, and nav-session-menu-delete, with data-session-id on menu-related nodes
  • Skills scene: add tab locators (skills-tab-installed, skills-tab-discover) and panel locators (skills-installed-panel, skills-discover-panel), with data-skills-tab-active on tabs

Strengthen model locator semantics

  • Chat ModelSelector: add data-option-kind, data-model-role, and data-provider-id for auto / primary / fast alias / ACP / normal model entries; alias entries also expose data-resolved-* fields
  • Settings AIModelConfig: add structured locator metadata (data-option-kind, data-model-role, data-model-state, data-model-source, data-provider-id, data-config-id) for selectable options, selected drafts, saved models, and test-status nodes
  • Docs: update docs/development/ui-testids.md and ui-testids-CN.md with the new attributes and locator guidance

Motivation

OHOS E2E tests need stable, unambiguous DOM selectors. Visible text and data-model-name alone are not reliable unique keys—especially for alias entries (auto, primary, fast) and multi-provider model lists.

Test plan

  • Verify session menu actions (rename / delete) can be targeted via data-testid + data-session-id
  • Verify Skills tab switching via skills-tab-* and panel visibility via skills-*-panel
  • Verify chat model selector options can be distinguished by data-option-kind / data-model-role
  • Verify settings model dropdown, draft rows, saved rows, and test-status nodes expose expected data-* attributes
  • Confirm no product behavior changes (locator/metadata only)
  • pnpm run type-check:web

Merge notes

  • Fast-forward merge from main; no conflicts expected
  • 6 files changed, +112 / -16 lines

@SWangHash
SWangHash merged commit 0b93235 into main Jun 26, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants