test: only compare markdown part when test markdown renderer
This commit is contained in:
parent
1570e38956
commit
1ba77588f1
|
|
@ -17,7 +17,7 @@ describe('# ArticleDetail', () => {
|
|||
}))
|
||||
await server.waitForRequest('GET', '/api/articles/markdown')
|
||||
|
||||
expect(container).toMatchSnapshot()
|
||||
expect(container.querySelector('#article-content')).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('should render markdown (zh-CN) body correctly', async () => {
|
||||
|
|
@ -26,7 +26,7 @@ describe('# ArticleDetail', () => {
|
|||
}))
|
||||
await server.waitForRequest('GET', '/api/articles/markdown-cn')
|
||||
|
||||
expect(container).toMatchSnapshot()
|
||||
expect(container.querySelector('#article-content')).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('should filter the xss content in Markdown body', async () => {
|
||||
|
|
@ -35,6 +35,6 @@ describe('# ArticleDetail', () => {
|
|||
}))
|
||||
await server.waitForRequest('GET', '/api/articles/markdown-xss')
|
||||
|
||||
expect(container).toMatchSnapshot()
|
||||
expect(container.querySelector('#article-content')).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<div class="container page">
|
||||
<div class="row article-content">
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<div class="col-md-12" v-html="articleHandledBody" />
|
||||
<div id="article-content" class="col-md-12" v-html="articleHandledBody" />
|
||||
<!-- eslint-enable vue/no-v-html -->
|
||||
|
||||
<!-- TODO: abstract tag list component -->
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue