|
|
@@ -42,8 +42,7 @@ test("shows a pending question dock", async ({ page }) => {
|
|
|
const rejectRequests: string[] = []
|
|
|
page.on("request", (request) => {
|
|
|
if (request.method() !== "POST") return
|
|
|
- if (new URL(request.url()).pathname === "/question/question-request/reject")
|
|
|
- rejectRequests.push(request.url())
|
|
|
+ if (new URL(request.url()).pathname === "/question/question-request/reject") rejectRequests.push(request.url())
|
|
|
})
|
|
|
|
|
|
await question.locator('[data-component="icon-button"][data-icon="chevron-down"]').click()
|
|
|
@@ -65,9 +64,7 @@ test("shows a pending question dock", async ({ page }) => {
|
|
|
|
|
|
await question.getByRole("radio", { name: /Minimal/ }).click()
|
|
|
const reply = page.waitForRequest(
|
|
|
- (request) =>
|
|
|
- request.method() === "POST" &&
|
|
|
- new URL(request.url()).pathname === "/question/question-request/reply",
|
|
|
+ (request) => request.method() === "POST" && new URL(request.url()).pathname === "/question/question-request/reply",
|
|
|
)
|
|
|
await question.getByRole("button", { name: "Submit" }).click()
|
|
|
expect((await reply).postDataJSON()).toEqual({ answers: [["Minimal"]] })
|