2022-04-25 04:33:00 +00:00
import { PlaywrightTestConfig , devices } from "@playwright/test" ;
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 : {
2022-05-30 17:11:05 +00:00
command : "yarn run-p 'embed-dev' 'embed-web-start'" ,
port : 3000 ,
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 ;