tiny-vue/examples/sites/demos/pc/app/grid/validation/bubbling.spec.js

27 lines
1.1 KiB
JavaScript
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('校验提示跟随单元格移动', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('grid-validation#validation-bubbling')
await page.getByText('华东区').first().click()
await page
.getByRole('row', {
name: '1 GFD科技有限公司 福州 公司技术和研发实力雄厚是国家863项目的参与者并被政府认定为“高新技术企业”。'
})
.getByRole('cell')
.nth(4)
.click()
await page
.getByRole('row', {
name: '1 GFD科技有限公司 福州 公司技术和研发实力雄厚是国家863项目的参与者并被政府认定为“高新技术企业”。'
})
.getByRole('textbox')
.fill('x')
const { y: top } = await page.getByRole('tooltip', { name: '区域格式不正确' }).boundingBox()
const scrollDom = page.getByRole('cell', { name: 'YHN科技有限公司' })
await scrollDom.scrollIntoViewIfNeeded()
const { y: topLater } = await page.getByRole('tooltip', { name: '区域格式不正确' }).boundingBox()
await expect(top).toBeGreaterThan(topLater)
})