Skip to content

Commit e878b37

Browse files
committed
e2e: add custom container custom title for danger/details
1 parent ccaba62 commit e878b37

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { expect, test } from '@playwright/test'
2+
import { setup } from '../../utils'
3+
4+
setup('theme-yun')
5+
6+
test.describe('Markdown: Custom Container', () => {
7+
test('Custom Title', async ({ page }) => {
8+
await page.goto('/test/custom-blocks')
9+
await page.waitForSelector('.custom-block-title')
10+
11+
const customDangerTitle = await page.locator('.custom-block-title').nth(5).textContent()
12+
expect(customDangerTitle).toContain('自定义标题')
13+
14+
// 第二个 details summary 为自定义标题
15+
const customDetailsSummary = await page.locator('details summary').nth(1).textContent()
16+
expect(customDetailsSummary).toContain('自定义标题')
17+
})
18+
})

e2e/theme-yun/markdown/include.spec.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import { expect, test } from '@playwright/test'
2-
import { env } from '../../env'
32
import { setup } from '../../utils'
43

5-
test.use({
6-
baseURL: env['theme-yun'],
7-
})
8-
9-
setup()
4+
setup('theme-yun')
105

116
test.describe('Markdown File Inclusion by @include', () => {
127
test('test/markdown-file-inclusion', async ({ page }) => {

0 commit comments

Comments
 (0)