diff --git a/cypress/integration/code.spec.ts b/cypress/integration/code.spec.ts index 1541510be..2a975c9bc 100644 --- a/cypress/integration/code.spec.ts +++ b/cypress/integration/code.spec.ts @@ -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'); }) - }) diff --git a/cypress/integration/helpDialog.spec.ts b/cypress/integration/helpDialog.spec.ts new file mode 100644 index 000000000..42e73fa9d --- /dev/null +++ b/cypress/integration/helpDialog.spec.ts @@ -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') + }) +}) diff --git a/src/components/markdown-renderer/markdown-it-configurator/BasicMarkdownItConfigurator.tsx b/src/components/markdown-renderer/markdown-it-configurator/BasicMarkdownItConfigurator.tsx index d45b30153..20429b29e 100644 --- a/src/components/markdown-renderer/markdown-it-configurator/BasicMarkdownItConfigurator.tsx +++ b/src/components/markdown-renderer/markdown-it-configurator/BasicMarkdownItConfigurator.tsx @@ -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( diff --git a/src/components/markdown-renderer/markdown-it-configurator/FullMarkdownItConfigurator.tsx b/src/components/markdown-renderer/markdown-it-configurator/FullMarkdownItConfigurator.tsx index de556e5a9..60865ea6b 100644 --- a/src/components/markdown-renderer/markdown-it-configurator/FullMarkdownItConfigurator.tsx +++ b/src/components/markdown-renderer/markdown-it-configurator/FullMarkdownItConfigurator.tsx @@ -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