REFACTOR: Test assertions should be imported.
Previously they were global functions.
This commit is contained in:
parent
f809e6eda7
commit
b302321451
|
@ -12,6 +12,5 @@ public/
|
||||||
vendor/
|
vendor/
|
||||||
app/assets/javascripts/discourse/tests/test_helper.js
|
app/assets/javascripts/discourse/tests/test_helper.js
|
||||||
app/assets/javascripts/discourse/tests/fixtures
|
app/assets/javascripts/discourse/tests/fixtures
|
||||||
app/assets/javascripts/discourse/tests/helpers/assertions.js
|
|
||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
dist/
|
||||||
|
|
|
@ -10,5 +10,8 @@
|
||||||
"testDone": "off",
|
"testDone": "off",
|
||||||
"sinon": "off",
|
"sinon": "off",
|
||||||
"currentURL": "off",
|
"currentURL": "off",
|
||||||
|
"invisible": "off",
|
||||||
|
"visible": "off",
|
||||||
|
"count": "off",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ public/
|
||||||
vendor/
|
vendor/
|
||||||
app/assets/javascripts/discourse/tests/test_helper.js
|
app/assets/javascripts/discourse/tests/test_helper.js
|
||||||
app/assets/javascripts/discourse/tests/fixtures
|
app/assets/javascripts/discourse/tests/fixtures
|
||||||
app/assets/javascripts/discourse/tests/helpers/assertions.js
|
|
||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
dist/
|
||||||
**/*.rb
|
**/*.rb
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit, click, fillIn } from "@ember/test-helpers";
|
import { visit, click, fillIn } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { fillIn, click, visit, currentURL } from "@ember/test-helpers";
|
import { fillIn, click, visit, currentURL } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance, count } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import siteSettingFixture from "discourse/tests/fixtures/site-settings";
|
import siteSettingFixture from "discourse/tests/fixtures/site-settings";
|
||||||
|
|
||||||
acceptance("Admin - Site Settings", function (needs) {
|
acceptance("Admin - Site Settings", function (needs) {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { fillIn, click, visit, currentURL } from "@ember/test-helpers";
|
import { fillIn, click, visit, currentURL } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit, click, fillIn } from "@ember/test-helpers";
|
import { visit, click, fillIn } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { fillIn, click, visit } from "@ember/test-helpers";
|
import { fillIn, click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance, visible } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
|
import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
|
||||||
|
|
||||||
acceptance("Category Banners", function (needs) {
|
acceptance("Category Banners", function (needs) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
|
import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
|
||||||
import DiscourseURL from "discourse/lib/url";
|
import DiscourseURL from "discourse/lib/url";
|
||||||
import sinon from "sinon";
|
import sinon from "sinon";
|
||||||
|
import { acceptance, visible } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
acceptance("Category Edit", function (needs) {
|
acceptance("Category Edit", function (needs) {
|
||||||
needs.user();
|
needs.user();
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
|
import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
|
||||||
import { skip } from "qunit";
|
import { skip, test } from "qunit";
|
||||||
import { test } from "qunit";
|
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { run } from "@ember/runloop";
|
import { run } from "@ember/runloop";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import {
|
||||||
|
acceptance,
|
||||||
|
invisible,
|
||||||
|
visible,
|
||||||
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { toggleCheckDraftPopup } from "discourse/controllers/composer";
|
import { toggleCheckDraftPopup } from "discourse/controllers/composer";
|
||||||
import Draft from "discourse/models/draft";
|
import Draft from "discourse/models/draft";
|
||||||
import { Promise } from "rsvp";
|
import { Promise } from "rsvp";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
|
@ -4,6 +4,7 @@ import I18n from "I18n";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
|
count,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
acceptance("Group Members - Anonymous", function () {
|
acceptance("Group Members - Anonymous", function () {
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
|
count,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
acceptance("Managing Group Category Notification Defaults", function () {
|
acceptance("Managing Group Category Notification Defaults", function () {
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
|
count,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
acceptance("Managing Group Profile", function () {
|
acceptance("Managing Group Profile", function () {
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
|
count,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
acceptance("Managing Group Tag Notification Defaults", function () {
|
acceptance("Managing Group Tag Notification Defaults", function () {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance, count } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
function setupGroupPretender(server, helper) {
|
function setupGroupPretender(server, helper) {
|
||||||
server.post("/groups/Macdonald/request_membership", () => {
|
server.post("/groups/Macdonald/request_membership", () => {
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import {
|
||||||
|
acceptance,
|
||||||
|
invisible,
|
||||||
|
count,
|
||||||
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
acceptance("Groups", function () {
|
acceptance("Groups", function () {
|
||||||
test("Browsing Groups", async (assert) => {
|
test("Browsing Groups", async (assert) => {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { fillIn, visit } from "@ember/test-helpers";
|
import { fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { fillIn, click, visit } from "@ember/test-helpers";
|
import { fillIn, click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
|
import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance, invisible } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
acceptance("Login Required", function (needs) {
|
acceptance("Login Required", function (needs) {
|
||||||
needs.settings({ login_required: true });
|
needs.settings({ login_required: true });
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { fillIn, click, visit } from "@ember/test-helpers";
|
import { fillIn, click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit, click, fillIn } from "@ember/test-helpers";
|
import { visit, click, fillIn } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit, click } from "@ember/test-helpers";
|
import { visit, click } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit, currentURL, click, fillIn } from "@ember/test-helpers";
|
import { visit, currentURL, click, fillIn } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit, fillIn, click } from "@ember/test-helpers";
|
import { visit, fillIn, click } from "@ember/test-helpers";
|
||||||
import { skip } from "qunit";
|
import { skip, test } from "qunit";
|
||||||
import { test } from "qunit";
|
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import {
|
import {
|
||||||
selectDate,
|
selectDate,
|
||||||
acceptance,
|
acceptance,
|
||||||
waitFor,
|
waitFor,
|
||||||
|
visible,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
acceptance("Search - Full Page", function (needs) {
|
acceptance("Search - Full Page", function (needs) {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import DiscourseURL from "discourse/lib/url";
|
import DiscourseURL from "discourse/lib/url";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit, currentURL } from "@ember/test-helpers";
|
import { visit, currentURL } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit, currentURL } from "@ember/test-helpers";
|
import { visit, currentURL } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance, count } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
acceptance("User Anonymous", function () {
|
acceptance("User Anonymous", function () {
|
||||||
test("Root URL", async (assert) => {
|
test("Root URL", async (assert) => {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, visit } from "@ember/test-helpers";
|
import { click, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { visit } from "@ember/test-helpers";
|
import { visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
// discourse-skip-module
|
|
||||||
function exists(selector) {
|
|
||||||
return count(selector) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function count(selector) {
|
|
||||||
return find(selector).length;
|
|
||||||
}
|
|
||||||
|
|
||||||
function visible(selector) {
|
|
||||||
return find(selector + ":visible").length > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function invisible(selector) {
|
|
||||||
const $items = find(selector + ":visible");
|
|
||||||
return (
|
|
||||||
$items.length === 0 ||
|
|
||||||
$items.css("opacity") !== "1" ||
|
|
||||||
$items.css("visibility") === "hidden"
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -374,3 +374,24 @@ export async function selectDate(selector, date) {
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function invisible(selector) {
|
||||||
|
const $items = find(selector + ":visible");
|
||||||
|
return (
|
||||||
|
$items.length === 0 ||
|
||||||
|
$items.css("opacity") !== "1" ||
|
||||||
|
$items.css("visibility") === "hidden"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function visible(selector) {
|
||||||
|
return find(selector + ":visible").length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function count(selector) {
|
||||||
|
return find(selector).length;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function exists(selector) {
|
||||||
|
return count(selector) > 0;
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { moduleForComponent } from "ember-qunit";
|
import { moduleForComponent } from "ember-qunit";
|
||||||
import { isEmpty } from "@ember/utils";
|
import { isEmpty } from "@ember/utils";
|
||||||
import { click, fillIn } from "@ember/test-helpers";
|
import { click, fillIn } from "@ember/test-helpers";
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
|
|
||||||
function checkSelectKitIsNotExpanded(selector) {
|
function checkSelectKitIsNotExpanded(selector) {
|
||||||
if (find(selector).hasClass("is-expanded")) {
|
if (find(selector).hasClass("is-expanded")) {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { moduleForComponent } from "ember-qunit";
|
import { moduleForComponent } from "ember-qunit";
|
||||||
import componentTest from "discourse/tests/helpers/component-test";
|
import componentTest from "discourse/tests/helpers/component-test";
|
||||||
import pretender from "discourse/tests/helpers/create-pretender";
|
import pretender from "discourse/tests/helpers/create-pretender";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { moduleForComponent } from "ember-qunit";
|
import { moduleForComponent } from "ember-qunit";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import componentTest from "discourse/tests/helpers/component-test";
|
import componentTest from "discourse/tests/helpers/component-test";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { moduleForComponent } from "ember-qunit";
|
import { moduleForComponent } from "ember-qunit";
|
||||||
import componentTest from "discourse/tests/helpers/component-test";
|
import componentTest from "discourse/tests/helpers/component-test";
|
||||||
import { click } from "@ember/test-helpers";
|
import { click } from "@ember/test-helpers";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { moduleForComponent } from "ember-qunit";
|
import { moduleForComponent } from "ember-qunit";
|
||||||
import componentTest from "discourse/tests/helpers/component-test";
|
import componentTest from "discourse/tests/helpers/component-test";
|
||||||
moduleForComponent("html-safe-helper", { integration: true });
|
moduleForComponent("html-safe-helper", { integration: true });
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import DiscourseURL from "discourse/lib/url";
|
import DiscourseURL from "discourse/lib/url";
|
||||||
import Category from "discourse/models/category";
|
import Category from "discourse/models/category";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { moduleForComponent } from "ember-qunit";
|
import { moduleForComponent } from "ember-qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import componentTest from "discourse/tests/helpers/component-test";
|
import componentTest from "discourse/tests/helpers/component-test";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { moduleForComponent } from "ember-qunit";
|
import { moduleForComponent } from "ember-qunit";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import componentTest from "discourse/tests/helpers/component-test";
|
import componentTest from "discourse/tests/helpers/component-test";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import {
|
import {
|
||||||
moduleForWidget,
|
moduleForWidget,
|
||||||
widgetTest,
|
widgetTest,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import {
|
import {
|
||||||
moduleForWidget,
|
moduleForWidget,
|
||||||
widgetTest,
|
widgetTest,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import {
|
import {
|
||||||
moduleForWidget,
|
moduleForWidget,
|
||||||
widgetTest,
|
widgetTest,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import {
|
import {
|
||||||
moduleForWidget,
|
moduleForWidget,
|
||||||
|
|
|
@ -15,6 +15,7 @@ import { ScrollingDOMMethods } from "discourse/mixins/scrolling";
|
||||||
import {
|
import {
|
||||||
resetSite,
|
resetSite,
|
||||||
applyPretender,
|
applyPretender,
|
||||||
|
exists,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import PreloadStore from "discourse/lib/preload-store";
|
import PreloadStore from "discourse/lib/preload-store";
|
||||||
import User from "discourse/models/user";
|
import User from "discourse/models/user";
|
||||||
|
@ -78,6 +79,18 @@ export default function setupTests(app, container) {
|
||||||
return window.sinon;
|
return window.sinon;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Object.defineProperty(window, "exists", {
|
||||||
|
get() {
|
||||||
|
deprecated(
|
||||||
|
"Accessing the global function `exists` is deprecated. Import it instead.",
|
||||||
|
{
|
||||||
|
since: "2.6.0.beta.4",
|
||||||
|
dropFrom: "2.6.0",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return exists;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
QUnit.testStart(function (ctx) {
|
QUnit.testStart(function (ctx) {
|
||||||
let settings = resetSettings();
|
let settings = resetSettings();
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { afterRender } from "discourse-common/utils/decorators";
|
import { afterRender } from "discourse-common/utils/decorators";
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import componentTest from "discourse/tests/helpers/component-test";
|
import componentTest from "discourse/tests/helpers/component-test";
|
||||||
|
|
|
@ -14,6 +14,10 @@ module("Acceptance: wizard", {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function exists(selector) {
|
||||||
|
return document.querySelector(selector) !== null;
|
||||||
|
}
|
||||||
|
|
||||||
test("Wizard starts", async (assert) => {
|
test("Wizard starts", async (assert) => {
|
||||||
await visit("/");
|
await visit("/");
|
||||||
assert.ok(exists(".wizard-column-contents"));
|
assert.ok(exists(".wizard-column-contents"));
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
//= require ember-template-compiler
|
//= require ember-template-compiler
|
||||||
//= require wizard-application
|
//= require wizard-application
|
||||||
//= require wizard-vendor
|
//= require wizard-vendor
|
||||||
//= require helpers/assertions
|
|
||||||
//= require_tree ./helpers
|
//= require_tree ./helpers
|
||||||
//= require_tree ./acceptance
|
//= require_tree ./acceptance
|
||||||
//= require_tree ./models
|
//= require_tree ./models
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
updateCurrentUser,
|
updateCurrentUser,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { exists } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
|
|
Loading…
Reference in New Issue