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.
This commit is contained in:
Joffrey JAFFEUX 2022-01-14 16:59:26 +01:00 committed by GitHub
parent c758e2cdd1
commit a9d69b0e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View File

@ -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"
);

View File

@ -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"
);