mirror of https://github.com/YunYouJun/valaxy
e2e: add custom container custom title for danger/details
This commit is contained in:
parent
ccaba6269b
commit
e878b37931
|
@ -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('自定义标题')
|
||||||
|
})
|
||||||
|
})
|
|
@ -1,12 +1,7 @@
|
||||||
import { expect, test } from '@playwright/test'
|
import { expect, test } from '@playwright/test'
|
||||||
import { env } from '../../env'
|
|
||||||
import { setup } from '../../utils'
|
import { setup } from '../../utils'
|
||||||
|
|
||||||
test.use({
|
setup('theme-yun')
|
||||||
baseURL: env['theme-yun'],
|
|
||||||
})
|
|
||||||
|
|
||||||
setup()
|
|
||||||
|
|
||||||
test.describe('Markdown File Inclusion by @include', () => {
|
test.describe('Markdown File Inclusion by @include', () => {
|
||||||
test('test/markdown-file-inclusion', async ({ page }) => {
|
test('test/markdown-file-inclusion', async ({ page }) => {
|
||||||
|
|
Loading…
Reference in New Issue