mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 09:46:30 -05:00
move taskLists from full to basic renderer (#725)
This commit is contained in:
parent
c9fe4e4887
commit
0e058e16e2
4 changed files with 30 additions and 16 deletions
|
@ -9,16 +9,16 @@ describe('Code', () => {
|
|||
})
|
||||
|
||||
describe('without = doesn\'t show gutter', () => {
|
||||
it("without wrapLines active", () => {
|
||||
it('without wrapLines active', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`\`\`\`javascript \nlet x = 0\n\`\`\``)
|
||||
.type('```javascript \nlet x = 0\n```')
|
||||
cy.get('.markdown-body > pre > code')
|
||||
.should('have.class', 'hljs')
|
||||
})
|
||||
|
||||
it("with wrapLines active", () => {
|
||||
it('with wrapLines active', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`\`\`\`javascript!\nlet x = 0\n\`\`\``)
|
||||
.type('```javascript!\nlet x = 0\n```')
|
||||
cy.get('.markdown-body > pre > code')
|
||||
.should('have.class', 'hljs')
|
||||
.should('have.class', 'wrapLines')
|
||||
|
@ -26,9 +26,9 @@ describe('Code', () => {
|
|||
})
|
||||
|
||||
describe('with = shows gutter', () => {
|
||||
it("without wrapLines active", () => {
|
||||
it('without wrapLines active', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`\`\`\`javascript=\nlet x = 0\n\`\`\``)
|
||||
.type('```javascript=\nlet x = 0\n```')
|
||||
cy.get('.markdown-body > pre > code')
|
||||
.should('have.class', 'hljs')
|
||||
.should('have.class', 'showGutter')
|
||||
|
@ -37,9 +37,9 @@ describe('Code', () => {
|
|||
.should('have.attr', 'data-line-number', '1')
|
||||
})
|
||||
|
||||
it("with wrapLines active", () => {
|
||||
it('with wrapLines active', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`\`\`\`javascript=! \nlet x = 0\n\`\`\``)
|
||||
.type('```javascript=! \nlet x = 0\n```')
|
||||
cy.get('.markdown-body > pre > code')
|
||||
.should('have.class', 'hljs')
|
||||
.should('have.class', 'showGutter')
|
||||
|
@ -51,9 +51,9 @@ describe('Code', () => {
|
|||
})
|
||||
|
||||
describe('with = shows gutter and number is used as startline', () => {
|
||||
it("without wrapLines active", () => {
|
||||
it('without wrapLines active', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`\`\`\`javascript=100\nlet x = 0\n\`\`\``)
|
||||
.type('```javascript=100\nlet x = 0\n```')
|
||||
cy.get('.markdown-body > pre > code')
|
||||
.should('have.class', 'hljs')
|
||||
.should('have.class', 'showGutter')
|
||||
|
@ -62,9 +62,9 @@ describe('Code', () => {
|
|||
.should('have.attr', 'data-line-number', '100')
|
||||
})
|
||||
|
||||
it("with wrapLines active", () => {
|
||||
it('with wrapLines active', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`\`\`\`javascript=100! \nlet x = 0\n\`\`\``)
|
||||
.type('```javascript=100! \nlet x = 0\n```')
|
||||
cy.get('.markdown-body > pre > code')
|
||||
.should('have.class', 'hljs')
|
||||
.should('have.class', 'showGutter')
|
||||
|
@ -77,7 +77,7 @@ describe('Code', () => {
|
|||
|
||||
it('has a button', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`\`\`\`javascript \nlet x = 0\n\`\`\``)
|
||||
.type('```javascript \nlet x = 0\n```')
|
||||
cy.get('.markdown-body > pre > div > button > i')
|
||||
.should('have.class', 'fa-files-o')
|
||||
.click()
|
||||
|
@ -86,5 +86,4 @@ describe('Code', () => {
|
|||
// uncomment cypress plugin
|
||||
// cy.task('getClipboard').should('contain', 'let x = 0\n');
|
||||
})
|
||||
|
||||
})
|
||||
|
|
15
cypress/integration/helpDialog.spec.ts
Normal file
15
cypress/integration/helpDialog.spec.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
describe('Help Dialog', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/n/test')
|
||||
cy.get('.btn.active.btn-outline-secondary > i.fa-columns')
|
||||
.should('exist')
|
||||
})
|
||||
|
||||
it('ToDo-List', () => {
|
||||
cy.get('.fa.fa-question-circle')
|
||||
.click()
|
||||
cy.get('input[type="checkbox"]')
|
||||
.should('exist')
|
||||
.should('not.be.checked')
|
||||
})
|
||||
})
|
|
@ -10,6 +10,7 @@ import superscript from 'markdown-it-sup'
|
|||
import { alertContainer } from '../markdown-it-plugins/alert-container'
|
||||
import { linkifyExtra } from '../markdown-it-plugins/linkify-extra'
|
||||
import { MarkdownItParserDebugger } from '../markdown-it-plugins/parser-debugger'
|
||||
import { tasksLists } from '../markdown-it-plugins/tasks-lists'
|
||||
import { twitterEmojis } from '../markdown-it-plugins/twitter-emojis'
|
||||
import { MarkdownItConfigurator } from './MarkdownItConfigurator'
|
||||
|
||||
|
@ -25,6 +26,7 @@ export class BasicMarkdownItConfigurator extends MarkdownItConfigurator {
|
|||
marked,
|
||||
footnote,
|
||||
imsize,
|
||||
tasksLists,
|
||||
alertContainer
|
||||
)
|
||||
this.postConfigurations.push(
|
||||
|
|
|
@ -7,7 +7,6 @@ import { headlineAnchors } from '../markdown-it-plugins/headline-anchors'
|
|||
import { highlightedCode } from '../markdown-it-plugins/highlighted-code'
|
||||
import { plantumlWithError } from '../markdown-it-plugins/plantuml'
|
||||
import { quoteExtra } from '../markdown-it-plugins/quote-extra'
|
||||
import { tasksLists } from '../markdown-it-plugins/tasks-lists'
|
||||
import { legacySlideshareShortCode } from '../regex-plugins/replace-legacy-slideshare-short-code'
|
||||
import { legacySpeakerdeckShortCode } from '../regex-plugins/replace-legacy-speakerdeck-short-code'
|
||||
import { AsciinemaReplacer } from '../replace-components/asciinema/asciinema-replacer'
|
||||
|
@ -35,7 +34,6 @@ export class FullMarkdownItConfigurator extends BasicMarkdownItConfigurator {
|
|||
|
||||
this.configurations.push(
|
||||
plantumlWithError,
|
||||
tasksLists,
|
||||
(markdownIt) => {
|
||||
frontmatterExtract(markdownIt,
|
||||
!this.useFrontmatter
|
||||
|
|
Loading…
Reference in a new issue