mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-23 15:59:47 +00:00
feat: add data-testid to dialog components for stable test selectors
- Add data-testid='settings-dialog' to settings container
- Add data-testid='about-panel' to AboutPanel
- Add data-testid='settings-tab-{key}' to all sidebar navigation items
Amp-Thread-ID: https://ampcode.com/threads/T-019c1359-48cc-7676-abc8-2de8c57b52cf
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
data-testid="settings-dialog"
|
||||
:class="
|
||||
teamWorkspacesEnabled
|
||||
? 'flex h-full w-full overflow-auto flex-col md:flex-row'
|
||||
@@ -50,10 +51,17 @@
|
||||
<template v-else #optiongroup>
|
||||
<Divider class="my-0" />
|
||||
</template>
|
||||
<!-- Workspace mode: custom workspace item -->
|
||||
<template v-if="teamWorkspacesEnabled" #option="{ option }">
|
||||
<WorkspaceSidebarItem v-if="option.key === 'workspace'" />
|
||||
<span v-else>{{ option.translatedLabel }}</span>
|
||||
<!-- Custom option template with data-testid for stable test selectors -->
|
||||
<template #option="{ option }">
|
||||
<span
|
||||
:data-testid="`settings-tab-${option.key}`"
|
||||
class="settings-tab-option"
|
||||
>
|
||||
<WorkspaceSidebarItem
|
||||
v-if="teamWorkspacesEnabled && option.key === 'workspace'"
|
||||
/>
|
||||
<template v-else>{{ option.translatedLabel }}</template>
|
||||
</span>
|
||||
</template>
|
||||
</Listbox>
|
||||
</ScrollPanel>
|
||||
|
||||
Reference in New Issue
Block a user