Răsfoiți Sursa

Fix test for marked compiler

simov 7 ani în urmă
părinte
comite
46b5d7238f
1 a modificat fișierele cu 17 adăugiri și 3 ștergeri
  1. 17 3
      test/popup-options.js

+ 17 - 3
test/popup-options.js

@@ -258,18 +258,32 @@ module.exports = ({popup, advanced, content}) => {
       await popup.click('.m-tabs a:nth-of-type(2)')
     })
 
-    it('marked should not render gfm task lists', async () => {
+    it('marked should render gfm task lists by default', async () => {
       // go to page serving markdown as text/markdown
       await content.goto('http://localhost:3000/compiler-options-remark')
       await content.bringToFront()
       await content.waitFor(200)
 
+      t.equal(
+        await content.evaluate(() =>
+          document.querySelector('#_html ul li').getAttribute('class')
+        ),
+        null,
+        'no class on dom li'
+      )
+      t.strictEqual(
+        await content.evaluate(() =>
+          document.querySelector('#_html ul li [type=checkbox]').hasAttribute('disabled')
+        ),
+        true,
+        'dom li should contain checkbox in it'
+      )
       t.equal(
         await content.evaluate(() =>
           document.querySelector('#_html ul li').innerText
         ),
-        '[ ] task',
-        'gfm task lists should not be rendered'
+        ' task',
+        'dom li should contain the task text'
       )
     })