tiny-vue_version0/examples/sites/demos/pc/app/popeditor/show-overflow.spec.ts

22 lines
1002 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { test, expect } from '@playwright/test'
test('PopEditor 数据超出隐藏', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('popeditor#show-overflow')
const preview = page.locator('#show-overflow')
const textBox = preview.getByRole('textbox')
const dialogBox = page.locator('.tiny-dialog-box')
const overflowDate = dialogBox.getByRole('cell', {
name: 'GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司GFD科技YX公司'
})
const tooltip = page.getByRole('tooltip', { name: 'GFD科技YX公司GFD科技YX公司GFD科技YX公司' })
// 数据超出隐藏tooltips显示全部内容
await textBox.click()
await expect(dialogBox).toBeVisible()
await expect(tooltip).not.toBeVisible()
await overflowDate.hover()
await expect(tooltip).toBeVisible()
})