fix: inconsistent timezones in e2e tests (#11841)

* fix: inconsistent timezones in e2e tests

* Update users.ts

* Update playwright.config.ts

* Update playwright.config.ts

* Update users.ts

* fix: timezone sensitive tests
This commit is contained in:
Omar López authored and GitHub committed 2023-10-17 08:23:54 +05:30
1 parent fe364bd2da
commit d46e80c2ac
4 files changed
+30 -19

No files matched your search

+19 -14
View File
@@ -55,6 +55,14 @@ if (IS_EMBED_REACT_TEST) {
});
}
const DEFAULT_CHROMIUM = {
...devices["Desktop Chrome"],
timezoneId: "Europe/London",
locale: "en-US",
/** If navigation takes more than this, then something's wrong, let's fail fast. */
navigationTimeout: DEFAULT_NAVIGATION_TIMEOUT,
};
const config: PlaywrightTestConfig = {
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
@@ -86,12 +94,7 @@ const config: PlaywrightTestConfig = {
expect: {
timeout: DEFAULT_EXPECT_TIMEOUT,
},
use: {
...devices["Desktop Chrome"],
locale: "en-US",
/** If navigation takes more than this, then something's wrong, let's fail fast. */
navigationTimeout: DEFAULT_NAVIGATION_TIMEOUT,
},
use: DEFAULT_CHROMIUM,
},
{
name: "@calcom/app-store",
@@ -100,12 +103,7 @@ const config: PlaywrightTestConfig = {
expect: {
timeout: DEFAULT_EXPECT_TIMEOUT,
},
use: {
...devices["Desktop Chrome"],
locale: "en-US",
/** If navigation takes more than this, then something's wrong, let's fail fast. */
navigationTimeout: DEFAULT_NAVIGATION_TIMEOUT,
},
use: DEFAULT_CHROMIUM,
},
{
name: "@calcom/embed-core",
@@ -114,7 +112,11 @@ const config: PlaywrightTestConfig = {
expect: {
timeout: DEFAULT_EXPECT_TIMEOUT,
},
use: { ...devices["Desktop Chrome"], locale: "en-US", baseURL: "http://localhost:3100/" },
use: {
...devices["Desktop Chrome"],
locale: "en-US",
baseURL: "http://localhost:3100/",
},
},
{
name: "@calcom/embed-react",
@@ -123,7 +125,10 @@ const config: PlaywrightTestConfig = {
timeout: DEFAULT_EXPECT_TIMEOUT,
},
testMatch: /.*\.e2e\.tsx?/,
use: { ...devices["Desktop Chrome"], locale: "en-US", baseURL: "http://localhost:3101/" },
use: {
...DEFAULT_CHROMIUM,
baseURL: "http://localhost:3101/",
},
},
{
name: "@calcom/embed-core--firefox",