Skip to content

Commit c7b57da

Browse files
committed
fix(e2e): [time-line] 修复测试用例
1 parent 66f3e65 commit c7b57da

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

examples/sites/demos/pc/app/time-line/status.spec.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ test.describe('节点状态', () => {
1010

1111
// 默认状态
1212
await expect(timelineItems.first()).toHaveClass(/process-wait/)
13-
await expect(timelineItems.first().locator('.icon')).toHaveCSS('border-color', 'rgb(87, 93, 108)')
14-
await expect(timelineItems.first().locator('.icon .number')).toHaveCSS('color', 'rgb(87, 93, 108)')
13+
await expect(timelineItems.first().locator('.icon')).toHaveCSS('border-color', 'rgb(219, 219, 219)')
14+
await expect(timelineItems.first().locator('.icon .number')).toHaveCSS('color', 'rgb(128, 128, 128)')
1515

1616
// 成功状态
1717
await expect(timelineItems.nth(1)).toBeVisible()
18-
await expect(timelineItems.nth(1).locator('.icon')).toHaveCSS('border-color', 'rgb(94, 124, 224)')
19-
await expect(timelineItems.nth(1).locator('.icon .icon-yes')).toHaveCSS('fill', 'rgb(94, 124, 224)')
18+
await expect(timelineItems.nth(1).locator('.icon')).toHaveCSS('border-color', 'rgb(25, 25, 25)')
19+
await expect(timelineItems.nth(1).locator('.icon .icon-yes')).toHaveCSS('fill', 'rgb(25, 25, 25)')
2020

2121
// 警告状态
2222
await expect(timelineItems.nth(2).locator('.icon.icon-warning')).toBeVisible()
23-
await expect(timelineItems.nth(2).locator('.icon')).toHaveCSS('background-color', 'rgb(250, 152, 65)')
23+
await expect(timelineItems.nth(2).locator('.icon')).toHaveCSS('background-color', 'rgb(255, 136, 0)')
2424
await expect(timelineItems.nth(2).locator('.icon .icon-warning')).toHaveCSS('fill', 'rgb(255, 255, 255)')
2525

2626
// 异常状态
2727
await expect(timelineItems.nth(3).locator('.icon')).toBeVisible()
28-
await expect(timelineItems.nth(3).locator('.icon')).toHaveCSS('border-color', 'rgb(246, 111, 106)')
29-
await expect(timelineItems.nth(3).locator('.icon .icon-error')).toHaveCSS('fill', 'rgb(222, 80, 78)')
28+
await expect(timelineItems.nth(3).locator('.icon')).toHaveCSS('border-color', 'rgb(242, 48, 48)')
29+
await expect(timelineItems.nth(3).locator('.icon .icon-error')).toHaveCSS('fill', 'rgb(242, 48, 48)')
3030

3131
// 禁用状态
3232
await expect(timelineItems.nth(5)).toHaveClass(/process-disabled/)
33-
await expect(timelineItems.nth(5).locator('.icon')).toHaveCSS('background-color', 'rgb(245, 245, 246)')
34-
await expect(timelineItems.nth(5).locator('.icon .number')).toHaveCSS('color', 'rgb(173, 176, 184)')
33+
await expect(timelineItems.nth(5).locator('.icon')).toHaveCSS('background-color', 'rgb(240, 240, 240)')
34+
await expect(timelineItems.nth(5).locator('.icon .number')).toHaveCSS('color', 'rgb(194, 194, 194)')
3535
})
3636

3737
test('type属性设置节点状态', async ({ page }) => {
@@ -42,15 +42,15 @@ test.describe('节点状态', () => {
4242
const timelineItems = timeline.locator('.tiny-timeline-item')
4343

4444
await expect(timelineItems.first()).toHaveClass(/timeline-item--primary/)
45-
await expect(timelineItems.first().locator('.dot')).toHaveCSS('background-color', 'rgb(223, 225, 230)')
45+
await expect(timelineItems.first().locator('.dot')).toHaveCSS('background-color', 'rgb(194, 194, 194)')
4646
await expect(timelineItems.nth(1)).toHaveClass(/timeline-item--success/)
47-
await expect(timelineItems.nth(1).locator('.dot')).toHaveCSS('background-color', 'rgb(80, 212, 171)')
47+
await expect(timelineItems.nth(1).locator('.dot')).toHaveCSS('background-color', 'rgb(92, 179, 0)')
4848

4949
await expect(timelineItems.nth(2)).toHaveClass(/timeline-item--warning/)
50-
await expect(timelineItems.nth(2).locator('.dot')).toHaveCSS('background-color', 'rgb(250, 152, 65)')
50+
await expect(timelineItems.nth(2).locator('.dot')).toHaveCSS('background-color', 'rgb(255, 136, 0)')
5151
await expect(timelineItems.nth(3)).toHaveClass(/timeline-item--danger/)
52-
await expect(timelineItems.nth(3).locator('.dot')).toHaveCSS('background-color', 'rgb(246, 111, 106)')
52+
await expect(timelineItems.nth(3).locator('.dot')).toHaveCSS('background-color', 'rgb(242, 48, 48)')
5353
await expect(timelineItems.nth(4)).toHaveClass(/timeline-item--info/)
54-
await expect(timelineItems.nth(4).locator('.dot')).toHaveCSS('background-color', 'rgb(94, 124, 224)')
54+
await expect(timelineItems.nth(4).locator('.dot')).toHaveCSS('background-color', 'rgb(20, 118, 255)')
5555
})
5656
})

0 commit comments

Comments
 (0)