mirror of
https://github.com/vector-im/element-web.git
synced 2026-03-05 13:32:05 +01:00
mkdir apps/web/scripts
mv scripts/{cleanup.sh,ci_package.sh,copy-res.ts,deploy.py,package.sh} apps/web/scripts
And a couple of gitignore tweaks
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
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-web-test";
|
|
import { MobileAppVariant } from "../../../src/vector/mobile_guide/mobile-apps";
|
|
|
|
const variants = [MobileAppVariant.Classic, MobileAppVariant.X, MobileAppVariant.Pro];
|
|
|
|
test.describe("Mobile Guide Screenshots", { tag: "@screenshot" }, () => {
|
|
for (const variant of variants) {
|
|
test.describe(`for variant ${variant}`, () => {
|
|
test.use({
|
|
config: {
|
|
default_server_config: {
|
|
"m.homeserver": {
|
|
base_url: "https://matrix.server.invalid",
|
|
server_name: "server.invalid",
|
|
},
|
|
},
|
|
mobile_guide_app_variant: variant,
|
|
},
|
|
viewport: { width: 390, height: 844 }, // iPhone 16e
|
|
});
|
|
|
|
test("should match the mobile_guide screenshot", async ({ page, axe }) => {
|
|
await page.goto("/mobile_guide/");
|
|
await expect(page).toMatchScreenshot(`mobile-guide-${variant}.png`);
|
|
await expect(axe).toHaveNoViolations();
|
|
});
|
|
});
|
|
}
|
|
});
|