gradio/js/spa/test/blocks_flashcards.spec.ts
Hannah b1b81c9e1c
Hide option to add row/col when count is fixed in dataframe (#9649)
* * hide add row or col if  count is fixed
* restore selected cell outline

* add changeset

* * fix selected cell border
* close cell menu on window resize

* tweak

* fix test

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-10-24 15:03:10 +01:00

44 lines
1.1 KiB
TypeScript

import { test, expect } from "@self/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(4)
.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("Start Practice").dblclick();
});