Reference files in Playwright more reliably (#32935)

Without assuming the cwd
This commit is contained in:
Michael Telatynski
2026-03-26 11:30:54 +00:00
committed by GitHub
parent 5a074e637a
commit cd429874db
14 changed files with 93 additions and 57 deletions
@@ -9,11 +9,11 @@ Please see LICENSE files in the repository root for full details.
/* See readme.md for tips on writing these tests. */
import { type Locator, type Page } from "@playwright/test";
import { readFileSync } from "node:fs";
import { test, expect } from "../../element-web-test";
import { readSampleFileSync } from "../../sample-files";
const MEDIA_FILE = readFileSync("playwright/sample-files/riot.png");
const MEDIA_FILE = readSampleFileSync("riot.png", null);
async function waitForMessageSentStatus(msgTile: Locator): Promise<void> {
await expect(msgTile.getByRole("status")).toHaveAccessibleName("Your message was sent");