mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
fix: e2e tests (#2780)
This commit is contained in:
@@ -46,7 +46,7 @@ export const QuestionsAudienceTabs = ({
|
||||
}, [isStylingTabVisible]);
|
||||
|
||||
return (
|
||||
<div className="fixed z-20 flex h-14 w-full items-center justify-center border bg-white md:w-1/2">
|
||||
<div className="fixed z-30 flex h-14 w-full items-center justify-center border bg-white md:w-1/2">
|
||||
<nav className="flex h-full items-center space-x-4" aria-label="Tabs">
|
||||
{tabsComputed.map((tab) => (
|
||||
<button
|
||||
|
||||
@@ -30,6 +30,7 @@ test.describe("JS Package Test", async () => {
|
||||
await page.locator("#howToSendCardOption-website").click();
|
||||
await page.locator("#howToSendCardOption-website").click();
|
||||
|
||||
await page.locator("#whenToSendCardTrigger").click();
|
||||
await page.getByRole("button", { name: "Add action" }).click();
|
||||
await page.getByText("New SessionGets fired when a").click();
|
||||
await page.getByRole("button", { name: "Publish" }).click();
|
||||
@@ -41,8 +42,9 @@ test.describe("JS Package Test", async () => {
|
||||
})();
|
||||
|
||||
await page.waitForURL(/\/environments\/[^/]+\/surveys\/[^/]+\/summary/);
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
expect(page.getByRole("link", { name: "Surveys" })).toBeVisible();
|
||||
await expect(page.getByRole("link", { name: "Surveys" })).toBeVisible();
|
||||
await page.getByRole("link", { name: "Surveys" }).click();
|
||||
await expect(page.getByRole("heading", { name: "Surveys" })).toBeVisible();
|
||||
});
|
||||
@@ -121,7 +123,7 @@ test.describe("JS Package Test", async () => {
|
||||
test("Admin validates Displays & Response", async ({ page }) => {
|
||||
await login(page, email, password);
|
||||
|
||||
await page.getByRole("link", { name: "Website Open options Product" }).click();
|
||||
await page.getByRole("link", { name: "product Market Fit (Superhuman)" }).click();
|
||||
(await page.waitForSelector("text=Responses")).isVisible();
|
||||
|
||||
// Survey should have 2 Displays
|
||||
|
||||
@@ -418,8 +418,8 @@ test.describe("Multi Language Survey Create", async () => {
|
||||
.getByPlaceholder("Your description here. Recall")
|
||||
.fill(surveys.germanCreate.thankYouCard.description);
|
||||
|
||||
// await page.getByPlaceholder("Create your own Survey").click();
|
||||
// await page.getByPlaceholder("Create your own Survey").fill(surveys.germanCreate.thankYouCard.buttonLabel);
|
||||
await page.getByPlaceholder("Create your own Survey").click();
|
||||
await page.getByPlaceholder("Create your own Survey").fill(surveys.germanCreate.thankYouCard.buttonLabel);
|
||||
|
||||
// TODO: @pandeymangg - figure out if this is required
|
||||
await page.getByRole("button", { name: "Settings", exact: true }).click();
|
||||
|
||||
@@ -54,7 +54,7 @@ export const login = async (page: Page, email: string, password: string): Promis
|
||||
await page.getByRole("button", { name: "Login with Email" }).click();
|
||||
};
|
||||
|
||||
export const finishOnboarding = async (page: Page, deleteExampleSurvey: boolean = true): Promise<void> => {
|
||||
export const finishOnboarding = async (page: Page, deleteExampleSurvey: boolean = false): Promise<void> => {
|
||||
await page.waitForURL("/onboarding");
|
||||
await expect(page).toHaveURL("/onboarding");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user