1
0
Fork 0

DEV: Update admin acceptance test custom-fields, logs, submissions

Dieser Commit ist enthalten in:
jumagura 2023-04-17 12:01:54 -04:00
Ursprung 54ad75bafd
Commit 15cc33b8cc
3 geänderte Dateien mit 6 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -4,7 +4,7 @@ import {
visible, visible,
} from "discourse/tests/helpers/qunit-helpers"; } from "discourse/tests/helpers/qunit-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { findAll, visit } from "@ember/test-helpers"; import { click, findAll, visit } from "@ember/test-helpers";
import { import {
getCustomFields, getCustomFields,
getUnsubscribedAdminWizards, getUnsubscribedAdminWizards,

Datei anzeigen

@ -1,6 +1,6 @@
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers"; import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { findAll, visit } from "@ember/test-helpers"; import { click, findAll, visit } from "@ember/test-helpers";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { import {
getUnsubscribedAdminWizards, getUnsubscribedAdminWizards,
@ -54,8 +54,7 @@ acceptance("Admin | Logs", function (needs) {
assert.ok(find("table")); assert.ok(find("table"));
assert.ok(findAll("table tbody tr").length === 2, "Displays logs list"); assert.ok(findAll("table tbody tr").length === 2, "Displays logs list");
const refreshButton = find(".refresh.btn"); await click(".refresh.btn");
await click(refreshButton);
assert.ok(find("table")); assert.ok(find("table"));
assert.ok( assert.ok(
findAll("table tbody tr").length === 2, findAll("table tbody tr").length === 2,
@ -63,8 +62,7 @@ acceptance("Admin | Logs", function (needs) {
); );
await wizards.expand(); await wizards.expand();
const li = find('[data-name="Select a wizard"]'); await click('[data-name="Select a wizard"]');
await click(li);
const wizardContainerDiv = find(".admin-wizard-container"); const wizardContainerDiv = find(".admin-wizard-container");
assert.ok(wizardContainerDiv.children().length === 0, "the div is empty"); assert.ok(wizardContainerDiv.children().length === 0, "the div is empty");
}); });

Datei anzeigen

@ -1,6 +1,6 @@
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers"; import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { findAll, visit } from "@ember/test-helpers"; import { click, findAll, visit } from "@ember/test-helpers";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { import {
getUnsubscribedAdminWizards, getUnsubscribedAdminWizards,
@ -58,8 +58,7 @@ acceptance("Admin | Submissions", function (needs) {
); );
await wizards.expand(); await wizards.expand();
const li = find('[data-name="Select a wizard"]'); await click('[data-name="Select a wizard"]');
await click(li);
const wizardContainerDiv = find(".admin-wizard-container"); const wizardContainerDiv = find(".admin-wizard-container");
assert.ok(wizardContainerDiv.children().length === 0, "the div is empty"); assert.ok(wizardContainerDiv.children().length === 0, "the div is empty");
}); });