mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-29 11:30:11 -05:00
fix: sync call in e2e tests (#3010)
This commit is contained in:
@@ -47,13 +47,6 @@ test.describe("JS Package Test", async () => {
|
||||
})();
|
||||
|
||||
await page.waitForURL(/\/environments\/[^/]+\/surveys\/[^/]+\/summary/);
|
||||
|
||||
// await expect(page.getByRole("link", { name: "Surveys" })).toBeVisible();
|
||||
// await page.getByRole("link", { name: "Surveys" }).click();
|
||||
|
||||
// await page.waitForURL(/\/environments\/[^/]+\/surveys/);
|
||||
|
||||
// await expect(page.getByRole("heading", { name: "Surveys" })).toBeVisible();
|
||||
});
|
||||
|
||||
await test.step("JS display survey on page and submit response", async () => {
|
||||
@@ -64,20 +57,20 @@ test.describe("JS Package Test", async () => {
|
||||
await page.goto(htmlFile);
|
||||
|
||||
// Formbricks In App Sync has happened
|
||||
const syncApi = await page.waitForResponse((response) => response.url().includes("/app/sync"), {
|
||||
timeout: 20000,
|
||||
});
|
||||
const syncApi = await page.waitForResponse(
|
||||
(response) => {
|
||||
return response.url().includes("/app/sync");
|
||||
},
|
||||
{
|
||||
timeout: 120000,
|
||||
}
|
||||
);
|
||||
|
||||
expect(syncApi.status()).toBe(200);
|
||||
|
||||
// Formbricks Modal exists in the DOM
|
||||
await expect(page.locator("#formbricks-modal-container")).toHaveCount(1);
|
||||
|
||||
// const displayApi = await page.waitForResponse((response) => response.url().includes("/display"));
|
||||
// expect(displayApi.status()).toBe(200);
|
||||
|
||||
// Formbricks Modal exists in the DOM
|
||||
// await expect(page.locator("#formbricks-modal-container")).toHaveCount(1);
|
||||
|
||||
// Formbricks Modal is visible
|
||||
await expect(
|
||||
page.locator("#questionCard-0").getByRole("link", { name: "Powered by Formbricks" })
|
||||
|
||||
Reference in New Issue
Block a user