fix: e2e tests (#2780)

This commit is contained in:
Piyush Gupta
2024-06-19 12:04:16 +05:30
committed by GitHub
parent 9b35ebc114
commit d33efa0274
4 changed files with 8 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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();

View File

@@ -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");