tiny-vue/examples/sites/demos/pc/app/grid/mouse-keyboard/keyboard-navigation.spec.js

22 lines
878 B
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-mouse-keyboard#mouse-keyboard-keyboard-navigation')
await page.getByText('GFD科技YX公司').click()
await page.locator('body').press('ArrowDown')
await page.waitForTimeout(300)
await page.locator('body').press('F2')
await page.waitForTimeout(300)
await page
.getByRole('row', {
name: '2 华南区 深圳福田区 公司技术和研发实力雄厚是国家863项目的参与者并被政府认定为“高新技术企业”。'
})
.getByRole('textbox')
.fill('WWWW科收缩技YX公司')
await page.getByRole('cell', { name: '公司简介' }).click()
await expect(page.getByRole('cell', { name: 'WWWW科收缩技YX公司' })).toBeVisible()
})