Skip to content

Commit 2499d33

Browse files
wesbillmanPinky
andauthored
Clean up screenshot e2e tests (#1284)
Signed-off-by: Wes <[email protected]> Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
1 parent e366372 commit 2499d33

20 files changed

Lines changed: 38 additions & 1219 deletions

‎desktop/playwright.config.ts‎

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,29 @@ export default defineConfig({
2727
"**/messaging.spec.ts",
2828
"**/custom-emoji.spec.ts",
2929
"**/profile-custom-emoji-status.spec.ts",
30-
"**/custom-emoji-screenshots.spec.ts",
31-
"**/channel-mute-screenshots.spec.ts",
32-
"**/channel-star-screenshots.spec.ts",
33-
"**/channel-controls-screenshots.spec.ts",
34-
"**/team-management-screenshots.spec.ts",
35-
"**/active-turn-screenshots.spec.ts",
36-
"**/active-turn-resilience-screenshots.spec.ts",
37-
"**/profile-active-turn-screenshots.spec.ts",
30+
"**/custom-emoji-ui.spec.ts",
31+
"**/channel-mute.spec.ts",
32+
"**/channel-star.spec.ts",
33+
"**/channel-controls.spec.ts",
34+
"**/active-turn-resilience.spec.ts",
35+
"**/profile-active-turn.spec.ts",
3836
"**/file-attachment.spec.ts",
3937
"**/video-attachment.spec.ts",
4038
"**/spoiler.spec.ts",
4139
"**/mentions.spec.ts",
4240
"**/relay-reconnect.spec.ts",
43-
"**/relay-reconnect-screenshots.spec.ts",
41+
"**/relay-reconnect-affordance.spec.ts",
4442
"**/workflows.spec.ts",
4543
"**/identity-archive.spec.ts",
4644
"**/identity-archive-hide.spec.ts",
47-
"**/relay-connectivity-screenshots.spec.ts",
48-
"**/unread-pill-screenshots.spec.ts",
45+
"**/relay-connectivity.spec.ts",
46+
"**/unread-pill.spec.ts",
4947
"**/sidebar-more-unread-overlap.spec.ts",
50-
"**/home-collapsed-top-chrome-screenshots.spec.ts",
51-
"**/thread-unread-screenshots.spec.ts",
52-
"**/animated-avatar-screenshots.spec.ts",
53-
"**/reminders-screenshots.spec.ts",
54-
"**/virtualization-screenshots.spec.ts",
48+
"**/home-collapsed-top-chrome.spec.ts",
49+
"**/thread-unread.spec.ts",
50+
"**/animated-avatar.spec.ts",
51+
"**/reminders.spec.ts",
52+
"**/virtualization.spec.ts",
5553
"**/scroll-history.spec.ts",
5654
],
5755
use: {

desktop/tests/e2e/active-turn-resilience-screenshots.spec.ts renamed to desktop/tests/e2e/active-turn-resilience.spec.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { expect, test } from "@playwright/test";
22

33
import { installMockBridge } from "../helpers/bridge";
44

5-
const SHOTS = "test-results/active-turn-resilience";
6-
75
// Mock agent pubkeys (distinct from the relay agents seeded by default).
86
const AGENT_PAUL = "aa".repeat(32);
97
const AGENT_DUNCAN = "bb".repeat(32);
@@ -61,7 +59,7 @@ async function seedTurns(
6159
}, turns);
6260
}
6361

64-
test.describe("active turn badge resilience screenshots", () => {
62+
test.describe("active turn badge resilience", () => {
6563
test.use({ viewport: { width: 1280, height: 720 } });
6664

6765
test("badges persist through an all-at-once liveness gap", async ({
@@ -114,11 +112,6 @@ test.describe("active turn badge resilience screenshots", () => {
114112
await expect(paulRow).toContainText("Working", { timeout: 5_000 });
115113
await expect(duncanRow).toContainText("Working", { timeout: 5_000 });
116114

117-
const agentsSection = page.getByTestId("unified-agents-groups");
118-
await agentsSection.screenshot({
119-
path: `${SHOTS}/01-badges-before-gap.png`,
120-
});
121-
122115
// Simulate the all-at-once relay drop: no further frames, advance the clock
123116
// past both thresholds. This fires several real prune ticks; shouldPausePrune
124117
// sees every turn's lastActivityAt stuck at T0 (gap > 20s) and pauses the
@@ -128,9 +121,5 @@ test.describe("active turn badge resilience screenshots", () => {
128121

129122
await expect(paulRow).toContainText("Working");
130123
await expect(duncanRow).toContainText("Working");
131-
132-
await agentsSection.screenshot({
133-
path: `${SHOTS}/02-badges-survive-gap.png`,
134-
});
135124
});
136125
});

‎desktop/tests/e2e/active-turn-screenshots.spec.ts‎

Lines changed: 0 additions & 199 deletions
This file was deleted.

desktop/tests/e2e/animated-avatar-screenshots.spec.ts renamed to desktop/tests/e2e/animated-avatar.spec.ts

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { expect, test } from "@playwright/test";
33
import { installMockBridge } from "../helpers/bridge";
44
import { openSettings } from "../helpers/settings";
55

6-
const SHOTS = "test-results/animated-avatar";
7-
86
/**
97
* Stub getUserMedia with a canvas-generated stream (animated gradient with a
108
* moving circle) so the camera phases work headless and deterministically —
@@ -118,8 +116,7 @@ function installFakeCamera(
118116
}
119117

120118
// The review editor (preview + framing + poster strip + backdrop panel) is
121-
// taller than the default 720px viewport — raise it so element screenshots
122-
// capture the whole editor.
119+
// taller than the default 720px viewport — raise it so the whole editor remains visible.
123120
test.use({ viewport: { height: 1280, width: 1280 } });
124121

125122
const UPLOADED_PNG_DESCRIPTOR = {
@@ -147,7 +144,7 @@ async function openAnimatedTab(
147144
await page.waitForTimeout(400);
148145
}
149146

150-
test.describe("animated avatar screenshots", () => {
147+
test.describe("animated avatar", () => {
151148
test("01 — animated tab idle state", async ({ page }) => {
152149
await openAnimatedTab(page);
153150
await expect(
@@ -169,9 +166,6 @@ test.describe("animated avatar screenshots", () => {
169166
page.getByTestId("profile-avatar-animated-camera-select"),
170167
).toHaveCount(0);
171168
await expect(page.getByTestId("profile-avatar-done")).toHaveCount(0);
172-
await page
173-
.getByTestId("settings-profile")
174-
.screenshot({ path: `${SHOTS}/01-animated-tab-idle.png` });
175169
});
176170

177171
test("02 — live camera preview", async ({ page }) => {
@@ -247,9 +241,6 @@ test.describe("animated avatar screenshots", () => {
247241
);
248242
await expect(page.getByTestId("profile-avatar-done")).toHaveCount(0);
249243
await page.waitForTimeout(500);
250-
await page
251-
.getByTestId("settings-profile")
252-
.screenshot({ path: `${SHOTS}/02-live-camera.png` });
253244

254245
await page.getByTestId("profile-avatar-animated-record").click();
255246
await expect(
@@ -276,10 +267,6 @@ test.describe("animated avatar screenshots", () => {
276267
page.getByTestId("profile-avatar-animated-timer-ring"),
277268
).toBeVisible();
278269
await page.waitForTimeout(1500);
279-
await page.getByTestId("settings-profile").screenshot({
280-
animations: "allow",
281-
path: `${SHOTS}/03-recording-ring.png`,
282-
});
283270

284271
// Review: the section icon row appears once processing finishes.
285272
await expect(
@@ -340,10 +327,6 @@ test.describe("animated avatar screenshots", () => {
340327
},
341328
});
342329
await expect(scrubber).not.toHaveAttribute("aria-valuenow", "0");
343-
await page.getByTestId("settings-profile").screenshot({
344-
animations: "allow",
345-
path: `${SHOTS}/06-poster-picker.png`,
346-
});
347330

348331
// The Circle tool stays implemented, but it is hidden in the review row for now.
349332
await expect(
@@ -379,13 +362,9 @@ test.describe("animated avatar screenshots", () => {
379362
"aria-valuenow",
380363
initialSizeValue ?? "",
381364
);
382-
// Restore defaults so the screenshot shows the standard framing.
365+
// Restore defaults so the standard framing remains covered.
383366
await page.getByTestId("profile-avatar-animated-reset-framing").click();
384367
await page.waitForTimeout(400);
385-
await page.getByTestId("settings-profile").screenshot({
386-
animations: "allow",
387-
path: `${SHOTS}/04-review-popout-backdrop.png`,
388-
});
389368

390369
// Custom backdrop color panel (shared HSV picker).
391370
await page.getByTestId("profile-avatar-animated-section-color").click();
@@ -413,10 +392,6 @@ test.describe("animated avatar screenshots", () => {
413392
await page.waitForTimeout(400);
414393
const customColorPreview = await previewSnapshot();
415394
expect(customColorPreview).not.toEqual(beforeCustomColor);
416-
await page.getByTestId("settings-profile").screenshot({
417-
animations: "allow",
418-
path: `${SHOTS}/05-custom-backdrop-color.png`,
419-
});
420395
await page.getByTestId("profile-avatar-animated-custom-color-done").click();
421396
await expect(
422397
page.getByTestId("profile-avatar-animated-backdrop-custom"),

0 commit comments

Comments
 (0)