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>
62 lines
3.1 KiB
TypeScript
62 lines
3.1 KiB
TypeScript
import {expect, test} from "@playwright/test";
|
|
import {
|
|
cancel, create, get, remove, submit, testFromEdit,
|
|
} from "../helpers/notification";
|
|
import {getEnv} from "../helpers/env";
|
|
import {LOCAL_STORAGE_PATH} from "../helpers/session";
|
|
|
|
test.use({storageState: LOCAL_STORAGE_PATH});
|
|
|
|
const validChannelName = "Slack E2E Required";
|
|
const invalidChannelName = "Slack E2E Invalid";
|
|
|
|
// test.describe.serial("Valid channel", () => {
|
|
// test("Create and test a valid Slack channel", async ({page}) => {
|
|
// await page.goto("/dashboard/notifications/channels");
|
|
// await expect(page.getByRole("heading", {name: "Notification channels"})).toBeVisible();
|
|
// await create(page, "Slack", validChannelName, async (page) => {
|
|
// await page.getByLabel(/Slack Webhook URL/).fill(getEnv("E2E_NOTIFICATION_SLACK_WEBHOOK"));
|
|
// });
|
|
// await submit(page);
|
|
// await expect(page.getByText("Notification channel has been successfully created.")).toBeVisible();
|
|
// await expect(get(page, validChannelName)).toBeVisible();
|
|
// await testFromEdit(page, validChannelName);
|
|
// await expect(page.getByText("Sent to Slack")).toBeVisible();
|
|
// await cancel(page);
|
|
// });
|
|
//
|
|
// test("Edit and test a valid Slack E2E channel", async ({page}) => {
|
|
// await page.goto("/dashboard/notifications/channels");
|
|
// await expect(page.getByRole("heading", {name: "Notification channels"})).toBeVisible();
|
|
// await expect(get(page, validChannelName)).toBeVisible();
|
|
// await testFromEdit(page, validChannelName);
|
|
// await expect(page.getByText("Sent to Slack")).toBeVisible();
|
|
// await cancel(page);
|
|
// });
|
|
// });
|
|
|
|
test.describe.serial("Invalid channel", () => {
|
|
test("Create and test invalid Slack channel", async ({page}) => {
|
|
await page.goto("/dashboard/notifications/channels");
|
|
await expect(page.getByRole("heading", {name: "Notification channels"})).toBeVisible();
|
|
await create(page, "Slack", invalidChannelName, async (page) => {
|
|
await page.getByLabel(/Slack Webhook URL/).fill("https://WRONG_SLACK_WEBHOOK");
|
|
});
|
|
await submit(page);
|
|
await expect(page.getByText("Notification channel has been successfully created.")).toBeVisible();
|
|
await expect(get(page, invalidChannelName)).toBeVisible();
|
|
await testFromEdit(page, invalidChannelName);
|
|
await expect(page.getByText("An error occurred while testing the notification channel, check your configuration")).toBeVisible();
|
|
await cancel(page);
|
|
});
|
|
|
|
test("Delete invalid Slack channel", async ({page}) => {
|
|
await page.goto("/dashboard/notifications/channels");
|
|
await expect(page.getByRole("heading", {name: "Notification channels"})).toBeVisible();
|
|
await expect(get(page, invalidChannelName)).toBeVisible();
|
|
await remove(page, invalidChannelName);
|
|
await expect(page.getByText("Notification channel has been successfully removed.")).toBeVisible();
|
|
await expect(page.getByText(invalidChannelName)).toHaveCount(0);
|
|
});
|
|
});
|