Browse Source

Fix popup tests

simov 6 years ago
parent
commit
749243772c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      test/popup-options.js

+ 2 - 2
test/popup-options.js

@@ -307,7 +307,7 @@ module.exports = ({popup, advanced, content}) => {
       // disable gfm
       await content.bringToFront()
       // gfm switch
-      await popup.click('.m-panel:nth-of-type(2) .m-switch:nth-of-type(4)')
+      await popup.click('.m-panel:nth-of-type(2) .m-switch[title~=GFM]')
       // content auto reloads
       await content.waitFor(300)
 
@@ -344,7 +344,7 @@ module.exports = ({popup, advanced, content}) => {
       )
       t.strictEqual(
         await popup.evaluate(() =>
-          document.querySelector('.m-panel:nth-of-type(2) .m-switch:nth-of-type(4)').classList.contains('is-checked')
+          document.querySelector('.m-panel:nth-of-type(2) .m-switch[title~=GFM]').classList.contains('is-checked')
         ),
         false,
         'dom gfm checkbox should be disabled'