Skip to content

Commit

Permalink
fix(e2e): improve test description and add some comments (#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
shootermv authored Dec 22, 2024
1 parent f2e44a3 commit 2b2f61b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions e2e/can-finish-quiz.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test.beforeEach(async ({ page }) => {
await page.getByRole("button", { name: "10", exact: true }).click();
});

test("should show the results after the user has answered answer all questions", async ({
test("should show the results after the user has answered all questions", async ({
page
}) => {
// loop through all the questions.
Expand All @@ -18,6 +18,7 @@ test("should show the results after the user has answered answer all questions",
// Select the first option (no matter if it right or worng)
await page.getByRole("button").first().click();

// Submit answer
await page.getByRole("button", { name: "Submit", exact: true }).click();

const dialog = page.getByRole("dialog");
Expand All @@ -29,7 +30,7 @@ test("should show the results after the user has answered answer all questions",
await dialog.getByRole("button", { name: "Next Question" }).click();
}

// After the 10th question, the results page shows up
// After the last question, the 'results' should show up
await page.waitForURL("/#/quizzes/HTML/results");

await expect(page.getByRole("heading", { name: "Results" })).toBeVisible();
Expand Down

0 comments on commit 2b2f61b

Please sign in to comment.