DEV: Use key names in triggerKeyEvent (#17535)
This commit is contained in:
parent
5538b8442e
commit
c3f7a45821
|
@ -15,8 +15,6 @@ import siteSettingFixture from "discourse/tests/fixtures/site-settings";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import pretender from "discourse/tests/helpers/create-pretender";
|
import pretender from "discourse/tests/helpers/create-pretender";
|
||||||
|
|
||||||
const ENTER_KEYCODE = 13;
|
|
||||||
|
|
||||||
acceptance("Admin - Site Settings", function (needs) {
|
acceptance("Admin - Site Settings", function (needs) {
|
||||||
let updatedTitle;
|
let updatedTitle;
|
||||||
|
|
||||||
|
@ -108,7 +106,7 @@ acceptance("Admin - Site Settings", function (needs) {
|
||||||
);
|
);
|
||||||
|
|
||||||
await fillIn(".input-setting-string", "Test");
|
await fillIn(".input-setting-string", "Test");
|
||||||
await triggerKeyEvent(".input-setting-string", "keydown", ENTER_KEYCODE);
|
await triggerKeyEvent(".input-setting-string", "keydown", "Enter");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists(".row.setting.overridden"),
|
exists(".row.setting.overridden"),
|
||||||
"saving via Enter key marks setting as overridden"
|
"saving via Enter key marks setting as overridden"
|
||||||
|
@ -176,13 +174,13 @@ acceptance("Admin - Site Settings", function (needs) {
|
||||||
await click(".select-kit-header.multi-select-header");
|
await click(".select-kit-header.multi-select-header");
|
||||||
|
|
||||||
await fillIn(".select-kit-filter input", "cat.?.domain");
|
await fillIn(".select-kit-filter input", "cat.?.domain");
|
||||||
await triggerKeyEvent(".select-kit-filter input", "keydown", ENTER_KEYCODE);
|
await triggerKeyEvent(".select-kit-filter input", "keydown", "Enter");
|
||||||
|
|
||||||
await fillIn(".select-kit-filter input", "*.domain");
|
await fillIn(".select-kit-filter input", "*.domain");
|
||||||
await triggerKeyEvent(".select-kit-filter input", "keydown", ENTER_KEYCODE);
|
await triggerKeyEvent(".select-kit-filter input", "keydown", "Enter");
|
||||||
|
|
||||||
await fillIn(".select-kit-filter input", "proper.com");
|
await fillIn(".select-kit-filter input", "proper.com");
|
||||||
await triggerKeyEvent(".select-kit-filter input", "keydown", ENTER_KEYCODE);
|
await triggerKeyEvent(".select-kit-filter input", "keydown", "Enter");
|
||||||
|
|
||||||
await click("button.ok");
|
await click("button.ok");
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ import { click, fillIn, triggerKeyEvent, visit } from "@ember/test-helpers";
|
||||||
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { setCaretPosition } from "discourse/lib/utilities";
|
import { setCaretPosition } from "discourse/lib/utilities";
|
||||||
|
|
||||||
const BACKSPACE_KEYCODE = 8;
|
|
||||||
|
|
||||||
acceptance("Composer - editor mentions", function (needs) {
|
acceptance("Composer - editor mentions", function (needs) {
|
||||||
needs.user();
|
needs.user();
|
||||||
needs.settings({ enable_mentions: true });
|
needs.settings({ enable_mentions: true });
|
||||||
|
@ -37,15 +35,15 @@ acceptance("Composer - editor mentions", function (needs) {
|
||||||
// Emulate user pressing backspace in the editor
|
// Emulate user pressing backspace in the editor
|
||||||
const editor = query(".d-editor-input");
|
const editor = query(".d-editor-input");
|
||||||
|
|
||||||
await triggerKeyEvent(".d-editor-input", "keydown", "@".charCodeAt(0));
|
await triggerKeyEvent(".d-editor-input", "keydown", "@");
|
||||||
await fillIn(".d-editor-input", "abc @");
|
await fillIn(".d-editor-input", "abc @");
|
||||||
await setCaretPosition(editor, 5);
|
await setCaretPosition(editor, 5);
|
||||||
await triggerKeyEvent(".d-editor-input", "keyup", "@".charCodeAt(0));
|
await triggerKeyEvent(".d-editor-input", "keyup", "@");
|
||||||
|
|
||||||
await triggerKeyEvent(".d-editor-input", "keydown", "u".charCodeAt(0));
|
await triggerKeyEvent(".d-editor-input", "keydown", "U");
|
||||||
await fillIn(".d-editor-input", "abc @u");
|
await fillIn(".d-editor-input", "abc @u");
|
||||||
await setCaretPosition(editor, 6);
|
await setCaretPosition(editor, 6);
|
||||||
await triggerKeyEvent(".d-editor-input", "keyup", "u".charCodeAt(0));
|
await triggerKeyEvent(".d-editor-input", "keyup", "U");
|
||||||
|
|
||||||
await click(".autocomplete.ac-user .selected");
|
await click(".autocomplete.ac-user .selected");
|
||||||
|
|
||||||
|
@ -62,13 +60,13 @@ acceptance("Composer - editor mentions", function (needs) {
|
||||||
await fillIn(".d-editor-input", "abc @user a");
|
await fillIn(".d-editor-input", "abc @user a");
|
||||||
|
|
||||||
// Emulate user typing `@` and `u` in the editor
|
// Emulate user typing `@` and `u` in the editor
|
||||||
await triggerKeyEvent(".d-editor-input", "keydown", BACKSPACE_KEYCODE);
|
await triggerKeyEvent(".d-editor-input", "keydown", "Backspace");
|
||||||
await fillIn(".d-editor-input", "abc @user ");
|
await fillIn(".d-editor-input", "abc @user ");
|
||||||
await triggerKeyEvent(".d-editor-input", "keyup", BACKSPACE_KEYCODE);
|
await triggerKeyEvent(".d-editor-input", "keyup", "Backspace");
|
||||||
|
|
||||||
await triggerKeyEvent(".d-editor-input", "keydown", BACKSPACE_KEYCODE);
|
await triggerKeyEvent(".d-editor-input", "keydown", "Backspace");
|
||||||
await fillIn(".d-editor-input", "abc @user");
|
await fillIn(".d-editor-input", "abc @user");
|
||||||
await triggerKeyEvent(".d-editor-input", "keyup", BACKSPACE_KEYCODE);
|
await triggerKeyEvent(".d-editor-input", "keyup", "Backspace");
|
||||||
|
|
||||||
await click(".autocomplete.ac-user .selected");
|
await click(".autocomplete.ac-user .selected");
|
||||||
|
|
||||||
|
@ -88,14 +86,14 @@ acceptance("Composer - editor mentions", function (needs) {
|
||||||
await fillIn(".d-editor-input", "abc @user 123");
|
await fillIn(".d-editor-input", "abc @user 123");
|
||||||
await setCaretPosition(editor, 9);
|
await setCaretPosition(editor, 9);
|
||||||
|
|
||||||
await triggerKeyEvent(".d-editor-input", "keydown", BACKSPACE_KEYCODE);
|
await triggerKeyEvent(".d-editor-input", "keydown", "Backspace");
|
||||||
await fillIn(".d-editor-input", "abc @use 123");
|
await fillIn(".d-editor-input", "abc @use 123");
|
||||||
await triggerKeyEvent(".d-editor-input", "keyup", BACKSPACE_KEYCODE);
|
await triggerKeyEvent(".d-editor-input", "keyup", "Backspace");
|
||||||
await setCaretPosition(editor, 8);
|
await setCaretPosition(editor, 8);
|
||||||
|
|
||||||
await triggerKeyEvent(".d-editor-input", "keydown", BACKSPACE_KEYCODE);
|
await triggerKeyEvent(".d-editor-input", "keydown", "Backspace");
|
||||||
await fillIn(".d-editor-input", "abc @us 123");
|
await fillIn(".d-editor-input", "abc @us 123");
|
||||||
await triggerKeyEvent(".d-editor-input", "keyup", BACKSPACE_KEYCODE);
|
await triggerKeyEvent(".d-editor-input", "keyup", "Backspace");
|
||||||
await setCaretPosition(editor, 7);
|
await setCaretPosition(editor, 7);
|
||||||
|
|
||||||
await click(".autocomplete.ac-user .selected");
|
await click(".autocomplete.ac-user .selected");
|
||||||
|
|
|
@ -73,21 +73,21 @@ acceptance("Composer - Hyperlink", function (needs) {
|
||||||
|
|
||||||
await click(".d-editor button.link");
|
await click(".d-editor button.link");
|
||||||
await fillIn(".modal-body .link-url", "http://google.com");
|
await fillIn(".modal-body .link-url", "http://google.com");
|
||||||
await triggerKeyEvent(".modal-body .link-url", "keyup", 32);
|
await triggerKeyEvent(".modal-body .link-url", "keyup", "Space");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
!exists(".internal-link-results"),
|
!exists(".internal-link-results"),
|
||||||
"does not show internal links search dropdown when inputting a url"
|
"does not show internal links search dropdown when inputting a url"
|
||||||
);
|
);
|
||||||
|
|
||||||
await fillIn(".modal-body .link-url", "local");
|
await fillIn(".modal-body .link-url", "local");
|
||||||
await triggerKeyEvent(".modal-body .link-url", "keyup", 32);
|
await triggerKeyEvent(".modal-body .link-url", "keyup", "Space");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists(".internal-link-results"),
|
exists(".internal-link-results"),
|
||||||
"shows internal links search dropdown when entering keywords"
|
"shows internal links search dropdown when entering keywords"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent(".insert-link", "keydown", 40);
|
await triggerKeyEvent(".insert-link", "keydown", "ArrowDown");
|
||||||
await triggerKeyEvent(".insert-link", "keydown", 13);
|
await triggerKeyEvent(".insert-link", "keydown", "Enter");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
!exists(".internal-link-results"),
|
!exists(".internal-link-results"),
|
||||||
|
|
|
@ -182,8 +182,8 @@ acceptance("Composer - Image Preview", function (needs) {
|
||||||
"correct alt text in input"
|
"correct alt text in input"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent(altTextInput, "keypress", "[".charCodeAt(0));
|
await triggerKeyEvent(altTextInput, "keypress", "[");
|
||||||
await triggerKeyEvent(altTextInput, "keypress", "]".charCodeAt(0));
|
await triggerKeyEvent(altTextInput, "keypress", "]");
|
||||||
assert.equal(query(altTextInput).value, "zorro", "does not input [ ] keys");
|
assert.equal(query(altTextInput).value, "zorro", "does not input [ ] keys");
|
||||||
|
|
||||||
await fillIn(altTextInput, "steak");
|
await fillIn(altTextInput, "steak");
|
||||||
|
@ -298,7 +298,7 @@ acceptance("Composer - Image Preview", function (needs) {
|
||||||
await click(editAltTextButton);
|
await click(editAltTextButton);
|
||||||
|
|
||||||
await fillIn(altTextInput, "tomtom");
|
await fillIn(altTextInput, "tomtom");
|
||||||
await triggerKeyEvent(altTextInput, "keypress", 13);
|
await triggerKeyEvent(altTextInput, "keypress", "Enter");
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
query(".d-editor-input").value,
|
query(".d-editor-input").value,
|
||||||
|
@ -320,7 +320,7 @@ acceptance("Composer - Image Preview", function (needs) {
|
||||||
await click(editAltTextButton);
|
await click(editAltTextButton);
|
||||||
|
|
||||||
await fillIn(altTextInput, "");
|
await fillIn(altTextInput, "");
|
||||||
await triggerKeyEvent(altTextInput, "keypress", 13);
|
await triggerKeyEvent(altTextInput, "keypress", "Enter");
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
query(".d-editor-input").value,
|
query(".d-editor-input").value,
|
||||||
|
@ -332,7 +332,7 @@ acceptance("Composer - Image Preview", function (needs) {
|
||||||
await click(editAltTextButton);
|
await click(editAltTextButton);
|
||||||
|
|
||||||
await fillIn(altTextInput, "tomtom");
|
await fillIn(altTextInput, "tomtom");
|
||||||
await triggerKeyEvent(altTextInput, "keypress", 13);
|
await triggerKeyEvent(altTextInput, "keypress", "Enter");
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
query(".d-editor-input").value,
|
query(".d-editor-input").value,
|
||||||
|
|
|
@ -70,7 +70,7 @@ acceptance("Create Account - User Fields", function (needs) {
|
||||||
test("can submit with enter", async function (assert) {
|
test("can submit with enter", async function (assert) {
|
||||||
await visit("/");
|
await visit("/");
|
||||||
await click("header .sign-up-button");
|
await click("header .sign-up-button");
|
||||||
await triggerKeyEvent(".modal-footer .btn-primary", "keydown", 13);
|
await triggerKeyEvent(".modal-footer .btn-primary", "keydown", "Enter");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count("#modal-alert:visible"),
|
count("#modal-alert:visible"),
|
||||||
|
|
|
@ -62,7 +62,11 @@ acceptance("Do not disturb", function (needs) {
|
||||||
"There are 4 duration choices"
|
"There are 4 duration choices"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent(".do-not-disturb-tile:nth-child(1)", "keydown", 13);
|
await triggerKeyEvent(
|
||||||
|
".do-not-disturb-tile:nth-child(1)",
|
||||||
|
"keydown",
|
||||||
|
"Enter"
|
||||||
|
);
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
query(".do-not-disturb-modal.hidden"),
|
query(".do-not-disturb-modal.hidden"),
|
||||||
|
|
|
@ -50,12 +50,12 @@ acceptance("Emoji", function (needs) {
|
||||||
await click("#topic-footer-buttons .btn.create");
|
await click("#topic-footer-buttons .btn.create");
|
||||||
|
|
||||||
await fillIn(".d-editor-input", ":s");
|
await fillIn(".d-editor-input", ":s");
|
||||||
await triggerKeyEvent(".d-editor-input", "keyup", 40); // ensures a keyup is triggered
|
await triggerKeyEvent(".d-editor-input", "keyup", "ArrowDown"); // ensures a keyup is triggered
|
||||||
|
|
||||||
assert.notOk(exists(".autocomplete.ac-emoji"));
|
assert.notOk(exists(".autocomplete.ac-emoji"));
|
||||||
|
|
||||||
await fillIn(".d-editor-input", ":sw");
|
await fillIn(".d-editor-input", ":sw");
|
||||||
await triggerKeyEvent(".d-editor-input", "keyup", 40); // ensures a keyup is triggered
|
await triggerKeyEvent(".d-editor-input", "keyup", "ArrowDown"); // ensures a keyup is triggered
|
||||||
|
|
||||||
assert.ok(exists(".autocomplete.ac-emoji"));
|
assert.ok(exists(".autocomplete.ac-emoji"));
|
||||||
});
|
});
|
||||||
|
|
|
@ -47,7 +47,7 @@ acceptance("Fast Edit", function (needs) {
|
||||||
const textNode = query("#post_1 .cooked p").childNodes[0];
|
const textNode = query("#post_1 .cooked p").childNodes[0];
|
||||||
|
|
||||||
await selectText(textNode, 9);
|
await selectText(textNode, 9);
|
||||||
await triggerKeyEvent(document, "keypress", "e".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "E");
|
||||||
|
|
||||||
assert.ok(exists("#fast-edit-input"), "fast editor is open");
|
assert.ok(exists("#fast-edit-input"), "fast editor is open");
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
|
|
|
@ -33,37 +33,37 @@ acceptance("Keyboard Shortcuts - Anonymous Users", function (needs) {
|
||||||
|
|
||||||
test("go to first suggested topic", async function (assert) {
|
test("go to first suggested topic", async function (assert) {
|
||||||
await visit("/t/this-is-a-test-topic/9");
|
await visit("/t/this-is-a-test-topic/9");
|
||||||
await triggerKeyEvent(document, "keypress", "g".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "G");
|
||||||
await triggerKeyEvent(document, "keypress", "s".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "S");
|
||||||
assert.strictEqual(currentURL(), "/t/this-is-a-test-topic/9");
|
assert.strictEqual(currentURL(), "/t/this-is-a-test-topic/9");
|
||||||
|
|
||||||
// Suggested topics elements exist.
|
// Suggested topics elements exist.
|
||||||
await visit("/t/internationalization-localization/280");
|
await visit("/t/internationalization-localization/280");
|
||||||
await triggerKeyEvent(document, "keypress", "g".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "G");
|
||||||
await triggerKeyEvent(document, "keypress", "s".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "S");
|
||||||
assert.strictEqual(currentURL(), "/t/polls-are-still-very-buggy/27331/4");
|
assert.strictEqual(currentURL(), "/t/polls-are-still-very-buggy/27331/4");
|
||||||
|
|
||||||
await visit("/t/1-3-0beta9-no-rate-limit-popups/28830");
|
await visit("/t/1-3-0beta9-no-rate-limit-popups/28830");
|
||||||
await triggerKeyEvent(document, "keypress", "g".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "G");
|
||||||
await triggerKeyEvent(document, "keypress", "s".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "S");
|
||||||
assert.strictEqual(currentURL(), "/t/keyboard-shortcuts-are-awesome/27331");
|
assert.strictEqual(currentURL(), "/t/keyboard-shortcuts-are-awesome/27331");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("j/k navigation moves selection up/down", async function (assert) {
|
test("j/k navigation moves selection up/down", async function (assert) {
|
||||||
await visit("/t/this-is-a-test-topic/9");
|
await visit("/t/this-is-a-test-topic/9");
|
||||||
await triggerKeyEvent(document, "keypress", "j".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "J");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists(".post-stream .topic-post.selected #post_1"),
|
exists(".post-stream .topic-post.selected #post_1"),
|
||||||
"first post is selected"
|
"first post is selected"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent(document, "keypress", "j".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "J");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists(".post-stream .topic-post.selected #post_2"),
|
exists(".post-stream .topic-post.selected #post_2"),
|
||||||
"pressing j moves selection to next post"
|
"pressing j moves selection to next post"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent(document, "keypress", "k".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "K");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists(".post-stream .topic-post.selected #post_1"),
|
exists(".post-stream .topic-post.selected #post_1"),
|
||||||
"pressing k moves selection to previous post"
|
"pressing k moves selection to previous post"
|
||||||
|
@ -115,8 +115,8 @@ acceptance("Keyboard Shortcuts - Authenticated Users", function (needs) {
|
||||||
exists("#dismiss-topics-top"),
|
exists("#dismiss-topics-top"),
|
||||||
"dismiss unread top button is present"
|
"dismiss unread top button is present"
|
||||||
);
|
);
|
||||||
await triggerKeyEvent(document, "keypress", "x".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "X");
|
||||||
await triggerKeyEvent(document, "keypress", "t".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "T");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists("#dismiss-read-confirm"),
|
exists("#dismiss-read-confirm"),
|
||||||
"confirmation modal to dismiss unread is present"
|
"confirmation modal to dismiss unread is present"
|
||||||
|
@ -145,8 +145,8 @@ acceptance("Keyboard Shortcuts - Authenticated Users", function (needs) {
|
||||||
exists("#dismiss-topics-top"),
|
exists("#dismiss-topics-top"),
|
||||||
"dismiss unread top button is hidden"
|
"dismiss unread top button is hidden"
|
||||||
);
|
);
|
||||||
await triggerKeyEvent(document, "keypress", "x".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "X");
|
||||||
await triggerKeyEvent(document, "keypress", "t".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "T");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists("#dismiss-read-confirm"),
|
exists("#dismiss-read-confirm"),
|
||||||
"confirmation modal to dismiss unread is present"
|
"confirmation modal to dismiss unread is present"
|
||||||
|
@ -174,8 +174,8 @@ acceptance("Keyboard Shortcuts - Authenticated Users", function (needs) {
|
||||||
document.getElementById("ember-testing-container").scrollTop = 0;
|
document.getElementById("ember-testing-container").scrollTop = 0;
|
||||||
await visit("/new");
|
await visit("/new");
|
||||||
assert.ok(exists("#dismiss-new-top"), "dismiss new top button is present");
|
assert.ok(exists("#dismiss-new-top"), "dismiss new top button is present");
|
||||||
await triggerKeyEvent(document, "keypress", "x".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "X");
|
||||||
await triggerKeyEvent(document, "keypress", "r".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "R");
|
||||||
assert.strictEqual(resetNewCalled, 1);
|
assert.strictEqual(resetNewCalled, 1);
|
||||||
|
|
||||||
// we get rid of all but one topic so the top dismiss button doesn't
|
// we get rid of all but one topic so the top dismiss button doesn't
|
||||||
|
@ -191,8 +191,8 @@ acceptance("Keyboard Shortcuts - Authenticated Users", function (needs) {
|
||||||
exists("#dismiss-new-top"),
|
exists("#dismiss-new-top"),
|
||||||
"dismiss new top button has been hidden"
|
"dismiss new top button has been hidden"
|
||||||
);
|
);
|
||||||
await triggerKeyEvent(document, "keypress", "x".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "X");
|
||||||
await triggerKeyEvent(document, "keypress", "r".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "R");
|
||||||
assert.strictEqual(resetNewCalled, 2);
|
assert.strictEqual(resetNewCalled, 2);
|
||||||
|
|
||||||
// restore the original topic list
|
// restore the original topic list
|
||||||
|
@ -214,8 +214,8 @@ acceptance("Keyboard Shortcuts - Authenticated Users", function (needs) {
|
||||||
"dismiss new bottom button is present"
|
"dismiss new bottom button is present"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent(document, "keypress", "x".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "X");
|
||||||
await triggerKeyEvent(document, "keypress", "r".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "R");
|
||||||
|
|
||||||
assert.strictEqual(resetNewCalled, 1);
|
assert.strictEqual(resetNewCalled, 1);
|
||||||
});
|
});
|
||||||
|
|
|
@ -50,7 +50,7 @@ acceptance("Modal", function (needs) {
|
||||||
await click(".login-button");
|
await click(".login-button");
|
||||||
assert.strictEqual(count(".d-modal:visible"), 1, "modal should reappear");
|
assert.strictEqual(count(".d-modal:visible"), 1, "modal should reappear");
|
||||||
|
|
||||||
await triggerKeyEvent("#main-outlet", "keydown", 27);
|
await triggerKeyEvent("#main-outlet", "keydown", "Escape");
|
||||||
assert.ok(!exists(".d-modal:visible"), "ESC should close the modal");
|
assert.ok(!exists(".d-modal:visible"), "ESC should close the modal");
|
||||||
|
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
|
@ -69,7 +69,7 @@ acceptance("Modal", function (needs) {
|
||||||
1,
|
1,
|
||||||
"modal should not disappear when you click outside"
|
"modal should not disappear when you click outside"
|
||||||
);
|
);
|
||||||
await triggerKeyEvent("#main-outlet", "keyup", 27);
|
await triggerKeyEvent("#main-outlet", "keyup", "Escape");
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count(".d-modal:visible"),
|
count(".d-modal:visible"),
|
||||||
1,
|
1,
|
||||||
|
@ -142,7 +142,7 @@ acceptance("Modal Keyboard Events", function (needs) {
|
||||||
await visit("/t/internationalization-localization/280");
|
await visit("/t/internationalization-localization/280");
|
||||||
await click(".toggle-admin-menu");
|
await click(".toggle-admin-menu");
|
||||||
await click(".admin-topic-timer-update button");
|
await click(".admin-topic-timer-update button");
|
||||||
await triggerKeyEvent(".d-modal", "keydown", 13);
|
await triggerKeyEvent(".d-modal", "keydown", "Enter");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count("#modal-alert:visible"),
|
count("#modal-alert:visible"),
|
||||||
|
@ -157,13 +157,13 @@ acceptance("Modal Keyboard Events", function (needs) {
|
||||||
|
|
||||||
assert.ok(exists(".d-modal:visible"), "modal should be visible");
|
assert.ok(exists(".d-modal:visible"), "modal should be visible");
|
||||||
|
|
||||||
await triggerKeyEvent("#main-outlet", "keydown", 27);
|
await triggerKeyEvent("#main-outlet", "keydown", "Escape");
|
||||||
|
|
||||||
assert.ok(!exists(".d-modal:visible"), "ESC should close the modal");
|
assert.ok(!exists(".d-modal:visible"), "ESC should close the modal");
|
||||||
|
|
||||||
await click(".topic-body button.reply");
|
await click(".topic-body button.reply");
|
||||||
await click(".d-editor-button-bar .btn.link");
|
await click(".d-editor-button-bar .btn.link");
|
||||||
await triggerKeyEvent(".d-modal", "keydown", 13);
|
await triggerKeyEvent(".d-modal", "keydown", "Enter");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
!exists(".d-modal:visible"),
|
!exists(".d-modal:visible"),
|
||||||
|
|
|
@ -11,13 +11,6 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import { skip, test } from "qunit";
|
import { skip, test } from "qunit";
|
||||||
import { DEFAULT_TYPE_FILTER } from "discourse/widgets/search-menu";
|
import { DEFAULT_TYPE_FILTER } from "discourse/widgets/search-menu";
|
||||||
|
|
||||||
const keyEnter = 13;
|
|
||||||
const keyArrowDown = 40;
|
|
||||||
const keyArrowUp = 38;
|
|
||||||
const keyEsc = 27;
|
|
||||||
const keyA = 65;
|
|
||||||
const keyBackSpace = 8;
|
|
||||||
|
|
||||||
acceptance("Search - Anonymous", function (needs) {
|
acceptance("Search - Anonymous", function (needs) {
|
||||||
needs.pretender((server, helper) => {
|
needs.pretender((server, helper) => {
|
||||||
server.get("/search/query", (request) => {
|
server.get("/search/query", (request) => {
|
||||||
|
@ -88,7 +81,7 @@ acceptance("Search - Anonymous", function (needs) {
|
||||||
"shows matching user results"
|
"shows matching user results"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyArrowDown);
|
await triggerKeyEvent(".search-menu", "keydown", "ArrowDown");
|
||||||
await click(document.activeElement);
|
await click(document.activeElement);
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
|
@ -203,7 +196,7 @@ acceptance("Search - Anonymous", function (needs) {
|
||||||
|
|
||||||
await fillIn("#search-term", "a proper");
|
await fillIn("#search-term", "a proper");
|
||||||
await query("input#search-term").focus();
|
await query("input#search-term").focus();
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyArrowDown);
|
await triggerKeyEvent(".search-menu", "keydown", "ArrowDown");
|
||||||
|
|
||||||
await click(document.activeElement);
|
await click(document.activeElement);
|
||||||
assert.ok(
|
assert.ok(
|
||||||
|
@ -233,7 +226,7 @@ acceptance("Search - Anonymous", function (needs) {
|
||||||
|
|
||||||
await fillIn("#search-term", "dev");
|
await fillIn("#search-term", "dev");
|
||||||
await query("input#search-term").focus();
|
await query("input#search-term").focus();
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyArrowDown);
|
await triggerKeyEvent(".search-menu", "keydown", "ArrowDown");
|
||||||
await click(document.activeElement);
|
await click(document.activeElement);
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
|
@ -243,7 +236,7 @@ acceptance("Search - Anonymous", function (needs) {
|
||||||
|
|
||||||
await fillIn("#search-term", "");
|
await fillIn("#search-term", "");
|
||||||
await query("input#search-term").focus();
|
await query("input#search-term").focus();
|
||||||
await triggerKeyEvent("input#search-term", "keydown", keyBackSpace);
|
await triggerKeyEvent("input#search-term", "keydown", "Backspace");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
!exists(".search-menu .search-context"),
|
!exists(".search-menu .search-context"),
|
||||||
|
@ -267,7 +260,7 @@ acceptance("Search - Anonymous", function (needs) {
|
||||||
|
|
||||||
await fillIn("#search-term", "proper");
|
await fillIn("#search-term", "proper");
|
||||||
await query("input#search-term").focus();
|
await query("input#search-term").focus();
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyArrowDown);
|
await triggerKeyEvent(".search-menu", "keydown", "ArrowDown");
|
||||||
await click(document.activeElement);
|
await click(document.activeElement);
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
|
@ -402,7 +395,7 @@ acceptance("Search - Authenticated", function (needs) {
|
||||||
await click("#search-button");
|
await click("#search-button");
|
||||||
await fillIn("#search-term", "plans");
|
await fillIn("#search-term", "plans");
|
||||||
await query("input#search-term").focus();
|
await query("input#search-term").focus();
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyArrowDown);
|
await triggerKeyEvent(".search-menu", "keydown", "ArrowDown");
|
||||||
await click(document.activeElement);
|
await click(document.activeElement);
|
||||||
|
|
||||||
assert.notStrictEqual(count(".search-menu .results .item"), 0);
|
assert.notStrictEqual(count(".search-menu .results .item"), 0);
|
||||||
|
@ -423,13 +416,13 @@ acceptance("Search - Authenticated", function (needs) {
|
||||||
|
|
||||||
assert.ok(exists(query(`${container} ul li`)), "has a list of items");
|
assert.ok(exists(query(`${container} ul li`)), "has a list of items");
|
||||||
|
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyEnter);
|
await triggerKeyEvent("#search-term", "keydown", "Enter");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists(query(`${container} .search-result-topic`)),
|
exists(query(`${container} .search-result-topic`)),
|
||||||
"has topic results"
|
"has topic results"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyArrowDown);
|
await triggerKeyEvent("#search-term", "keydown", "ArrowDown");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
document.activeElement.getAttribute("href"),
|
document.activeElement.getAttribute("href"),
|
||||||
|
@ -437,7 +430,7 @@ acceptance("Search - Authenticated", function (needs) {
|
||||||
"arrow down selects first element"
|
"arrow down selects first element"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyArrowDown);
|
await triggerKeyEvent("#search-term", "keydown", "ArrowDown");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
document.activeElement.getAttribute("href"),
|
document.activeElement.getAttribute("href"),
|
||||||
|
@ -445,10 +438,10 @@ acceptance("Search - Authenticated", function (needs) {
|
||||||
"arrow down selects next element"
|
"arrow down selects next element"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyArrowDown);
|
await triggerKeyEvent("#search-term", "keydown", "ArrowDown");
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyArrowDown);
|
await triggerKeyEvent("#search-term", "keydown", "ArrowDown");
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyArrowDown);
|
await triggerKeyEvent("#search-term", "keydown", "ArrowDown");
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyArrowDown);
|
await triggerKeyEvent("#search-term", "keydown", "ArrowDown");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
document.activeElement.getAttribute("href"),
|
document.activeElement.getAttribute("href"),
|
||||||
|
@ -456,12 +449,12 @@ acceptance("Search - Authenticated", function (needs) {
|
||||||
"arrow down sets focus to more results link"
|
"arrow down sets focus to more results link"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyEsc);
|
await triggerKeyEvent(".search-menu", "keydown", "Escape");
|
||||||
assert.ok(!exists(".search-menu:visible"), "Esc removes search dropdown");
|
assert.ok(!exists(".search-menu:visible"), "Esc removes search dropdown");
|
||||||
|
|
||||||
await click("#search-button");
|
await click("#search-button");
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyArrowDown);
|
await triggerKeyEvent(".search-menu", "keydown", "ArrowDown");
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyArrowUp);
|
await triggerKeyEvent(".search-menu", "keydown", "ArrowUp");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
document.activeElement.tagName.toLowerCase(),
|
document.activeElement.tagName.toLowerCase(),
|
||||||
|
@ -469,15 +462,15 @@ acceptance("Search - Authenticated", function (needs) {
|
||||||
"arrow up sets focus to search term input"
|
"arrow up sets focus to search term input"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyEsc);
|
await triggerKeyEvent(".search-menu", "keydown", "Escape");
|
||||||
await click("#create-topic");
|
await click("#create-topic");
|
||||||
await click("#search-button");
|
await click("#search-button");
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyArrowDown);
|
await triggerKeyEvent(".search-menu", "keydown", "ArrowDown");
|
||||||
|
|
||||||
const firstLink = query(`${container} li:nth-child(1) a`).getAttribute(
|
const firstLink = query(`${container} li:nth-child(1) a`).getAttribute(
|
||||||
"href"
|
"href"
|
||||||
);
|
);
|
||||||
await triggerKeyEvent(".search-menu", "keydown", keyA);
|
await triggerKeyEvent(".search-menu", "keydown", "A");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
query("#reply-control textarea").value,
|
query("#reply-control textarea").value,
|
||||||
|
@ -486,14 +479,14 @@ acceptance("Search - Authenticated", function (needs) {
|
||||||
);
|
);
|
||||||
|
|
||||||
await click("#search-button");
|
await click("#search-button");
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyEnter);
|
await triggerKeyEvent("#search-term", "keydown", "Enter");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists(query(`${container} .search-result-topic`)),
|
exists(query(`${container} .search-result-topic`)),
|
||||||
"has topic results"
|
"has topic results"
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyEnter);
|
await triggerKeyEvent("#search-term", "keydown", "Enter");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists(query(`.search-container`)),
|
exists(query(`.search-container`)),
|
||||||
|
@ -507,7 +500,7 @@ acceptance("Search - Authenticated", function (needs) {
|
||||||
// new search launched, Enter key should be reset
|
// new search launched, Enter key should be reset
|
||||||
await click("#search-button");
|
await click("#search-button");
|
||||||
assert.ok(exists(query(`${container} ul li`)), "has a list of items");
|
assert.ok(exists(query(`${container} ul li`)), "has a list of items");
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyEnter);
|
await triggerKeyEvent("#search-term", "keydown", "Enter");
|
||||||
assert.ok(exists(query(`.search-menu`)), "search dropdown is visible");
|
assert.ok(exists(query(`.search-menu`)), "search dropdown is visible");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -819,7 +812,7 @@ acceptance("Search - assistant", function (needs) {
|
||||||
|
|
||||||
await fillIn("#search-term", "");
|
await fillIn("#search-term", "");
|
||||||
await query("input#search-term").focus();
|
await query("input#search-term").focus();
|
||||||
await triggerKeyEvent("input#search-term", "keydown", keyBackSpace);
|
await triggerKeyEvent("input#search-term", "keydown", "Backspace");
|
||||||
|
|
||||||
assert.notOk(exists(".btn.search-context"), "it removes the button");
|
assert.notOk(exists(".btn.search-context"), "it removes the button");
|
||||||
|
|
||||||
|
@ -832,7 +825,7 @@ acceptance("Search - assistant", function (needs) {
|
||||||
|
|
||||||
await fillIn("#search-term", "emoji");
|
await fillIn("#search-term", "emoji");
|
||||||
await query("input#search-term").focus();
|
await query("input#search-term").focus();
|
||||||
await triggerKeyEvent("#search-term", "keydown", keyEnter);
|
await triggerKeyEvent("#search-term", "keydown", "Enter");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count(".search-menu .search-result-topic"),
|
count(".search-menu .search-result-topic"),
|
||||||
|
|
|
@ -2,11 +2,11 @@ import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { click, triggerKeyEvent, visit } from "@ember/test-helpers";
|
import { click, triggerKeyEvent, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
|
|
||||||
const ESC_KEYCODE = 27;
|
|
||||||
acceptance("Topic Entrance Modal", function () {
|
acceptance("Topic Entrance Modal", function () {
|
||||||
test("can be closed with the esc key", async function (assert) {
|
test("can be closed with the esc key", async function (assert) {
|
||||||
await visit("/");
|
await visit("/");
|
||||||
await click(".topic-list-item button.posts-map");
|
await click(".topic-list-item button.posts-map");
|
||||||
|
|
||||||
const topicEntrance = query("#topic-entrance");
|
const topicEntrance = query("#topic-entrance");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
!topicEntrance.classList.contains("hidden"),
|
!topicEntrance.classList.contains("hidden"),
|
||||||
|
@ -17,7 +17,8 @@ acceptance("Topic Entrance Modal", function () {
|
||||||
topicEntrance.querySelector(".jump-top"),
|
topicEntrance.querySelector(".jump-top"),
|
||||||
"the jump top button has focus when the modal is shown"
|
"the jump top button has focus when the modal is shown"
|
||||||
);
|
);
|
||||||
await triggerKeyEvent(topicEntrance, "keydown", ESC_KEYCODE);
|
|
||||||
|
await triggerKeyEvent(topicEntrance, "keydown", "Escape");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
topicEntrance.classList.contains("hidden"),
|
topicEntrance.classList.contains("hidden"),
|
||||||
"topic entrance modal disappears after pressing esc"
|
"topic entrance modal disappears after pressing esc"
|
||||||
|
|
|
@ -132,7 +132,7 @@ acceptance("Topic - Quote button - keyboard shortcut", function (needs) {
|
||||||
test("Can use keyboard shortcut to quote selected text", async function (assert) {
|
test("Can use keyboard shortcut to quote selected text", async function (assert) {
|
||||||
await visit("/t/internationalization-localization/280");
|
await visit("/t/internationalization-localization/280");
|
||||||
await selectText("#post_1 .cooked");
|
await selectText("#post_1 .cooked");
|
||||||
await triggerKeyEvent(document, "keypress", "q".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "Q");
|
||||||
assert.ok(exists(".d-editor-input"), "the editor is open");
|
assert.ok(exists(".d-editor-input"), "the editor is open");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
|
|
|
@ -427,8 +427,8 @@ acceptance("Topic featured links", function (needs) {
|
||||||
async function (assert) {
|
async function (assert) {
|
||||||
await visit("/t/internationalization-localization/280");
|
await visit("/t/internationalization-localization/280");
|
||||||
await selectText("#post_5 blockquote");
|
await selectText("#post_5 blockquote");
|
||||||
await triggerKeyEvent(document, "keypress", "j".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "J");
|
||||||
await triggerKeyEvent(document, "keypress", "t".charCodeAt(0));
|
await triggerKeyEvent(document, "keypress", "T");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
query(".d-editor-input").value.includes(
|
query(".d-editor-input").value.includes(
|
||||||
|
|
|
@ -59,7 +59,7 @@ acceptance("User Directory", function () {
|
||||||
const secondHeading =
|
const secondHeading =
|
||||||
".users-directory table th:nth-child(2) .header-contents";
|
".users-directory table th:nth-child(2) .header-contents";
|
||||||
|
|
||||||
await triggerKeyEvent(secondHeading, "keypress", 13);
|
await triggerKeyEvent(secondHeading, "keypress", "Enter");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
query(`${secondHeading} .d-icon-chevron-up`),
|
query(`${secondHeading} .d-icon-chevron-up`),
|
||||||
|
|
|
@ -220,10 +220,10 @@ module("Integration | Component | d-button", function (hooks) {
|
||||||
hbs`<DButton @action={{this.action}} @onKeyDown={{this.onKeyDown}} />`
|
hbs`<DButton @action={{this.action}} @onKeyDown={{this.onKeyDown}} />`
|
||||||
);
|
);
|
||||||
|
|
||||||
await triggerKeyEvent(".btn", "keydown", 32);
|
await triggerKeyEvent(".btn", "keydown", "Space");
|
||||||
assert.strictEqual(this.foo, "bar");
|
assert.strictEqual(this.foo, "bar");
|
||||||
|
|
||||||
await triggerKeyEvent(".btn", "keydown", 13);
|
await triggerKeyEvent(".btn", "keydown", "Enter");
|
||||||
assert.strictEqual(this.foo, "bar");
|
assert.strictEqual(this.foo, "bar");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -235,10 +235,10 @@ module("Integration | Component | d-button", function (hooks) {
|
||||||
|
|
||||||
await render(hbs`<DButton @action={{this.action}} />`);
|
await render(hbs`<DButton @action={{this.action}} />`);
|
||||||
|
|
||||||
await triggerKeyEvent(".btn", "keydown", 32);
|
await triggerKeyEvent(".btn", "keydown", "Space");
|
||||||
assert.strictEqual(this.foo, null);
|
assert.strictEqual(this.foo, null);
|
||||||
|
|
||||||
await triggerKeyEvent(".btn", "keydown", 13);
|
await triggerKeyEvent(".btn", "keydown", "Enter");
|
||||||
assert.strictEqual(this.foo, "bar");
|
assert.strictEqual(this.foo, "bar");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -96,7 +96,7 @@ module("Integration | Component | d-popover", function (hooks) {
|
||||||
await click(".btn");
|
await click(".btn");
|
||||||
assert.ok(exists(".d-popover.is-expanded"));
|
assert.ok(exists(".d-popover.is-expanded"));
|
||||||
|
|
||||||
await triggerKeyEvent(document, "keydown", 27);
|
await triggerKeyEvent(document, "keydown", "Escape");
|
||||||
assert.notOk(exists(".d-popover.is-expanded"));
|
assert.notOk(exists(".d-popover.is-expanded"));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,10 +14,10 @@ module("Integration | Component | flat-button", function (hooks) {
|
||||||
|
|
||||||
await render(hbs`<FlatButton @action={{this.action}} />`);
|
await render(hbs`<FlatButton @action={{this.action}} />`);
|
||||||
|
|
||||||
await triggerKeyEvent(".btn-flat", "keydown", 32);
|
await triggerKeyEvent(".btn-flat", "keydown", "Space");
|
||||||
assert.strictEqual(this.foo, null);
|
assert.strictEqual(this.foo, null);
|
||||||
|
|
||||||
await triggerKeyEvent(".btn-flat", "keydown", 13);
|
await triggerKeyEvent(".btn-flat", "keydown", "Enter");
|
||||||
assert.strictEqual(this.foo, "bar");
|
assert.strictEqual(this.foo, "bar");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ module("Integration | Component | simple-list", function (hooks) {
|
||||||
);
|
);
|
||||||
|
|
||||||
await fillIn(".add-value-input", "eviltrout");
|
await fillIn(".add-value-input", "eviltrout");
|
||||||
await triggerKeyEvent(".add-value-input", "keydown", 13); // enter
|
await triggerKeyEvent(".add-value-input", "keydown", "Enter");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count(".values .value"),
|
count(".values .value"),
|
||||||
|
|
Loading…
Reference in New Issue