0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

DEV: Remove unused code from admin log acceptance test

Dieser Commit ist enthalten in:
jumagura 2022-12-13 09:22:02 -04:00
Ursprung 71b6a184ca
Commit 09e56499ca

Datei anzeigen

@ -15,31 +15,8 @@ acceptance("Admin | Logs", function (needs) {
{ id: "this_is_testing_wizard", name: "This is testing wizard" }, { id: "this_is_testing_wizard", name: "This is testing wizard" },
]); ]);
}); });
server.get("admin/wizards/logs/this_is_testing_wizard", () => { server.get("admin/wizards/logs/this_is_testing_wizard", () => {
return helper.response({
wizard: {
id: "this_is_testing_wizard",
name: "This is testing wizard",
},
logs: [
{
date: "2022-12-12T09:41:57.888-04:00",
action: "create_topic",
username: "someuser",
message:
"error: invalid topic params - title: ; post: creating a text for this text area that is being displayed here.",
user: {
id: 1,
username: "someuser",
name: null,
avatar_template: "",
},
},
],
total: 1,
});
});
server.get("admin/wizards/logs/this_is_testing_wizard?page=0", () => {
return helper.response({ return helper.response({
wizard: { wizard: {
id: "this_is_testing_wizard", id: "this_is_testing_wizard",
@ -333,14 +310,16 @@ acceptance("Admin | Logs", function (needs) {
"it displays logs for a selected wizard" "it displays logs for a selected wizard"
); );
assert.ok(find("table")); assert.ok(find("table"));
assert.ok(findAll("table tbody tr").length === 1, "Displays logs list"); assert.ok(findAll("table tbody tr").length === 2, "Displays logs list");
// TODO: FIX updating list by refreshing button
const refreshButton = find(".refresh.btn"); const refreshButton = find(".refresh.btn");
await click(refreshButton); await click(refreshButton);
assert.ok(find("table"));
assert.ok( assert.ok(
findAll("table tbody tr").length === 2, findAll("table tbody tr").length === 2,
"Displays refreshed logs list" "Refresh button works correctly"
); );
await wizards.expand(); await wizards.expand();
const li = find('[data-name="Select a wizard"]'); const li = find('[data-name="Select a wizard"]');
await click(li); await click(li);