test(steps):[steps] update steps E2E test (#1094)

This commit is contained in:
wuyiping0628 2023-12-11 17:14:50 +08:00 committed by GitHub
parent 71e767310d
commit 2e2cf0ab79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -4,5 +4,6 @@ test('尺寸', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull()) page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('steps#size') await page.goto('steps#size')
// TODO const miniSteps = page.locator('#size .tiny-steps-block').first()
await expect(miniSteps).toHaveClass(/small/)
}) })

View File

@ -2,7 +2,13 @@ import { test, expect } from '@playwright/test'
test('插槽的使用', async ({ page }) => { test('插槽的使用', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull()) page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('steps#slot') await page.goto('steps#slot-item')
// TODO const steps = page.locator('#slot-item .tiny-steps')
const nodes = steps.locator('li')
await expect(nodes.first()).toHaveText('Basic Info')
await expect(nodes.nth(1)).toHaveText('BOQ Info')
await expect(nodes.nth(2)).toHaveText('Involved Parties')
await expect(nodes.nth(3)).toHaveText('Billing')
}) })

View File

@ -4,5 +4,6 @@ test('文本内容位置', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull()) page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('steps#text-position') await page.goto('steps#text-position')
// TODO const steps1 = page.locator('#text-position .tiny-steps')
await expect(steps1.locator('.tiny-steps-normal')).toHaveClass(/text-right/)
}) })