DEV: Add missing import, de-jQuerify (#72)

DEV: Add missing import, de-jQuerify (#72)

diff --git a/test/javascripts/acceptance/admin-webhook-configuration-test.js.es6 b/test/javascripts/acceptance/admin-webhook-configuration-test.js.es6
index 651edc0..423aa4c 100644
--- a/test/javascripts/acceptance/admin-webhook-configuration-test.js.es6
+++ b/test/javascripts/acceptance/admin-webhook-configuration-test.js.es6
@@ -1,4 +1,9 @@
-import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
+import {
+  acceptance,
+  count,
+  exists,
+  query,
+} from "discourse/tests/helpers/qunit-helpers";
 
 const restPrefix = "/admin/plugins/code-review";
 
@@ -67,17 +72,17 @@ acceptance("Github Webhook Configuration", function (needs) {
   test("Should display correctly", async (assert) => {
     await visit("/admin/plugins/code-review");
 
-    const tree = find(".code-review-webhook-tree");
-    const organizations = tree.find(".code-review-webhook-org");
+    const tree = query(".code-review-webhook-tree");
+    const organizations = tree.querySelectorAll(".code-review-webhook-org");
 
     assert.equal(organizations.length, 2);
     const [org1, org2] = organizations;
 
-    assert.equal($(org1).find("h2").text(), "org1");
-    assert.equal($(org2).find("h2").text(), "org2");
+    assert.equal(org1.querySelector("h2").innerText, "org1");
+    assert.equal(org2.querySelector("h2").innerText, "org2");
 
-    const org1Repos = $(org1).find(".code-review-webhook-repo");
-    const org2Repos = $(org2).find(".code-review-webhook-repo");
+    const org1Repos = org1.querySelectorAll(".code-review-webhook-repo");
+    const org2Repos = org2.querySelectorAll(".code-review-webhook-repo");
 
     assert.equal(org1Repos.length, 1);
     assert.equal(org2Repos.length, 2);
@@ -85,17 +90,20 @@ acceptance("Github Webhook Configuration", function (needs) {
     const repo1 = org1Repos[0];
     const [repo2, repo3] = org2Repos;
 
-    assert.equal($(repo1).find("h3").text(), "repo1");
-    assert.equal($(repo2).find("h3").text(), "repo2");
-    assert.equal($(repo3).find("h3").text(), "repo3");
+    assert.equal(repo1.querySelector("h3").innerText, "repo1");
+    assert.equal(repo2.querySelector("h3").innerText, "repo2");
+    assert.equal(repo3.querySelector("h3").innerText, "repo3");
 
     assert.equal(
-      $(repo1).find(".code-review-webhook-not-configured").length,
+      repo1.querySelectorAll(".code-review-webhook-not-configured").length,
       1
     );
-    assert.equal($(repo2).find(".code-review-webhook-configured").length, 1);
     assert.equal(
-      $(repo3).find(".code-review-webhook-not-configured").length,
+      repo2.querySelectorAll(".code-review-webhook-configured").length,
+      1
+    );
+    assert.equal(
+      repo3.querySelectorAll(".code-review-webhook-not-configured").length,
       1
     );
   });
@@ -104,7 +112,7 @@ acceptance("Github Webhook Configuration", function (needs) {
     await visit("/admin/plugins/code-review");
     await click(".code-review-configure-webhooks-button");
 
-    assert.equal(find(".code-review-webhook-configured").length, 3);
+    assert.equal(count(".code-review-webhook-configured"), 3);
   });
 });
 
@@ -126,7 +134,7 @@ acceptance("GitHub Webhook Configuration - Repo List Error", function (needs) {
 
   test("Should show an error message", async (assert) => {
     await visit("/admin/plugins/code-review");
-    assert.equal(queryAll(".modal-body").text(), "credential error");
+    assert.equal(query(".modal-body").innerText, "credential error");
     await click(".modal-footer .btn-primary");
     assert.ok(exists(".code-review-configure-webhooks-button:disabled"));
   });
@@ -159,7 +167,7 @@ acceptance(
 
     test("Should show an error message", async (assert) => {
       await visit("/admin/plugins/code-review");
-      assert.equal(queryAll(".modal-body").text(), "permissions error");
+      assert.equal(query(".modal-body").innerText, "permissions error");
       await click(".modal-footer .btn-primary");
       assert.ok(exists(".code-review-configure-webhooks-button:disabled"));
     });
diff --git a/test/javascripts/acceptance/self-approve-desktop-test.js.es6 b/test/javascripts/acceptance/self-approve-desktop-test.js.es6
index 0a82543..f2a3364 100644
--- a/test/javascripts/acceptance/self-approve-desktop-test.js.es6
+++ b/test/javascripts/acceptance/self-approve-desktop-test.js.es6
@@ -1,5 +1,6 @@
 import {
   acceptance,
+  exists,
   updateCurrentUser,
 } from "discourse/tests/helpers/qunit-helpers";
 import Fixtures from "discourse/tests/fixtures/topic";

GitHub sha: ac4305b393e8884fb4254be7d86226be66f4f417

This commit appears in #72 which was approved by davidtaylorhq. It was merged by CvX.