2023-03-08 13:20:04 +00:00
import type { PlaywrightTestConfig } from "@playwright/test" ;
2022-04-25 04:33:00 +00:00
import path from "path" ;
//TODO: Move the common config to embed-playwright-config and let core and react use the base. Along with config there would be base fixtures and expect custom matchers as well.
import baseConfig from "@calcom/embed-core/playwright/config/playwright.config" ;
const testDir = path . join ( "../tests" ) ;
const projects = baseConfig . projects ? . map ( ( project ) = > {
if ( ! project . name ) {
return { } ;
}
return {
. . . project ,
testDir ,
} ;
} ) ;
const config : PlaywrightTestConfig = {
. . . baseConfig ,
webServer : {
2023-03-08 13:20:04 +00:00
command : "yarn run-p embed-dev" ,
port : 3101 ,
2022-04-25 04:33:00 +00:00
timeout : 60_000 ,
2022-05-30 17:11:05 +00:00
reuseExistingServer : ! process . env . CI ,
2022-04-25 04:33:00 +00:00
} ,
use : {
. . . baseConfig . use ,
baseURL : "http://localhost:3101" ,
} ,
projects ,
} ;
export default config ;