mirror of
https://github.com/element-hq/element-desktop
synced 2025-04-17 10:23:59 +02:00
37 lines
941 B
TypeScript
37 lines
941 B
TypeScript
/*
|
|
Copyright 2025 New Vector Ltd.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
|
Please see LICENSE files in the repository root for full details.
|
|
*/
|
|
|
|
import { test, expect } from "../../element-desktop-test.js";
|
|
|
|
declare global {
|
|
interface ElectronPlatform {
|
|
getOidcCallbackUrl(): URL;
|
|
}
|
|
|
|
interface Window {
|
|
mxPlatformPeg: {
|
|
get(): ElectronPlatform;
|
|
};
|
|
}
|
|
}
|
|
|
|
test.describe("OIDC Native", () => {
|
|
test.slow();
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.locator(".mx_Welcome").waitFor();
|
|
});
|
|
|
|
test("should use OIDC callback URL without authority component", async ({ page }) => {
|
|
await expect(
|
|
page.evaluate<string>(() => {
|
|
return window.mxPlatformPeg.get().getOidcCallbackUrl().toString();
|
|
}),
|
|
).resolves.toBe("io.element.desktop:/vector/webapp/");
|
|
});
|
|
});
|