Add getSchedule tests (#3233)

* Add getSchedule tests

* Add first integration test

* Update turbo.json

* Make sure unit tests run asap

* Worker threads

* Improve team event test

* Remove unrelated changes

* Improve tests readability

* Update CalendarManager.ts

* Add README

* Debug tests

* Temporarily disabled build errors

* Fix failing tests

* Remove unncessary logs

Co-authored-by: zomars <[email protected]>
This commit is contained in:
Hariom Balharaandzomars authored and GitHub committed 2022-07-21 10:44:23 -06:00
1 parent 2eedf74eb7
commit 471420c1d4
18 files changed
+870 -186

No files matched your search

@@ -158,8 +158,10 @@ test.describe("Embed Code Generator Tests", () => {
});
test.describe("Event Type Edit Page", () => {
//TODO: Instead of hardcoding, browse through actual events, as this ID might change in future
const sixtyMinProEventId = "6";
test.beforeEach(async ({ page }) => {
await page.goto("/event-types/3");
await page.goto(`/event-types/${sixtyMinProEventId}`);
});
test("open Embed Dialog for the Event Type", async ({ page }) => {
@@ -167,14 +169,14 @@ test.describe("Embed Code Generator Tests", () => {
await expectToBeNavigatingToEmbedTypesDialog(page, {
eventTypeId,
basePage: "/event-types/3",
basePage: `/event-types/${sixtyMinProEventId}`,
});
chooseEmbedType(page, "inline");
await expectToBeNavigatingToEmbedCodeAndPreviewDialog(page, {
eventTypeId,
basePage: "/event-types/3",
basePage: `/event-types/${sixtyMinProEventId}`,
embedType: "inline",
});
@@ -186,7 +188,7 @@ test.describe("Embed Code Generator Tests", () => {
await expectToContainValidPreviewIframe(page, {
embedType: "inline",
calLink: "pro/30min",
calLink: "pro/60min",
});
});
});
+6 -4
View File
@@ -91,12 +91,14 @@ test.describe("Event Types tests", () => {
});
test("can duplicate an existing event type", async ({ page }) => {
const firstTitle = await page.locator("[data-testid=event-type-title-3]").innerText();
const firstFullSlug = await page.locator("[data-testid=event-type-slug-3]").innerText();
// TODO: Locate the actual EventType available in list. This ID might change in future
const eventTypeId = "6";
const firstTitle = await page.locator(`[data-testid=event-type-title-${eventTypeId}]`).innerText();
const firstFullSlug = await page.locator(`[data-testid=event-type-slug-${eventTypeId}]`).innerText();
const firstSlug = firstFullSlug.split("/")[2];
await page.click("[data-testid=event-type-options-3]");
await page.click("[data-testid=event-type-duplicate-3]");
await page.click(`[data-testid=event-type-options-${eventTypeId}]`);
await page.click(`[data-testid=event-type-duplicate-${eventTypeId}]`);
const url = page.url();
const params = new URLSearchParams(url);