File size: 1,156 Bytes
a03b3ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { test, expect } from "@gradio/tootils";

test("shows the results tab when results > 0", async ({ page }) => {
	await page.getByRole("button", { name: "Start Practice" }).click();
	await expect(
		page.getByText("Please enter word prompts into the table.")
	).toBeAttached();
	await page.getByLabel("Close").click();

	await page
		.getByRole("button", { name: "front back" })
		.getByRole("button")
		.nth(2)
		.dblclick();
	await page
		.getByRole("button", { name: "front back" })
		.locator("tbody")
		.getByRole("textbox")
		.fill("dog");
	await page
		.getByRole("button", { name: "front back" })
		.locator("tbody")
		.getByRole("textbox")
		.press("Enter");

	await page
		.getByRole("button", { name: "front back" })
		.getByRole("button")
		.nth(3)
		.dblclick();
	await page
		.getByRole("button", { name: "front back" })
		.locator("tbody")
		.getByRole("textbox")
		.fill("cat");
	await page
		.getByRole("button", { name: "front back" })
		.locator("tbody")
		.getByRole("textbox")
		.press("Enter");

	await page.getByText("New row").click();

	await page.waitForTimeout(1000);
	await page.getByText("Start Practice").dblclick();
});