diff --git a/e2e/theme-yun/markdown/container.spec.ts b/e2e/theme-yun/markdown/container.spec.ts new file mode 100644 index 00000000..93e74ec5 --- /dev/null +++ b/e2e/theme-yun/markdown/container.spec.ts @@ -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('自定义标题') + }) +}) diff --git a/e2e/theme-yun/markdown/include.spec.ts b/e2e/theme-yun/markdown/include.spec.ts index 40398562..8f07758b 100644 --- a/e2e/theme-yun/markdown/include.spec.ts +++ b/e2e/theme-yun/markdown/include.spec.ts @@ -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 }) => {