Skip to content

Commit

Permalink
test(e2e): update numeric UI e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcr committed Sep 28, 2024
1 parent e81d2d2 commit cd8bd30
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/numeric/xdesign.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ test.describe('numeric数字输入框xdesign规范', () => {
test('基本用法--UI截图', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('numeric#basic-usage')
const demo = page.locator('#basic-usage')
const num = page.locator('.tiny-numeric')
const increaseBtn = demo.locator('.tiny-numeric__increase')
await increaseBtn.click()
await expect(num).toBeInViewport()
await expect(num).toHaveScreenshot('basic-usage.png')
const demo = page.locator('#basic-usage .pc-demo')
await expect(demo).toBeInViewport()
await expect(demo).toHaveScreenshot('basic-usage.png')

await demo.locator('.tiny-numeric__increase').hover()
await expect(demo).toBeInViewport()
await expect(demo).toHaveScreenshot('hover.png')
})
test('禁用--UI截图', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/numeric/xdesign.spec.ts-snapshots/unit-chromium-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cd8bd30

Please sign in to comment.