refactor(e2e): organize fixtures by feature

This commit is contained in:
2026-07-16 11:49:58 +08:00
parent 764bb5a862
commit e730799aa5
28 changed files with 521 additions and 1335 deletions
@@ -24,9 +24,7 @@ test.beforeEach(async ({ baseURL, context, page }) => {
});
});
test("guest hits the chat quantity limit and can continue to login and subscription", async ({
page,
}) => {
test("guest uses the shared chat limit top-up flow", async ({ page }) => {
await enterChatFromSplash(page);
await dismissChatInterruptions(page);
@@ -81,9 +79,10 @@ test("guest hits the chat quantity limit and can continue to login and subscript
expect(limitTriggeredAt).toBe(mockedLimitTriggerAt);
await expect(quantityLimitBanner).toBeVisible();
await expect(messageInput).toHaveCount(0);
const topUpButton = page.getByRole("button", {
await expect(
quantityLimitBanner.getByText("Free chats refresh every day."),
).toBeVisible();
const topUpButton = quantityLimitBanner.getByRole("button", {
name: "Top up credits to continue",
});
await expect(topUpButton).toBeVisible();