FIx failing tests

This commit is contained in:
Sérgio Saquetim
2025-06-24 16:21:40 -03:00
parent 25920252f3
commit 0365e44a33
8 changed files with 59 additions and 32 deletions
@@ -15,7 +15,11 @@ acceptance(
});
needs.pretender((server, helper) => {
server.post("/solution/accept", () => helper.response({ success: "OK" }));
server.post("/solution/accept", () =>
helper.response(
postStreamWithAcceptedAnswerExcerpt(null).accepted_answer
)
);
server.post("/solution/unaccept", () =>
helper.response({ success: "OK" })
);
@@ -30,8 +30,9 @@ import { postStreamWithAcceptedAnswerExcerpt } from "../helpers/discourse-solved
assert.dom(".quote blockquote").hasText("this is an excerpt");
await visit("/t/without-excerpt/12");
assert.dom(".quote blockquote").doesNotExist();
assert.dom(".quote .title.title-only").exists();
assert.dom(".quote blockquote").hasNoText();
assert.dom(".quote.title-only .title").exists();
});
test("Full page search displays solved status", async function (assert) {
@@ -109,8 +109,7 @@ export const postStreamWithAcceptedAnswerExcerpt = (excerpt) => {
edit_reason: null,
can_view_edit_history: true,
wiki: false,
can_accept_answer: false,
can_unaccept_answer: true,
can_accept_answer: true,
accepted_answer: true,
},
],