Skip to content

Commit 1a05bd6

Browse files
authored
fix(divider): [divider] modify theme (#3191)
* fix: modify theme * fix: modify test-e2e
1 parent f2a7d59 commit 1a05bd6

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

examples/sites/demos/pc/app/divider/basic-usage.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { test, expect } from '@playwright/test'
33
test('基本用法', async ({ page }) => {
44
page.on('pageerror', (exception) => expect(exception).toBeNull())
55
await page.goto('divider#basic-usage')
6-
const dividerCss = page.locator('.tiny-divider .tiny-divider--default, .tiny-divider.tiny-divider--default')
7-
await expect(dividerCss).toHaveCSS('border-color', 'rgb(219, 219, 219)')
6+
const demo = page.locator('#basic-usage')
7+
const dividerClass = demo.locator('.tiny-divider .tiny-divider--default, .tiny-divider.tiny-divider--default')
8+
await expect(dividerClass).toHaveCSS('border-color', 'rgb(240, 240, 240)')
89
})

examples/sites/demos/pc/app/divider/content-position.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { test, expect } from '@playwright/test'
33
test('分割线文案位置', async ({ page }) => {
44
page.on('pageerror', (exception) => expect(exception).toBeNull())
55
await page.goto('divider#content-position')
6-
const left = page.locator('.tiny-divider__text')
6+
const demo = page.locator('#content-position')
7+
const left = demo.locator('.tiny-divider__text')
78
await expect(left.first()).toHaveText('左侧且偏移20%')
89
await expect(left.nth(1)).toHaveText('中间')
910
await expect(left.nth(2)).toHaveCSS('right', '80px')

examples/sites/demos/pc/app/divider/custom-style.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { test, expect } from '@playwright/test'
44
test('自定义样式', async ({ page }) => {
55
page.on('pageerror', (exception) => expect(exception).toBeNull())
66
await page.goto('divider#custom-style')
7-
const dividerText = page.locator('.tiny-divider__text')
8-
const dividerMargin = page.locator('.tiny-divider')
9-
const dividerLine = page.locator('.tiny-divider-line').first()
7+
const demo = page.locator('#custom-style')
8+
const dividerText = demo.locator('.tiny-divider__text')
9+
const dividerMargin = demo.locator('.tiny-divider')
10+
const dividerLine = demo.locator('.tiny-divider-line').first()
1011
await expect(dividerLine.first()).toHaveCSS('border-color', 'rgb(20, 118, 255)')
1112
await expect(dividerText.first()).toHaveCSS('color', 'rgb(20, 118, 255)')
1213
await expect(dividerText.nth(1)).toHaveCSS('background-color', 'rgb(20, 118, 255)')

examples/sites/demos/pc/app/divider/direction.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { test, expect } from '@playwright/test'
44
test('垂直分割线', async ({ page }) => {
55
page.on('pageerror', (exception) => expect(exception).toBeNull())
66
await page.goto('divider#direction')
7-
const dividerCss = page.locator('.tiny-divider--vertical')
7+
const demo = page.locator('#direction')
8+
const dividerCss = demo.locator('.tiny-divider--vertical')
89
await expect(dividerCss.first()).toHaveCSS('vertical-align', 'middle')
9-
await expect(dividerCss.first()).toHaveCSS('border-left', '1px solid rgb(219, 219, 219)')
10+
await expect(dividerCss.first()).toHaveCSS('border-left', '1px solid rgb(240, 240, 240)')
1011
})

examples/sites/demos/pc/app/divider/divider-type.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { test, expect } from '@playwright/test'
33
test('分割线类型', async ({ page }) => {
44
page.on('pageerror', (exception) => expect(exception).toBeNull())
55
await page.goto('divider#divider-type')
6-
const dividerText = page.locator('.tiny-divider--default')
6+
const demo = page.locator('#divider-type')
7+
const dividerText = demo.locator('.tiny-divider--default')
78
await expect(dividerText.first()).toHaveCSS('border-top-style', 'solid')
89
await expect(dividerText.nth(1)).toHaveCSS('border-top-style', 'dashed')
910
await expect(dividerText.nth(2)).toHaveCSS('border-top-style', 'dotted')

examples/sites/demos/pc/app/divider/status.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { test, expect } from '@playwright/test'
33
test('分割线状态', async ({ page }) => {
44
page.on('pageerror', (exception) => expect(exception).toBeNull())
55
await page.goto('divider#status')
6-
const dividerText = page.locator('.tiny-divider-line')
6+
const demo = page.locator('#status')
7+
const dividerText = demo.locator('.tiny-divider-line')
78
await expect(dividerText.first()).toHaveClass(/tiny-divider--default/)
89
await expect(dividerText.nth(1)).toHaveClass(/tiny-divider--success/)
910
await expect(dividerText.nth(2)).toHaveClass(/tiny-divider--error/)

packages/theme/src/divider/vars.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// 成功颜色
99
--tv-Divider-success-color: var(--tv-color-success-border, #5cb300);
1010
// 默认颜色
11-
--tv-Divider-default-color: var(--tv-color-border-divider-short, #dbdbdb);
11+
--tv-Divider-default-color: var(--tv-color-border-divider);
1212
// 告警颜色
1313
--tv-Divider-warning-color: var(--tv-color-warn-border, #ff8800);
1414
// 信息颜色

0 commit comments

Comments
 (0)