Skip to content

Commit ec924de

Browse files
committed
Merge branch 'develop' of ssh://github.com/element-hq/element-web into t3chguy/monorepo-playwright-common
# Conflicts: # pnpm-lock.yaml
2 parents 917237f + b97a0be commit ec924de

71 files changed

Lines changed: 1289 additions & 882 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
/pnpm-lock.yaml @element-hq/element-web-team
55

66
/apps/web/src/SecurityManager.ts @element-hq/element-crypto-web-reviewers
7-
/apps/web/test/SecurityManager-test.ts @element-hq/element-crypto-web-reviewers
7+
/apps/web/test/unit-tests/SecurityManager-test.ts @element-hq/element-crypto-web-reviewers
88
/apps/web/src/async-components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers
9+
/apps/web/test/unit-tests/async-components/dialogs/security/ @element-hq/element-crypto-web-reviewers
910
/apps/web/src/components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers
10-
/apps/web/test/components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers
11+
/apps/web/test/unit-tests/components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers
1112
/apps/web/src/stores/SetupEncryptionStore.ts @element-hq/element-crypto-web-reviewers
12-
/apps/web/test/stores/SetupEncryptionStore-test.ts @element-hq/element-crypto-web-reviewers
13+
/apps/web/test/unit-tests/stores/SetupEncryptionStore-test.ts @element-hq/element-crypto-web-reviewers
1314
/apps/web/src/components/views/settings/tabs/user/EncryptionUserSettingsTab.tsx @element-hq/element-crypto-web-reviewers
1415
/apps/web/src/components/views/settings/encryption/ @element-hq/element-crypto-web-reviewers
1516
/apps/web/test/unit-tests/components/views/settings/encryption/ @element-hq/element-crypto-web-reviewers

.github/actions/download-verify-element-tarball/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ runs:
3131

3232
- name: Move webapp to out-file-path
3333
shell: bash
34-
run: mv ${{ runner.temp }}/download-verify-element-tarball/webapp ${{ inputs.out-file-path }}
34+
run: mv ${{ runner.temp }}/download-verify-element-tarball/webapp "$OUT_PATH"
35+
env:
36+
OUT_PATH: ${{ inputs.out-file-path }}
3537

3638
- name: Clean up temp directory
3739
shell: bash

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ on:
1818
push:
1919
# We do not build on push to develop as the merge_group check handles that
2020
branches: [staging, master]
21-
repository_dispatch:
22-
types: [element-web-notify]
2321

2422
# support triggering from other workflows
2523
workflow_call:
@@ -188,6 +186,7 @@ jobs:
188186
uses: element-hq/element-modules/.github/workflows/reusable-playwright-tests.yml@main # zizmor: ignore[unpinned-uses]
189187
with:
190188
webapp-artifact: webapp
189+
reporter: blob
191190

192191
prepare_ed:
193192
name: "Prepare Element Desktop"
@@ -246,6 +245,7 @@ jobs:
246245
needs:
247246
- playwright_ew
248247
- downstream-modules
248+
- prepare_ed
249249
- build_ed_windows
250250
- build_ed_linux
251251
- build_ed_macos

.github/workflows/shared-component-visual-tests-netlify.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# It uploads the received images and diffs to netlify, printing the URLs to the console
33
name: Upload Shared Component Visual Test Diffs
44
on:
5-
workflow_run:
5+
# Privilege escalation necessary to deploy to Netlify
6+
# 🚨 We must not execute any checked out code here.
7+
workflow_run: # zizmor: ignore[dangerous-triggers]
68
workflows: ["Shared Component Visual Tests"]
79
types:
810
- completed

.github/workflows/sonarqube.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: SonarQube
22
on:
3-
workflow_run:
3+
# Privilege escalation necessary to call upon SonarCloud
4+
# 🚨 We must not execute any checked out code here.
5+
workflow_run: # zizmor: ignore[dangerous-triggers]
46
workflows: ["Tests"]
57
types:
68
- completed

.github/workflows/static_analysis.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches: [develop, master]
66
merge_group:
77
types: [checks_requested]
8-
repository_dispatch:
9-
types: [element-web-notify]
108
concurrency:
119
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
1210
cancel-in-progress: true

.github/workflows/tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
types: [checks_requested]
66
push:
77
branches: [develop, master]
8-
repository_dispatch:
9-
types: [element-web-notify]
108
workflow_call:
119
inputs:
1210
disable_coverage:

apps/web/playwright/e2e/crypto/toasts.spec.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ test.describe("Key storage out of sync toast", () => {
4343
});
4444

4545
test("should prompt for recovery key if 'enter recovery key' pressed", { tag: "@screenshot" }, async ({ page }) => {
46-
// We need to wait for there to be two toasts as the wait below won't work in isolation:
47-
// playwright only evaluates the 'first()' call initially, not subsequent times it checks, so
48-
// it would always be checking the same toast, even if another one is now the first.
49-
await expect(page.getByRole("alert")).toHaveCount(2);
50-
await expect(page.getByRole("alert").first()).toMatchScreenshot(
46+
await expect(page.getByRole("alert").filter({ hasText: "Your key storage is out of sync." })).toMatchScreenshot(
5147
"key-storage-out-of-sync-toast.png",
5248
screenshotOptions,
5349
);

apps/web/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,11 @@ test.describe("Room list", () => {
328328

329329
const roomListView = getRoomList(page);
330330
const videoRoom = roomListView.getByRole("option", { name: "video room" });
331+
await expect(videoRoom).toHaveAttribute("aria-selected", "true"); // wait for room list update
331332

332333
// focus the user menu to avoid to have hover decoration
333334
await page.getByRole("button", { name: "User menu" }).focus();
334335

335-
await expect(videoRoom).toBeVisible();
336336
await expect(videoRoom).toMatchScreenshot("room-list-item-video.png");
337337
});
338338
});

apps/web/playwright/e2e/room-directory/room-directory.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ test.describe("Room Directory", () => {
4848
await app.closeDialog();
4949

5050
const resp = await bot.publicRooms({});
51-
expect(resp.total_room_count_estimate).toEqual(1);
52-
expect(resp.chunk).toHaveLength(1);
53-
expect(resp.chunk[0].room_id).toEqual(roomId);
51+
expect(resp.total_room_count_estimate).toBeGreaterThanOrEqual(1);
52+
expect(resp.chunk).toHaveLength(resp.total_room_count_estimate);
53+
expect(resp.chunk.find((r) => r.room_id === roomId)).toBeTruthy();
5454
},
5555
);
5656

0 commit comments

Comments
 (0)