diff --git a/tests/Entity/ExportTest.php b/tests/Entity/ExportTest.php index 141f072f8..08d092111 100644 --- a/tests/Entity/ExportTest.php +++ b/tests/Entity/ExportTest.php @@ -362,42 +362,6 @@ class ExportTest extends TestCase $resp->assertSee("# Dogcat\n\nSome **bold** text"); } - public function test_page_markdown_export_does_not_convert_callouts() - { - $page = Page::query()->first()->forceFill([ - 'markdown' => '', - 'html' => '
Some callout text
Another line
', - ]); - $page->save(); - - $resp = $this->asEditor()->get($page->getUrl('/export/markdown')); - $resp->assertSee("# Dogcat\n\nSome callout text
\n\nAnother line", false); - } - - public function test_page_markdown_export_handles_bookstacks_wysiwyg_codeblock_format() - { - $page = Page::query()->first()->forceFill([ - 'markdown' => '', - 'html' => 'var a = \'cat\';
Another line
', - ]); - $page->save(); - - $resp = $this->asEditor()->get($page->getUrl('/export/markdown')); - $resp->assertSee("# Dogcat\n\n```JavaScript\nvar a = 'cat';\n```\n\nAnother line", false); - } - - public function test_page_markdown_export_handles_tasklist_checkboxes() - { - $page = Page::query()->first()->forceFill([ - 'markdown' => '', - 'html' => 'Some bold text
', + "# Dogcat\n\nSome **bold** text" + ); + } + + public function test_callouts_remain_html() + { + $this->assertConversion( + 'Some callout text
Another line
', + "# Dogcat\n\nSome callout text
\n\nAnother line" + ); + } + + public function test_wysiwyg_code_format_handled_cleanly() + { + $this->assertConversion( + 'var a = \'cat\';
Another line
', + "# Dogcat\n\n```JavaScript\nvar a = 'cat';\n```\n\nAnother line" + ); + } + + public function test_tasklist_checkboxes_are_handled() + { + $this->assertConversion( + '