mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
* fix: release.yml * fix: S3ChannelConfigSchema type port mismatch * fix(csp): Conditionally sets UPGRADE_INSECURE_REQUESTS based on the PROJECT_URL scheme. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: fix bug in github action. * chore: adding e2e tesing for notification. * fix: updating trivy-action to the latest version, using new tagging pattern (vX.XX.XX instead of (X.XX.XX). * fix: removing browser targeting in e2e workflow as it is already specify in playwright.config.ts * fix: mapping secrets to environment variables in the end-to-end workflow. * fix: add a condition to allow end-to-end workflow execution only on main repo (fork are excluded). * fix: adding some data-testid to rely on more stable locator. * fix: adding some data-testid to rely on more stable locator. * fix: removing unusued browsers in end-to-end workflow. * fix: removing unused browsers in end-to-end workflow. * fix: removing unused browsers in end-to-end workflow. --------- Co-authored-by: charlesgauthereau <charles.gauthereau@soluce-technologies.com> Co-authored-by: killianlarcher <killian.larcher@soluce-technologies.com>
33 lines
945 B
TypeScript
33 lines
945 B
TypeScript
import {expect, test} from "@playwright/test";
|
|
import fs from "fs";
|
|
import {logout} from "./helpers/auth";
|
|
import {LOCAL_STORAGE_PATH} from "./helpers/session";
|
|
|
|
|
|
test.use({storageState: LOCAL_STORAGE_PATH});
|
|
|
|
test.describe( () => {
|
|
test.afterAll(async () => {
|
|
if (fs.existsSync(LOCAL_STORAGE_PATH)) {
|
|
fs.unlinkSync(LOCAL_STORAGE_PATH);
|
|
}
|
|
});
|
|
|
|
test("Remove shared storage state", async ({page}) => {
|
|
await test.step("Logout shared authenticated session", async () => {
|
|
if (!fs.existsSync(LOCAL_STORAGE_PATH)) {
|
|
return;
|
|
}
|
|
|
|
const content = fs.readFileSync(LOCAL_STORAGE_PATH, "utf-8").trim();
|
|
if (!content || content === "{}") {
|
|
return;
|
|
}
|
|
|
|
await page.goto('/dashboard/home');
|
|
await logout(page);
|
|
await expect(page).toHaveURL(/\/login(?:\?.*)?$/);
|
|
});
|
|
});
|
|
});
|