refactor: unify data preparations and research input snapshots
Deploy production / deploy (push) Successful in 53s
Deploy production / deploy (push) Successful in 53s
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { expect, type Page } from "@playwright/test";
|
||||
export async function choosePreparation(
|
||||
page: Page,
|
||||
name: string,
|
||||
label = "选择研究数据准备",
|
||||
) {
|
||||
await page.getByRole("button", { name: label, exact: true }).click();
|
||||
const picker = page.getByRole("dialog", {
|
||||
name: "选择数据准备集合",
|
||||
exact: true,
|
||||
});
|
||||
await picker.getByLabel("搜索数据准备集合").fill(name);
|
||||
await picker
|
||||
.getByRole("row")
|
||||
.filter({ hasText: name })
|
||||
.first()
|
||||
.locator("span.semi-checkbox")
|
||||
.click();
|
||||
await picker.getByRole("button", { name: "选择", exact: true }).click();
|
||||
await expect(picker).not.toBeVisible();
|
||||
}
|
||||
Reference in New Issue
Block a user