fix(e2e): wait for shell-ready before reaction assertions after reload (#95)
* fix(e2e): wait for shell-ready before reaction assertions after reload Bootstrap can still be in flight after domcontentloaded on reload; match #94/#87 by waiting on data-ready and the composer before asserting persisted message reactions. Co-authored-by: cynarAI <cynarAI@users.noreply.github.com> * fix(e2e): shell-ready waits on transport reload and /app redirect Apply waitForChatComposer after messaging-transport reload and allow more time for /app to redirect before asserting the composer. Co-authored-by: cynarAI <cynarAI@users.noreply.github.com> * ci: retrigger Product CI after team-computer flake Co-authored-by: cynarAI <cynarAI@users.noreply.github.com> * ci: retrigger Web E2E after runner OOM (exit 137) Co-authored-by: cynarAI <cynarAI@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: cynarAI <cynarAI@users.noreply.github.com> (cherry picked from commit 6248b6c0c9b2dd07563dbac981bd43032d324989)
This commit is contained in:
parent
d1f7034aa5
commit
4995b66b93
@ -6,7 +6,7 @@ async function openComposer(page: Page) {
|
||||
await signup(page, `composer-paste-${stamp}@rakazo.test`, "password12", "Paste Test");
|
||||
await completeOnboarding(page);
|
||||
await page.goto("/app", { waitUntil: "domcontentloaded" });
|
||||
await page.waitForURL(/\/app\/[^/]+$/);
|
||||
await page.waitForURL(/\/app\/[^/]+$/, { timeout: 60_000 });
|
||||
await waitForChatComposer(page);
|
||||
return page.getByRole("combobox", { name: /Message/ });
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { expect, type Locator, type Page, type Route, test } from "@playwright/test";
|
||||
import { captureScreenshot, completeOnboarding, signup } from "./helpers";
|
||||
import { captureScreenshot, completeOnboarding, signup, waitForChatComposer } from "./helpers";
|
||||
|
||||
/** Submit from the Send control so an in-flight prior send cannot swallow Enter. */
|
||||
async function sendComposerMessage(page: Page, composer: Locator, text: string) {
|
||||
@ -254,6 +254,8 @@ test("message hover shows beside-bubble actions; reply links to parent", async (
|
||||
await expect(parentRow.getByTestId("message-reactions")).toContainText("❤️ 2");
|
||||
await captureScreenshot(page, testInfo, "message-multiple-reactions");
|
||||
await page.reload({ waitUntil: "domcontentloaded" });
|
||||
await waitForChatComposer(page);
|
||||
await expect(parentRow).toBeVisible({ timeout: 20_000 });
|
||||
await expect(parentRow.getByTestId("message-reactions")).toContainText("❤️ 2");
|
||||
await expect(parentRow.getByTestId("message-reactions")).toContainText("👍");
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { captureScreenshot, completeOnboarding, signup } from "./helpers";
|
||||
import { captureScreenshot, completeOnboarding, signup, waitForChatComposer } from "./helpers";
|
||||
|
||||
type ThreadPayload = {
|
||||
json?: {
|
||||
@ -68,7 +68,7 @@ test("labels a Sendblue group message with its actual transport", async ({ page
|
||||
await page.route("**/rpc/threads/get", fulfillWithInjection);
|
||||
|
||||
await page.reload({ waitUntil: "domcontentloaded" });
|
||||
await expect(page.getByRole("combobox", { name: /^Message/ })).toBeVisible({ timeout: 20_000 });
|
||||
await waitForChatComposer(page);
|
||||
const transportMessage = page.getByText("SMS · Alice: Dinner is at seven.");
|
||||
await expect(transportMessage).toBeVisible({ timeout: 20_000 });
|
||||
await captureScreenshot(page, testInfo, "sendblue-sms-transport");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user