fix(ui): keep select triggers unwrapped
This commit is contained in:
parent
2689462ca3
commit
bcf18b8022
|
|
@ -49,12 +49,10 @@ const indicator = ui?.indicator ?? 'absolute left-1.5 inline-flex items-center j
|
|||
|
||||
<template>
|
||||
<SelectRoot v-model="modelValue">
|
||||
<Tip :label="label" :disabled="!label">
|
||||
<SelectTrigger v-test-id="testId" :class="select.trigger">
|
||||
<SelectValue :placeholder="placeholder" />
|
||||
<icon-lucide-chevron-down class="ml-1 size-3 shrink-0 text-muted" />
|
||||
</SelectTrigger>
|
||||
</Tip>
|
||||
<SelectTrigger v-test-id="testId" :class="select.trigger" :aria-label="label" :title="label">
|
||||
<SelectValue :placeholder="placeholder" />
|
||||
<icon-lucide-chevron-down class="ml-1 size-3 shrink-0 text-muted" />
|
||||
</SelectTrigger>
|
||||
<SelectPortal>
|
||||
<SelectContent position="popper" :side-offset="2" :class="select.content">
|
||||
<SelectViewport :class="viewport">
|
||||
|
|
|
|||
|
|
@ -104,13 +104,14 @@ test('remove export row decreases row count', async () => {
|
|||
|
||||
test('format selector changes to JPG', async () => {
|
||||
const formatTrigger = exportItems().first().getByTestId('app-select-trigger').last()
|
||||
await formatTrigger.hover()
|
||||
await expect(page.locator('[role=tooltip]').filter({ hasText: 'Export format' })).toBeVisible()
|
||||
await expect(formatTrigger).toHaveAttribute('aria-label', 'Export format')
|
||||
await formatTrigger.click()
|
||||
await expect(page.locator('[role=tooltip]').filter({ hasText: 'Export format' })).toHaveCount(0)
|
||||
|
||||
for (const label of ['PNG', 'JPG', 'WEBP', 'SVG', 'PDF']) {
|
||||
await expect(page.locator('[role="option"]').filter({ hasText: label })).toBeVisible()
|
||||
}
|
||||
|
||||
const jpgOption = page.locator('[role="option"]').filter({ hasText: 'JPG' })
|
||||
await expect(jpgOption).toBeVisible()
|
||||
await expectInViewport(page, jpgOption)
|
||||
await jpgOption.click()
|
||||
await canvas.waitForRender()
|
||||
|
|
|
|||
Loading…
Reference in a new issue