Skip to content

Commit 450cb60

Browse files
authored
Add mergequeue tag to read-receipts tests and skip running them on PR commits (#28648)
Signed-off-by: Michael Telatynski <[email protected]>
1 parent 7e03f38 commit 450cb60

20 files changed

+30
-19
lines changed

.github/workflows/end-to-end-tests.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,12 @@ jobs:
130130
if: steps.playwright-cache.outputs.cache-hit != 'true'
131131
run: yarn playwright install --with-deps --no-shell chromium
132132

133+
# We skip tests tagged with @mergequeue when running on PRs, but run them in MQ and everywhere else
133134
- name: Run Playwright tests
134-
run: yarn playwright test --shard ${{ matrix.runner }}/${{ strategy.job-total }}
135+
run: |
136+
yarn playwright test \
137+
--shard "${{ matrix.runner }}/${{ strategy.job-total }}" \
138+
${{ github.event_name == 'pull_request' && '--grep-invert @mergequeue' || '' }}
135139
136140
- name: Upload blob report to GitHub Actions Artifacts
137141
if: always()

docs/playwright.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,10 @@ instead of the native `toHaveScreenshot`.
217217

218218
If you are running Linux and are unfortunate that the screenshots are not rendering identically,
219219
you may wish to specify `--ignore-snapshots` and rely on Docker to render them for you.
220+
221+
## Test Tags
222+
223+
We use test tags to categorise tests for running subsets more efficiently.
224+
225+
- `@mergequeue`: Tests that are slow or flaky and cover areas of the app we update seldom, should not be run on every PR commit but will be run in the Merge Queue.
226+
- `@screenshot`: Tests that use `toMatchScreenshot` to speed up a run of `test:playwright:screenshots`. A test with this tag must not also have the `@mergequeue` tag as this would cause false positives in the stale screenshot detection.

playwright/e2e/read-receipts/editing-messages-in-threads.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
1010

1111
import { test } from ".";
1212

13-
test.describe("Read receipts", () => {
13+
test.describe("Read receipts", { tag: "@mergequeue" }, () => {
1414
test.describe("editing messages", () => {
1515
test.describe("in threads", () => {
1616
test("An edit of a threaded message makes the room unread", async ({

playwright/e2e/read-receipts/editing-messages-main-timeline.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
1010

1111
import { test } from ".";
1212

13-
test.describe("Read receipts", () => {
13+
test.describe("Read receipts", { tag: "@mergequeue" }, () => {
1414
test.describe("editing messages", () => {
1515
test.describe("in the main timeline", () => {
1616
test("Editing a message leaves a room read", async ({ roomAlpha: room1, roomBeta: room2, util, msg }) => {

playwright/e2e/read-receipts/editing-messages-thread-roots.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
1010

1111
import { test } from ".";
1212

13-
test.describe("Read receipts", () => {
13+
test.describe("Read receipts", { tag: "@mergequeue" }, () => {
1414
test.describe("editing messages", () => {
1515
test.describe("thread roots", () => {
1616
test("An edit of a thread root leaves the room read", async ({

playwright/e2e/read-receipts/high-level.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
1010

1111
import { customEvent, many, test } from ".";
1212

13-
test.describe("Read receipts", () => {
13+
test.describe("Read receipts", { tag: "@mergequeue" }, () => {
1414
test.describe("Ignored events", () => {
1515
test("If all events after receipt are unimportant, the room is read", async ({
1616
roomAlpha: room1,

playwright/e2e/read-receipts/message-ordering.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
1010

1111
import { test } from ".";
1212

13-
test.describe("Read receipts", () => {
13+
test.describe("Read receipts", { tag: "@mergequeue" }, () => {
1414
test.describe("Message ordering", () => {
1515
test.describe("in the main timeline", () => {
1616
test.fixme(

playwright/e2e/read-receipts/missing-referents.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
1010

1111
import { test } from ".";
1212

13-
test.describe("Read receipts", () => {
13+
test.describe("Read receipts", { tag: "@mergequeue" }, () => {
1414
test.describe("messages with missing referents", () => {
1515
test.fixme(
1616
"A message in an unknown thread is not visible and the room is read",

playwright/e2e/read-receipts/new-messages-in-threads.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
1010

1111
import { many, test } from ".";
1212

13-
test.describe("Read receipts", () => {
13+
test.describe("Read receipts", { tag: "@mergequeue" }, () => {
1414
test.describe("new messages", () => {
1515
test.describe("in threads", () => {
1616
test("Receiving a message makes a room unread", async ({

playwright/e2e/read-receipts/new-messages-main-timeline.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
1010

1111
import { many, test } from ".";
1212

13-
test.describe("Read receipts", () => {
13+
test.describe("Read receipts", { tag: "@mergequeue" }, () => {
1414
test.describe("new messages", () => {
1515
test.describe("in the main timeline", () => {
1616
test("Receiving a message makes a room unread", async ({

0 commit comments

Comments
 (0)