Skip to content

Commit 2327629

Browse files
committed
Iterate
1 parent c69cf43 commit 2327629

9 files changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/build-and-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ concurrency:
4141
env:
4242
# fetchdep.sh needs to know our PR number
4343
PR_NUMBER: ${{ github.event.pull_request.number }}
44-
# Use 6 runners in the default case, but 4 when running on a schedule where we run all 5 projects (20 runners total)
45-
NUM_RUNNERS: ${{ github.event_name == 'schedule' && 4 || 6 }}
44+
# Use 4 runners in the default case, but only 1 when running on a schedule where we run all 5 projects
45+
NUM_RUNNERS: ${{ github.event_name == 'schedule' && 1 || 4 }}
4646
NX_DEFAULT_OUTPUT_STYLE: stream-without-prefixes
4747

4848
permissions: {} # No permissions required

.github/workflows/build_desktop_linux.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,9 @@ jobs:
9595
map: |
9696
{
9797
"amd64": {
98-
"target": "x86_64-unknown-linux-gnu",
9998
"arch": "x86-64"
10099
},
101100
"arm64": {
102-
"target": "aarch64-unknown-linux-gnu",
103101
"arch": "aarch64",
104102
"build-args": "--arm64"
105103
}

.github/workflows/build_desktop_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
8989
timeout-minutes: 20
9090
with:
91-
run: pnpm -C apps/desktop playwright test ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }} ${{ inputs.args }}
91+
run: pnpm -C apps/desktop test ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }} ${{ inputs.args }}
9292
env:
9393
PW_TAG: ${{ inputs.project }}
9494
ELEMENT_DESKTOP_EXECUTABLE: ${{ steps.executable.outputs.path }}

apps/web/playwright/e2e/messages/messages.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { type Locator, type Page } from "@playwright/test";
1313
import { test, expect } from "../../element-web-test";
1414
import { readSampleFileSync } from "../../sample-files";
1515

16-
const MEDIA_FILE = readSampleFileSync("riot.png");
16+
const MEDIA_FILE = readSampleFileSync("riot.png", null);
1717

1818
async function waitForMessageSentStatus(msgTile: Locator): Promise<void> {
1919
await expect(msgTile.getByRole("status")).toHaveAccessibleName("Your message was sent");

apps/web/playwright/e2e/modules/custom-component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const screenshotOptions = (page: Page) => ({
2626
`,
2727
});
2828

29-
const IMAGE_FILE = readSampleFileSync("element.png");
29+
const IMAGE_FILE = readSampleFileSync("element.png", null);
3030

3131
test.describe("Custom Component API", () => {
3232
test.use({

apps/web/playwright/e2e/timeline/media-preview-settings.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { type EventType, type MsgType, type RoomJoinRulesEventContent } from "ma
1010
import { test, expect } from "../../element-web-test";
1111
import { readSampleFileSync } from "../../sample-files";
1212

13-
const MEDIA_FILE = readSampleFileSync("riot.png");
13+
const MEDIA_FILE = readSampleFileSync("riot.png", null);
1414

1515
test.describe("Media preview settings", () => {
1616
test.use({

apps/web/playwright/e2e/timeline/timeline.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ const AVATAR_SIZE = 30;
2222
const AVATAR_RESIZE_METHOD = "crop";
2323

2424
const ROOM_NAME = "Test room";
25-
const OLD_AVATAR = readSampleFileSync("riot.png");
26-
const NEW_AVATAR = readSampleFileSync("element.png");
25+
const OLD_AVATAR = readSampleFileSync("riot.png", null);
26+
const NEW_AVATAR = readSampleFileSync("element.png", null);
2727
const OLD_NAME = "Alan";
2828
const NEW_NAME = "Alan (away)";
2929

30-
const VIDEO_FILE = readSampleFileSync("5secvid.webm");
30+
const VIDEO_FILE = readSampleFileSync("5secvid.webm", null);
3131

3232
const getEventTilesWithBodies = (page: Page): Locator => {
3333
return page.locator(".mx_EventTile").filter({ has: page.locator(".mx_EventTile_body") });

apps/web/playwright/e2e/widgets/stickers.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const STICKER_PICKER_WIDGET_NAME = "Fake Stickers";
1818
const STICKER_NAME = "Test Sticker";
1919
const ROOM_NAME_1 = "Sticker Test";
2020
const ROOM_NAME_2 = "Sticker Test Two";
21-
const STICKER_IMAGE = readSampleFileSync("riot.png");
21+
const STICKER_IMAGE = readSampleFileSync("riot.png", null);
2222

2323
function getStickerMessage(contentUri: string, mimetype: string): string {
2424
return JSON.stringify({

apps/web/playwright/sample-files/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,17 @@ export function getSampleFilePath(file: string): string {
1616
return join(__dirname, file);
1717
}
1818

19-
export function readSampleFile(file: string, encoding: BufferEncoding = "utf-8"): Promise<string> {
19+
export function readSampleFile(file: string, encoding: null): Promise<NonSharedBuffer>;
20+
export function readSampleFile(file: string, encoding?: BufferEncoding): Promise<string>;
21+
export function readSampleFile(
22+
file: string,
23+
encoding: BufferEncoding | null = "utf-8",
24+
): Promise<NonSharedBuffer | string> {
2025
return readFile(getSampleFilePath(file), encoding);
2126
}
2227

23-
export function readSampleFileSync(file: string): NonSharedBuffer {
28+
export function readSampleFileSync(file: string, encoding: null): NonSharedBuffer;
29+
export function readSampleFileSync(file: string, encoding?: BufferEncoding): string;
30+
export function readSampleFileSync(file: string, encoding: BufferEncoding | null = "utf-8"): NonSharedBuffer | string {
2431
return readFileSync(getSampleFilePath(file));
2532
}

0 commit comments

Comments
 (0)