DEV: upgrades from Ember 2.13 to Ember 3.5.1 (#6808)

Co-Authored-By: Bianca Nenciu <nbianca@users.noreply.github.com>
Co-Authored-By: David Taylor <david@taylorhq.com>
This commit is contained in:
Joffrey JAFFEUX
2019-01-10 11:06:01 +01:00
committed by GitHub
parent 7896c74c2b
commit f9648de897
318 changed files with 1684 additions and 1462 deletions
@@ -38,6 +38,9 @@ QUnit.test("create account with user fields", async assert => {
await fillIn("#new-account-name", "Dr. Good Tuna");
await fillIn("#new-account-password", "cool password bro");
// without this double fill, field will sometimes being empty
// got consistent repro by having browser search bar focused when starting test
await fillIn("#new-account-email", "good.tuna@test.com");
await fillIn("#new-account-email", "good.tuna@test.com");
await fillIn("#new-account-username", "goodtuna");
@@ -45,6 +48,10 @@ QUnit.test("create account with user fields", async assert => {
exists("#username-validation.good"),
"the username validation is good"
);
assert.ok(
exists("#account-email-validation.good"),
"the email validation is good"
);
assert.ok(
exists(".modal-footer .btn-primary:disabled"),
"create account is still disabled due to lack of user fields"
@@ -58,14 +65,15 @@ QUnit.test("create account with user fields", async assert => {
);
await click(".user-field input[type=checkbox]");
assert.not(
exists(".modal-footer .btn-primary:disabled"),
"create account is enabled because field is not checked"
assert.ok(
!exists(".modal-footer .btn-primary:disabled"),
"create account is enabled because field is checked"
);
await click(".user-field input[type=checkbox]");
assert.ok(
exists(".modal-footer .btn-primary:disabled"),
"unclicking the checkbox disables the submit"
"unchecking the checkbox disables the create account button"
);
});
@@ -3,6 +3,8 @@ import { acceptance } from "helpers/qunit-helpers";
acceptance("Jump to", {
loggedIn: true,
mobileView: true,
pretend(server, helper) {
server.get("/t/280/excerpts.json", () => helper.response(200, []));
server.get("/t/280/3.json", () => helper.response(200, {}));
@@ -20,7 +22,6 @@ acceptance("Jump to", {
QUnit.test("default", async assert => {
await visit("/t/internationalization-localization/280");
await click("nav#topic-progress .nums");
await click("button.jump-to-post");
@@ -57,12 +57,11 @@ QUnit.test("update some fields", async assert => {
);
assert.ok(exists(".user-preferences"), "it shows the preferences");
const savePreferences = () => {
click(".save-user");
const savePreferences = async () => {
assert.ok(!exists(".saved-user"), "it hasn't been saved yet");
andThen(() => {
assert.ok(exists(".saved-user"), "it displays the saved message");
});
await click(".save-user");
assert.ok(exists(".saved-user"), "it displays the saved message");
find(".saved-user").remove();
};
fillIn(".pref-name input[type=text]", "Jon Snow");
@@ -114,8 +114,12 @@ QUnit.test("create account", async assert => {
await fillIn("#new-account-name", "Dr. Good Tuna");
await fillIn("#new-account-password", "cool password bro");
// Check username
// without this double fill, field will sometimes being empty
// got consistent repro by having browser search bar focused when starting test
await fillIn("#new-account-email", "good.tuna@test.com");
await fillIn("#new-account-email", "good.tuna@test.com");
// Check username
await fillIn("#new-account-username", "taken");
assert.ok(
exists("#username-validation.bad"),
@@ -25,6 +25,7 @@ acceptance("Topic - Edit timer", {
});
QUnit.test("default", async assert => {
replaceCurrentUser({ admin: true, staff: true, canManageTopic: true });
const timerType = selectKit(".select-kit.timer-type");
const futureDateInputSelector = selectKit(".future-date-input-selector");
@@ -45,6 +46,7 @@ QUnit.test("default", async assert => {
});
QUnit.test("autoclose - specific time", async assert => {
replaceCurrentUser({ admin: true, staff: true, canManageTopic: true });
const futureDateInputSelector = selectKit(".future-date-input-selector");
await visit("/t/internationalization-localization");
@@ -65,6 +67,7 @@ QUnit.test("autoclose - specific time", async assert => {
});
QUnit.test("autoclose", async assert => {
replaceCurrentUser({ admin: true, staff: true, canManageTopic: true });
const futureDateInputSelector = selectKit(".future-date-input-selector");
await visit("/t/internationalization-localization");
@@ -119,6 +122,7 @@ QUnit.test("autoclose", async assert => {
});
QUnit.test("close temporarily", async assert => {
replaceCurrentUser({ admin: true, staff: true, canManageTopic: true });
const timerType = selectKit(".select-kit.timer-type");
const futureDateInputSelector = selectKit(".future-date-input-selector");
@@ -160,6 +164,7 @@ QUnit.test("close temporarily", async assert => {
});
QUnit.test("schedule", async assert => {
replaceCurrentUser({ admin: true, staff: true, canManageTopic: true });
const timerType = selectKit(".select-kit.timer-type");
const categoryChooser = selectKit(".modal-body .category-chooser");
const futureDateInputSelector = selectKit(".future-date-input-selector");
@@ -208,6 +213,7 @@ QUnit.test("TL4 can't auto-delete", async assert => {
});
QUnit.test("auto delete", async assert => {
replaceCurrentUser({ admin: true, staff: true, canManageTopic: true });
const timerType = selectKit(".select-kit.timer-type");
const futureDateInputSelector = selectKit(".future-date-input-selector");
@@ -237,6 +243,7 @@ QUnit.test("auto delete", async assert => {
QUnit.test(
"Manually closing before the timer will clear the status text",
async assert => {
replaceCurrentUser({ admin: true, staff: true, canManageTopic: true });
const futureDateInputSelector = selectKit(".future-date-input-selector");
await visit("/t/internationalization-localization");
@@ -286,3 +286,10 @@ QUnit.test("select below", async assert => {
"it should select the right number of posts"
);
});
QUnit.test("View Hidden Replies", async assert => {
await visit("/t/internationalization-localization/280");
await click(".gap");
assert.equal(find(".gap").length, 0, "it hides gap");
});
@@ -30,6 +30,7 @@ QUnit.test("Root URL - Viewing Self", async assert => {
QUnit.test("Viewing Summary", async assert => {
await visit("/u/eviltrout/summary");
assert.ok(exists(".replies-section li a"), "replies");
assert.ok(exists(".topics-section li a"), "topics");
assert.ok(exists(".links-section li a"), "links");