DEV: fix tests (#15587)

DEV: fix tests (#15587)

These tests have been constantly failing locally for me on /qunit. Also it feels better to just rely on native component behavior.

diff --git a/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js
index d726377..950cf07 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js
@@ -562,15 +562,15 @@ acceptance("Search - Full Page", function (needs) {
     await fillIn(".search-query", "none");
     await click(".search-cta");
 
-    assert.ok(
-      !visible(".search-advanced-options"),
+    assert.notOk(
+      exists(".advanced-filters[open]"),
       "launching a search collapses advanced filters"
     );
 
     await visit("/search");
 
-    assert.ok(
-      !visible(".search-advanced-options"),
+    assert.notOk(
+      exists(".advanced-filters[open]"),
       "filters are collapsed when query param is not present"
     );
 
diff --git a/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js
index 8158721..b27985a 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js
@@ -3,7 +3,6 @@ import {
   count,
   exists,
   queryAll,
-  visible,
 } from "discourse/tests/helpers/qunit-helpers";
 import { click, fillIn, visit } from "@ember/test-helpers";
 import { test } from "qunit";
@@ -26,7 +25,7 @@ acceptance("Search - Mobile", function (needs) {
     await click(".advanced-filters summary");
 
     assert.ok(
-      visible(".search-advanced-filters"),
+      exists(".advanced-filters[open]"),
       "it should expand advanced search filters"
     );
 
@@ -35,8 +34,8 @@ acceptance("Search - Mobile", function (needs) {
 
     assert.strictEqual(count(".fps-topic"), 1, "has one post");
 
-    assert.ok(
-      !visible(".search-advanced-filters"),
+    assert.notOk(
+      exists(".advanced-filters[open]"),
       "it should collapse advanced search filters"
     );
 

GitHub sha: a9d69b0e883ff638bc457200561b8eb39a3ecd7a

This commit appears in #15587 which was approved by ZogStriP. It was merged by jjaffeux.