forked from calcom/cal.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite existing cypress tests to playwright (calcom#931)
- Loading branch information
Showing
24 changed files
with
346 additions
and
689 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = function (api) { | ||
api.cache(true); | ||
const plugins = []; | ||
if (process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test") { | ||
console.log("------ 💯 Adding test coverage support 💯 ------"); | ||
plugins.push("istanbul"); | ||
} | ||
|
||
return { | ||
presets: ["next/babel"], | ||
plugins, | ||
}; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { kont } from "kont"; | ||
|
||
import { pageProvider } from "./lib/pageProvider"; | ||
|
||
jest.setTimeout(60e3); | ||
|
||
describe("free user", () => { | ||
const ctx = kont() | ||
.useBeforeEach(pageProvider({ path: "/free" })) | ||
.done(); | ||
|
||
test("only one visible event", async () => { | ||
const { page } = ctx; | ||
await expect(page).toHaveSelector(`[href="/free/30min"]`); | ||
await expect(page).not.toHaveSelector(`[href="/free/60min"]`); | ||
}); | ||
|
||
// TODO: make sure `/free/30min` is bookable and that `/free/60min` is not | ||
}); | ||
|
||
describe("pro user", () => { | ||
const ctx = kont() | ||
.useBeforeEach(pageProvider({ path: "/pro" })) | ||
.done(); | ||
|
||
test("pro user's page has at least 2 visible events", async () => { | ||
const { page } = ctx; | ||
const $eventTypes = await page.$$("[data-testid=event-types] > *"); | ||
|
||
expect($eventTypes.length).toBeGreaterThanOrEqual(2); | ||
}); | ||
|
||
// TODO: make sure `/free/30min` is bookable and that `/free/60min` is not | ||
}); |
Oops, something went wrong.