2019-06-27 08:44:23 +08:00
|
|
|
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers";
|
2019-06-06 16:47:10 +08:00
|
|
|
import selectKit from "helpers/select-kit-helper";
|
2019-06-27 07:58:06 +08:00
|
|
|
|
2018-08-20 10:28:16 +08:00
|
|
|
import User from "discourse/models/user";
|
|
|
|
|
2017-12-22 09:18:12 +08:00
|
|
|
acceptance("User Preferences", {
|
|
|
|
loggedIn: true,
|
2018-07-23 23:51:57 +08:00
|
|
|
pretend(server, helper) {
|
|
|
|
server.post("/u/second_factors.json", () => {
|
2019-06-27 07:58:06 +08:00
|
|
|
return helper.response({
|
|
|
|
success: "OK",
|
|
|
|
password_required: "true"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
server.post("/u/create_second_factor_totp.json", () => {
|
2018-07-23 23:51:57 +08:00
|
|
|
return helper.response({
|
2018-02-20 14:44:51 +08:00
|
|
|
key: "rcyryaqage3jexfj",
|
|
|
|
qr: '<div id="test-qr">qr-code</div>'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2019-06-27 07:58:06 +08:00
|
|
|
server.post("/u/enable_second_factor_totp.json", () => {
|
2018-07-23 23:51:57 +08:00
|
|
|
return helper.response({ error: "invalid token" });
|
2017-12-22 09:18:12 +08:00
|
|
|
});
|
2018-06-28 16:12:32 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
server.put("/u/second_factors_backup.json", () => {
|
|
|
|
return helper.response({
|
|
|
|
backup_codes: ["dsffdsd", "fdfdfdsf", "fddsds"]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
server.post("/u/eviltrout/preferences/revoke-account", () => {
|
|
|
|
return helper.response({
|
|
|
|
success: true
|
|
|
|
});
|
2018-06-28 16:12:32 +08:00
|
|
|
});
|
2018-08-20 10:28:16 +08:00
|
|
|
|
2018-08-30 05:10:56 +08:00
|
|
|
server.put("/u/eviltrout/preferences/email", () => {
|
|
|
|
return helper.response({
|
|
|
|
success: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2018-08-20 10:28:16 +08:00
|
|
|
server.post("/user_avatar/eviltrout/refresh_gravatar.json", () => {
|
|
|
|
return helper.response({
|
|
|
|
gravatar_upload_id: 6543,
|
|
|
|
gravatar_avatar_template: "something"
|
|
|
|
});
|
|
|
|
});
|
2018-10-09 22:21:41 +08:00
|
|
|
|
|
|
|
server.get("/u/eviltrout/activity.json", () => {
|
|
|
|
return helper.response({});
|
|
|
|
});
|
2017-12-22 09:18:12 +08:00
|
|
|
}
|
|
|
|
});
|
2015-05-13 22:42:36 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
QUnit.test("update some fields", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences");
|
2015-05-13 22:42:36 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
assert.ok($("body.user-preferences-page").length, "has the body class");
|
|
|
|
assert.equal(
|
|
|
|
currentURL(),
|
|
|
|
"/u/eviltrout/preferences/account",
|
|
|
|
"defaults to account tab"
|
|
|
|
);
|
|
|
|
assert.ok(exists(".user-preferences"), "it shows the preferences");
|
2015-05-13 22:42:36 +08:00
|
|
|
|
2019-01-10 18:06:01 +08:00
|
|
|
const savePreferences = async () => {
|
2018-06-15 23:03:24 +08:00
|
|
|
assert.ok(!exists(".saved-user"), "it hasn't been saved yet");
|
2019-01-10 18:06:01 +08:00
|
|
|
await click(".save-user");
|
|
|
|
assert.ok(exists(".saved-user"), "it displays the saved message");
|
|
|
|
find(".saved-user").remove();
|
2017-05-04 01:49:16 +08:00
|
|
|
};
|
2017-04-27 04:18:16 +08:00
|
|
|
|
2017-05-05 00:03:59 +08:00
|
|
|
fillIn(".pref-name input[type=text]", "Jon Snow");
|
2018-07-23 23:51:57 +08:00
|
|
|
await savePreferences();
|
2017-05-05 00:03:59 +08:00
|
|
|
|
2017-05-04 01:49:16 +08:00
|
|
|
click(".preferences-nav .nav-profile a");
|
2015-05-13 22:42:36 +08:00
|
|
|
fillIn("#edit-location", "Westeros");
|
2018-07-23 23:51:57 +08:00
|
|
|
await savePreferences();
|
2015-05-13 22:42:36 +08:00
|
|
|
|
2017-05-04 01:49:16 +08:00
|
|
|
click(".preferences-nav .nav-emails a");
|
|
|
|
click(".pref-activity-summary input[type=checkbox]");
|
2018-07-23 23:51:57 +08:00
|
|
|
await savePreferences();
|
2017-05-04 01:49:16 +08:00
|
|
|
|
|
|
|
click(".preferences-nav .nav-notifications a");
|
2018-07-30 18:43:10 +08:00
|
|
|
await selectKit(".control-group.notifications .combo-box.duration").expand();
|
2018-07-30 04:51:32 +08:00
|
|
|
await selectKit(
|
|
|
|
".control-group.notifications .combo-box.duration"
|
|
|
|
).selectRowByValue(1440);
|
2018-07-23 23:51:57 +08:00
|
|
|
await savePreferences();
|
2017-05-04 01:49:16 +08:00
|
|
|
|
|
|
|
click(".preferences-nav .nav-categories a");
|
2019-03-26 02:38:38 +08:00
|
|
|
fillIn(".tracking-controls .category-selector", "faq");
|
2018-07-23 23:51:57 +08:00
|
|
|
await savePreferences();
|
2017-05-04 01:49:16 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
assert.ok(
|
|
|
|
!exists(".preferences-nav .nav-tags a"),
|
|
|
|
"tags tab isn't there when tags are disabled"
|
|
|
|
);
|
2017-05-04 01:49:16 +08:00
|
|
|
|
2019-01-25 00:58:23 +08:00
|
|
|
click(".preferences-nav .nav-interface a");
|
|
|
|
click(".control-group.other input[type=checkbox]:first");
|
|
|
|
savePreferences();
|
2017-05-04 01:49:16 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
assert.ok(
|
|
|
|
!exists(".preferences-nav .nav-apps a"),
|
|
|
|
"apps tab isn't there when you have no authorized apps"
|
|
|
|
);
|
2015-05-13 22:42:36 +08:00
|
|
|
});
|
2016-11-11 04:54:21 +08:00
|
|
|
|
2019-01-25 23:06:06 +08:00
|
|
|
QUnit.test("font size change", async assert => {
|
|
|
|
$.removeCookie("text_size");
|
|
|
|
|
|
|
|
const savePreferences = async () => {
|
|
|
|
assert.ok(!exists(".saved-user"), "it hasn't been saved yet");
|
|
|
|
await click(".save-user");
|
|
|
|
assert.ok(exists(".saved-user"), "it displays the saved message");
|
|
|
|
find(".saved-user").remove();
|
|
|
|
};
|
|
|
|
|
|
|
|
await visit("/u/eviltrout/preferences/interface");
|
|
|
|
|
|
|
|
// Live changes without reload
|
2019-06-06 16:47:10 +08:00
|
|
|
await selectKit(".text-size .combobox").expand();
|
|
|
|
await selectKit(".text-size .combobox").selectRowByValue("larger");
|
2019-01-25 23:06:06 +08:00
|
|
|
assert.ok(document.documentElement.classList.contains("text-size-larger"));
|
|
|
|
|
2019-06-06 16:47:10 +08:00
|
|
|
await selectKit(".text-size .combobox").expand();
|
|
|
|
await selectKit(".text-size .combobox").selectRowByValue("largest");
|
2019-01-25 23:06:06 +08:00
|
|
|
assert.ok(document.documentElement.classList.contains("text-size-largest"));
|
|
|
|
|
|
|
|
assert.equal($.cookie("text_size"), null, "cookie is not set");
|
|
|
|
|
|
|
|
// Click save (by default this sets for all browsers, no cookie)
|
|
|
|
await savePreferences();
|
|
|
|
|
|
|
|
assert.equal($.cookie("text_size"), null, "cookie is not set");
|
|
|
|
|
2019-06-06 16:47:10 +08:00
|
|
|
await selectKit(".text-size .combobox").expand();
|
|
|
|
await selectKit(".text-size .combobox").selectRowByValue("larger");
|
2019-01-25 23:06:06 +08:00
|
|
|
await click(".text-size input[type=checkbox]");
|
|
|
|
|
|
|
|
await savePreferences();
|
|
|
|
|
2019-01-28 19:19:50 +08:00
|
|
|
assert.equal($.cookie("text_size"), "larger|1", "cookie is set");
|
2019-01-25 23:06:06 +08:00
|
|
|
await click(".text-size input[type=checkbox]");
|
2019-06-06 16:47:10 +08:00
|
|
|
await selectKit(".text-size .combobox").expand();
|
|
|
|
await selectKit(".text-size .combobox").selectRowByValue("largest");
|
2019-01-25 23:06:06 +08:00
|
|
|
|
|
|
|
await savePreferences();
|
2019-02-08 23:39:44 +08:00
|
|
|
assert.equal($.cookie("text_size"), null, "cookie is removed");
|
2019-01-25 23:06:06 +08:00
|
|
|
|
|
|
|
$.removeCookie("text_size");
|
|
|
|
});
|
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
QUnit.test("username", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences/username");
|
|
|
|
assert.ok(exists("#change_username"), "it has the input element");
|
2016-11-11 04:54:21 +08:00
|
|
|
});
|
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
QUnit.test("email", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences/email");
|
2016-12-21 17:00:45 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
assert.ok(exists("#change-email"), "it has the input element");
|
2016-12-21 17:00:45 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
await fillIn("#change-email", "invalidemail");
|
|
|
|
|
|
|
|
assert.equal(
|
|
|
|
find(".tip.bad")
|
|
|
|
.text()
|
|
|
|
.trim(),
|
|
|
|
I18n.t("user.email.invalid"),
|
|
|
|
"it should display invalid email tip"
|
|
|
|
);
|
2017-12-22 20:08:12 +08:00
|
|
|
});
|
2017-12-22 09:18:12 +08:00
|
|
|
|
2018-08-30 05:10:56 +08:00
|
|
|
QUnit.test("email field always shows up", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences/email");
|
|
|
|
|
|
|
|
assert.ok(exists("#change-email"), "it has the input element");
|
|
|
|
|
|
|
|
await fillIn("#change-email", "eviltrout@discourse.org");
|
|
|
|
await click(".user-preferences button.btn-primary");
|
|
|
|
|
|
|
|
await visit("/u/eviltrout/preferences");
|
|
|
|
await visit("/u/eviltrout/preferences/email");
|
|
|
|
|
|
|
|
assert.ok(exists("#change-email"), "it has the input element");
|
|
|
|
});
|
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
QUnit.test("connected accounts", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences/account");
|
2018-02-20 14:44:51 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
assert.ok(
|
|
|
|
exists(".pref-associated-accounts"),
|
|
|
|
"it has the connected accounts section"
|
|
|
|
);
|
|
|
|
assert.ok(
|
|
|
|
find(".pref-associated-accounts table tr:first td:first")
|
|
|
|
.html()
|
|
|
|
.indexOf("Facebook") > -1,
|
|
|
|
"it lists facebook"
|
|
|
|
);
|
2018-02-20 14:44:51 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
await click(".pref-associated-accounts table tr:first td:last button");
|
2018-02-20 14:44:51 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
find(".pref-associated-accounts table tr:first td:last button")
|
|
|
|
.html()
|
|
|
|
.indexOf("Connect") > -1;
|
|
|
|
});
|
2018-02-20 14:44:51 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
QUnit.test("second factor", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences/second-factor");
|
2018-02-20 14:44:51 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
assert.ok(exists("#password"), "it has a password input");
|
|
|
|
|
|
|
|
await fillIn("#password", "secrets");
|
|
|
|
await click(".user-preferences .btn-primary");
|
2019-06-27 07:58:06 +08:00
|
|
|
assert.notOk(exists("#password"), "it hides the password input");
|
2018-07-23 23:51:57 +08:00
|
|
|
|
2019-06-27 07:58:06 +08:00
|
|
|
await click(".new-totp");
|
2018-07-23 23:51:57 +08:00
|
|
|
assert.ok(exists("#test-qr"), "shows qr code");
|
|
|
|
|
|
|
|
await fillIn("#second-factor-token", "111111");
|
2019-06-27 07:58:06 +08:00
|
|
|
await click(".add-totp");
|
2018-07-23 23:51:57 +08:00
|
|
|
|
|
|
|
assert.ok(
|
|
|
|
find(".alert-error")
|
|
|
|
.html()
|
|
|
|
.indexOf("invalid token") > -1,
|
|
|
|
"shows server validation error message"
|
|
|
|
);
|
2017-12-22 09:18:12 +08:00
|
|
|
});
|
2018-04-10 02:27:00 +08:00
|
|
|
|
2018-07-26 18:16:32 +08:00
|
|
|
QUnit.test("default avatar selector", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences");
|
2018-07-18 18:57:43 +08:00
|
|
|
|
2018-07-26 18:16:32 +08:00
|
|
|
await click(".pref-avatar .btn");
|
|
|
|
assert.ok(exists(".avatar-choice", "opens the avatar selection modal"));
|
2018-08-20 10:28:16 +08:00
|
|
|
|
|
|
|
await click(".avatar-selector-refresh-gravatar");
|
|
|
|
|
|
|
|
assert.equal(
|
|
|
|
User.currentProp("gravatar_avatar_upload_id"),
|
|
|
|
6543,
|
|
|
|
"it should set the gravatar_avatar_upload_id property"
|
|
|
|
);
|
2018-07-18 18:57:43 +08:00
|
|
|
});
|
|
|
|
|
2019-06-27 07:58:06 +08:00
|
|
|
acceptance("Second Factor Backups", {
|
|
|
|
loggedIn: true,
|
|
|
|
pretend(server, helper) {
|
|
|
|
server.post("/u/second_factors.json", () => {
|
|
|
|
return helper.response({
|
|
|
|
success: "OK",
|
|
|
|
totps: [{ id: 1, name: "one of them" }]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
server.put("/u/second_factors_backup.json", () => {
|
|
|
|
return helper.response({
|
|
|
|
backup_codes: ["dsffdsd", "fdfdfdsf", "fddsds"]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
server.get("/u/eviltrout/activity.json", () => {
|
|
|
|
return helper.response({});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
QUnit.test("second factor backup", async assert => {
|
2019-06-27 08:44:23 +08:00
|
|
|
updateCurrentUser({ second_factor_enabled: true });
|
2019-06-27 07:58:06 +08:00
|
|
|
await visit("/u/eviltrout/preferences/second-factor");
|
|
|
|
await click(".edit-2fa-backup");
|
|
|
|
assert.ok(
|
|
|
|
exists(".second-factor-backup-preferences"),
|
|
|
|
"shows the 2fa backup panel"
|
|
|
|
);
|
|
|
|
await click(".second-factor-backup-preferences .btn-primary");
|
|
|
|
|
|
|
|
assert.ok(exists(".backup-codes-area"), "shows backup codes");
|
|
|
|
});
|
|
|
|
|
2018-07-18 18:57:43 +08:00
|
|
|
acceptance("Avatar selector when selectable avatars is enabled", {
|
2018-04-10 02:27:00 +08:00
|
|
|
loggedIn: true,
|
2018-07-18 18:57:43 +08:00
|
|
|
settings: { selectable_avatars_enabled: true },
|
2018-07-23 23:51:57 +08:00
|
|
|
pretend(server) {
|
|
|
|
server.get("/site/selectable-avatars.json", () => {
|
|
|
|
return [
|
|
|
|
200,
|
|
|
|
{ "Content-Type": "application/json" },
|
|
|
|
["https://www.discourse.org", "https://meta.discourse.org"]
|
|
|
|
];
|
2018-07-18 18:57:43 +08:00
|
|
|
});
|
2018-04-10 02:27:00 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
QUnit.test("selectable avatars", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences");
|
2018-07-18 18:57:43 +08:00
|
|
|
|
2018-07-23 23:51:57 +08:00
|
|
|
await click(".pref-avatar .btn");
|
|
|
|
|
|
|
|
assert.ok(exists(".selectable-avatars", "opens the avatar selection modal"));
|
2018-07-18 18:57:43 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
acceptance("User Preferences when badges are disabled", {
|
|
|
|
loggedIn: true,
|
|
|
|
settings: { enable_badges: false }
|
|
|
|
});
|
|
|
|
|
2018-07-26 18:16:32 +08:00
|
|
|
QUnit.test("visit my preferences", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences");
|
|
|
|
assert.ok($("body.user-preferences-page").length, "has the body class");
|
|
|
|
assert.equal(
|
|
|
|
currentURL(),
|
|
|
|
"/u/eviltrout/preferences/account",
|
|
|
|
"defaults to account tab"
|
|
|
|
);
|
|
|
|
assert.ok(exists(".user-preferences"), "it shows the preferences");
|
2018-06-15 23:03:24 +08:00
|
|
|
});
|
2018-10-09 22:21:41 +08:00
|
|
|
|
|
|
|
QUnit.test("recently connected devices", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences");
|
|
|
|
|
2019-02-27 01:33:49 +08:00
|
|
|
assert.equal(
|
|
|
|
find(".auth-tokens > .auth-token:first .auth-token-device")
|
|
|
|
.text()
|
|
|
|
.trim(),
|
|
|
|
"Linux Computer",
|
|
|
|
"it should display active token first"
|
|
|
|
);
|
|
|
|
|
2018-10-09 22:21:41 +08:00
|
|
|
assert.equal(
|
|
|
|
find(".pref-auth-tokens > a:first")
|
|
|
|
.text()
|
|
|
|
.trim(),
|
|
|
|
I18n.t("user.auth_tokens.show_all", { count: 3 }),
|
|
|
|
"it should display two tokens"
|
|
|
|
);
|
|
|
|
assert.ok(
|
|
|
|
find(".pref-auth-tokens .auth-token").length === 2,
|
|
|
|
"it should display two tokens"
|
|
|
|
);
|
|
|
|
|
|
|
|
await click(".pref-auth-tokens > a:first");
|
|
|
|
|
|
|
|
assert.ok(
|
|
|
|
find(".pref-auth-tokens .auth-token").length === 3,
|
|
|
|
"it should display three tokens"
|
|
|
|
);
|
|
|
|
|
|
|
|
await click(".auth-token-dropdown:first button");
|
|
|
|
await click("li[data-value='notYou']");
|
|
|
|
|
|
|
|
assert.ok(find(".d-modal:visible").length === 1, "modal should appear");
|
|
|
|
|
|
|
|
await click(".modal-footer .btn-primary");
|
|
|
|
|
|
|
|
assert.ok(
|
|
|
|
find(".pref-password.highlighted").length === 1,
|
|
|
|
"it should highlight password preferences"
|
|
|
|
);
|
|
|
|
});
|
2019-12-17 00:41:34 +08:00
|
|
|
|
|
|
|
acceptance(
|
|
|
|
"User can select a topic to feature on profile if site setting in enabled",
|
|
|
|
{
|
|
|
|
loggedIn: true,
|
|
|
|
settings: { allow_featured_topic_on_user_profiles: true },
|
|
|
|
|
|
|
|
pretend(server, helper) {
|
|
|
|
server.put("/u/eviltrout/feature-topic", () => {
|
|
|
|
return helper.response({
|
|
|
|
success: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
QUnit.test("setting featured topic on profile", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences/profile");
|
|
|
|
|
|
|
|
assert.ok(
|
|
|
|
!exists(".featured-topic-link"),
|
|
|
|
"no featured topic link to present"
|
|
|
|
);
|
|
|
|
assert.ok(
|
|
|
|
!exists(".clear-feature-topic-on-profile-btn"),
|
|
|
|
"clear button not present"
|
|
|
|
);
|
|
|
|
|
|
|
|
const selectTopicBtn = find(".feature-topic-on-profile-btn:first");
|
|
|
|
assert.ok(exists(selectTopicBtn), "feature topic button is present");
|
|
|
|
|
|
|
|
await click(selectTopicBtn);
|
|
|
|
|
|
|
|
assert.ok(exists(".feature-topic-on-profile"), "topic picker modal is open");
|
|
|
|
|
|
|
|
const topicRadioBtn = find('input[name="choose_topic_id"]:first');
|
|
|
|
assert.ok(exists(topicRadioBtn), "Topic options are prefilled");
|
|
|
|
await click(topicRadioBtn);
|
|
|
|
|
|
|
|
await click(".save-featured-topic-on-profile");
|
|
|
|
|
|
|
|
assert.ok(
|
|
|
|
exists(".featured-topic-link"),
|
|
|
|
"link to featured topic is present"
|
|
|
|
);
|
|
|
|
assert.ok(
|
|
|
|
exists(".clear-feature-topic-on-profile-btn"),
|
|
|
|
"clear button is present"
|
|
|
|
);
|
|
|
|
});
|
2020-02-04 02:19:38 +08:00
|
|
|
|
|
|
|
acceptance("Custom User Fields", {
|
|
|
|
loggedIn: true,
|
|
|
|
site: {
|
|
|
|
user_fields: [
|
|
|
|
{
|
|
|
|
id: 30,
|
|
|
|
name: "What kind of pet do you have?",
|
|
|
|
field_type: "dropdown",
|
|
|
|
options: ["Dog", "Cat", "Hamster"],
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
QUnit.test("can select an option from a dropdown", async assert => {
|
|
|
|
await visit("/u/eviltrout/preferences/profile");
|
|
|
|
assert.ok(exists(".user-field"), "it has at least one user field");
|
|
|
|
await click(".user-field.dropdown");
|
|
|
|
|
|
|
|
const field = selectKit(
|
|
|
|
".user-field-what-kind-of-pet-do-you-have .combo-box"
|
|
|
|
);
|
|
|
|
await field.expand();
|
|
|
|
await field.selectRowByValue("Cat");
|
|
|
|
assert.equal(field.header().value(), "Cat", "it sets the value of the field");
|
|
|
|
});
|