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>
60 lines
2.5 KiB
TypeScript
60 lines
2.5 KiB
TypeScript
import {expect, test} from "@playwright/test";
|
|
import {create, edit, get, remove} from "./helpers/project";
|
|
import {LOCAL_STORAGE_PATH} from "./helpers/session";
|
|
|
|
test.use({storageState: LOCAL_STORAGE_PATH});
|
|
|
|
const project = {
|
|
emptyStateName: "Project A",
|
|
buttonName: "Project B",
|
|
updatedButtonName: "Project B Updated",
|
|
};
|
|
|
|
test.describe.serial(() => {
|
|
test("Create a project from empty state", async ({page}) => {
|
|
await page.goto("/dashboard/projects");
|
|
await expect(page.getByRole("heading", {name: "Projects"})).toBeVisible();
|
|
await expect(page.getByText("Create new Project", {exact: true})).toBeVisible();
|
|
|
|
await create(page, "emptyState", project.emptyStateName);
|
|
|
|
await expect(page.getByText("Project has been successfully created.")).toBeVisible();
|
|
await expect(get(page, project.emptyStateName)).toBeVisible();
|
|
await expect(page.getByText("Create new Project", {exact: true})).toHaveCount(0);
|
|
});
|
|
|
|
test("Create a project from classic button", async ({page}) => {
|
|
await page.goto("/dashboard/projects");
|
|
await expect(page.getByRole("heading", {name: "Projects"})).toBeVisible();
|
|
await expect(get(page, project.emptyStateName)).toBeVisible();
|
|
|
|
await create(page, "button", project.buttonName);
|
|
|
|
await expect(page.getByText("Project has been successfully created.")).toBeVisible();
|
|
await expect(get(page, project.buttonName)).toBeVisible();
|
|
});
|
|
|
|
test("Edit the second created project", async ({page}) => {
|
|
await page.goto("/dashboard/projects");
|
|
await expect(page.getByRole("heading", {name: "Projects"})).toBeVisible();
|
|
await expect(get(page, project.buttonName)).toBeVisible();
|
|
|
|
await edit(page, project.buttonName, project.updatedButtonName);
|
|
|
|
await expect(page.getByText("Project has been successfully updated.")).toBeVisible();
|
|
await expect(page.getByText(project.updatedButtonName, {exact: true})).toBeVisible();
|
|
});
|
|
|
|
test("Delete the second created project", async ({page}) => {
|
|
await page.goto("/dashboard/projects");
|
|
await expect(page.getByRole("heading", {name: "Projects"})).toBeVisible();
|
|
await expect(get(page, project.updatedButtonName)).toBeVisible();
|
|
|
|
await remove(page, project.updatedButtonName);
|
|
|
|
await expect(page).toHaveURL("/dashboard/projects");
|
|
await expect(page.getByText("Projects has been successfully archived.")).toBeVisible();
|
|
await expect(page.getByText(project.updatedButtonName)).toHaveCount(0);
|
|
});
|
|
});
|