Skip to content

Commit 34a7676

Browse files
committed
Iterate
1 parent c70e86a commit 34a7676

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/build_desktop_test.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,16 @@ jobs:
5454
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
5555
with:
5656
name: ${{ inputs.artifact }}
57-
path: apps/desktop/dist
57+
path: dist
5858

5959
- name: Prepare for tests
60-
working-directory: apps/desktop
6160
# This is set by the caller of the reusable workflow, they have the ability to run the command they specify
6261
# directly without our help so this is fine.
6362
run: ${{ inputs.prepare_cmd }} # zizmor: ignore[template-injection]
6463
if: inputs.prepare_cmd
6564

6665
- name: Expand executable path
6766
id: executable
68-
working-directory: apps/desktop
6967
shell: bash
7068
env:
7169
EXECUTABLE: ${{ inputs.executable }}
@@ -77,7 +75,6 @@ jobs:
7775
# it to be enabled to test Electron apps, so turn it back on.
7876
- name: Set EnableNodeCliInspectArguments fuse enabled
7977
run: $RUN_AS npx @electron/fuses write --app "$EXECUTABLE" EnableNodeCliInspectArguments=on
80-
working-directory: apps/desktop
8178
shell: bash
8279
env:
8380
# We need sudo on Linux as it is installed in /opt/
@@ -88,8 +85,9 @@ jobs:
8885
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
8986
timeout-minutes: 20
9087
with:
91-
run: pnpm playwright test --config apps/desktop/playwright.config.ts --project=${{ inputs.project }} ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }} ${{ inputs.args }}
88+
run: pnpm playwright test --config apps/desktop/playwright.config.ts ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }} ${{ inputs.args }}
9289
env:
90+
PW_TAG: ${{ inputs.project }}
9391
ELEMENT_DESKTOP_EXECUTABLE: ${{ steps.executable.outputs.path }}
9492

9593
- name: Upload blob report

apps/desktop/playwright.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ const projects = [
1919
"linux-arm64-sqlcipher-static",
2020
];
2121

22+
const tag = ["@desktop"];
23+
if (process.env.PW_TAG) {
24+
tag.push(process.env.PW_TAG);
25+
}
26+
2227
export default defineConfig({
23-
tag: "@desktop",
28+
tag,
2429
// Allows the GitHub action to specify a project name (OS + arch) for the combined report to make sense
2530
// workaround for https://github.com/microsoft/playwright/issues/33521
2631
projects: process.env.CI

apps/web/playwright/e2e/voip/element-call.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ import { test, expect } from "../../element-web-test";
1515
import type { Credentials } from "../../plugins/homeserver";
1616
import { Bot } from "../../pages/bot";
1717
import { isDendrite } from "../../plugins/homeserver/dendrite";
18+
import { dirname, join } from "node:path";
19+
20+
const __dirname = dirname(fileURLToPath(import.meta.url));
1821

1922
// Load a copy of our fake Element Call app, and the latest widget API.
2023
// The fake call app does *just* enough to convince Element Web that a call is ongoing
2124
// and functions like PiP work. It does not actually do anything though, to limit the
2225
// surface we test.
2326
const widgetApi = readFile(fileURLToPath(import.meta.resolve("matrix-widget-api/dist/api.min.js")), "utf-8");
24-
const fakeCallClient = readFile("playwright/sample-files/fake-element-call.html", "utf-8");
27+
const fakeCallClient = readFile(join(__dirname, "..", "..", "sample-files", "fake-element-call.html"), "utf-8");
2528

2629
function assertCommonCallParameters(
2730
url: URLSearchParams,

0 commit comments

Comments
 (0)