e2e: add custom container custom title for danger/details

This commit is contained in:
YunYouJun 2025-07-17 22:51:12 +08:00
parent ccaba6269b
commit e878b37931
2 changed files with 19 additions and 6 deletions

View File

@ -0,0 +1,18 @@
import { expect, test } from '@playwright/test'
import { setup } from '../../utils'
setup('theme-yun')
test.describe('Markdown: Custom Container', () => {
test('Custom Title', async ({ page }) => {
await page.goto('/test/custom-blocks')
await page.waitForSelector('.custom-block-title')
const customDangerTitle = await page.locator('.custom-block-title').nth(5).textContent()
expect(customDangerTitle).toContain('自定义标题')
// 第二个 details summary 为自定义标题
const customDetailsSummary = await page.locator('details summary').nth(1).textContent()
expect(customDetailsSummary).toContain('自定义标题')
})
})

View File

@ -1,12 +1,7 @@
import { expect, test } from '@playwright/test'
import { env } from '../../env'
import { setup } from '../../utils'
test.use({
baseURL: env['theme-yun'],
})
setup()
setup('theme-yun')
test.describe('Markdown File Inclusion by @include', () => {
test('test/markdown-file-inclusion', async ({ page }) => {