| 12345678910111213141516171819202122232425 |
- import { expect, test } from "@playwright/test"
- test("global inbox shows another project and opens it", async ({ page }) => {
- await page.goto("/e2e/paas/index.html?completed")
- await page.getByLabel("API Key", { exact: true }).fill("global-inbox")
- await page.getByRole("button", { name: "连接平台", exact: true }).click()
- await page
- .getByRole("button", { name: /已有研究/ })
- .first()
- .click()
- await page.getByRole("button", { name: "新建项目", exact: true }).click()
- await page.getByLabel("项目名称", { exact: true }).fill("第二个项目")
- await page.getByRole("button", { name: "创建项目", exact: true }).click()
- await expect(page.getByLabel("切换项目", { exact: true })).toContainText("第二个项目")
- const inbox = page.getByRole("button", { name: /^通知:/ })
- await expect(inbox).toBeVisible()
- await inbox.click()
- const panel = page.getByRole("dialog", { name: "任务通知" })
- await expect(panel.getByText("我的项目", { exact: true })).toBeVisible()
- await panel.getByRole("button", { name: /已有研究/ }).click()
- await expect(page.getByLabel("切换项目", { exact: true })).toContainText("我的项目")
- await expect(page.getByText("研究计划", { exact: true })).toBeVisible()
- })
|