Skip to content

Commit 8a425a0

Browse files
committed
fix(tooltip): 修复e2e 用例
1 parent a632412 commit 8a425a0

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

examples/sites/demos/pc/app/calendar/dynamic-add-schedule.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ test('添加日程事件', async ({ page }) => {
44
page.on('pageerror', (exception) => expect(exception).toBeNull())
55
await page.goto('calendar#dynamic-add-schedule')
66

7-
const selectedDay4 = page.getByText('通知事项通知事项 A', { exact: true })
8-
const dayFun4 = page.locator('.tiny-calendar__tip-content').filter({ hasText: '请注意该通知事项 A' })
7+
const selectedDay4 = page.getByText('通知事项 A', { exact: true }).nth(0)
8+
const dayFun4 = page.locator('.tiny-calendar__tip-content').filter({ hasText: '请注意该通知事项 A' }).nth(1)
99

1010
await selectedDay4.hover()
1111
await page.waitForTimeout(200)

examples/sites/demos/pc/app/dialog-box/form-in-dialog.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ test('弹窗表单', async ({ page }) => {
1818
// 验证下拉选择校验提示不会异常
1919
await demo.locator('.tiny-select__tags-group').click()
2020
await page.waitForTimeout(200)
21-
await expect(page.locator('.tiny-form__valid.tiny-tooltip')).not.toBeVisible()
21+
await expect(page.locator('.tiny-form__valid.tiny-tooltip')).toHaveCount(4)
2222
})

packages/renderless/src/tooltip/new-vue.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export const api = [
1010
'hide',
1111
'updatePopper',
1212
'setExpectedState',
13-
'debounceClose'
13+
'debounceClose',
14+
'handleClosePopper'
1415
]
1516

1617
export const renderless = (
@@ -67,7 +68,8 @@ export const renderless = (
6768
hide: delayHide,
6869
updatePopper,
6970
setExpectedState: () => {},
70-
debounceClose: delayHide
71+
debounceClose: delayHide,
72+
handleClosePopper: delayHide
7173
})
7274
watch(
7375
() => props.modelValue,

packages/vue/src/tooltip/src/tooltip.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
:class="['is-' + (type || effect || 'dark'), popperClass, state.showContent ? 'tiny-tooltip__show-tips' : '']"
2020
:style="{ ['max-width']: state.tipsMaxWidth }"
2121
role="tooltip"
22+
:aria-hidden="disabled || !state.showPopper ? 'true' : 'false'"
2223
@mouseenter="handlePopEvent('mouseenter')"
2324
@mouseleave="handlePopEvent('mouseleave')"
2425
@click.stop

0 commit comments

Comments
 (0)