]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/ExportTest.php
Added translation string for tasklist WYSIWYG action
[bookstack] / tests / Entity / ExportTest.php
index fc15bb8f3b3a916d3530cd8ba879866518a48b90..2841175ad19d4f349a5d94f64ba5ee60eb0bc2e3 100644 (file)
@@ -386,6 +386,18 @@ class ExportTest extends TestCase
         $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'     => '<ul><li><input type="checkbox" checked="checked">Item A</li><li><input type="checkbox">Item B</li></ul>',
+        ]);
+        $page->save();
+
+        $resp = $this->asEditor()->get($page->getUrl('/export/markdown'));
+        $resp->assertSee("- [x] Item A\n- [ ] Item B", false);
+    }
+
     public function test_chapter_markdown_export()
     {
         $chapter = Chapter::query()->first();