File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export default defineConfig({
3535 HOST : "127.0.0.1" ,
3636 BASE_URL : "http://localhost:3003" ,
3737 NEXT_PUBLIC_BASE_URL : "http://localhost:3003" ,
38+ OPENAI_API_KEY : process . env . OPENAI_API_KEY || "" ,
3839 } ,
3940 } ,
4041 {
@@ -49,6 +50,7 @@ export default defineConfig({
4950 PORT : "3004" ,
5051 HOST : "127.0.0.1" ,
5152 BASE_URL : "http://localhost:3004" ,
53+ OPENAI_API_KEY : process . env . OPENAI_API_KEY || "" ,
5254 } ,
5355 } ,
5456 {
@@ -63,6 +65,7 @@ export default defineConfig({
6365 PORT : "3005" ,
6466 HOST : "127.0.0.1" ,
6567 BASE_URL : "http://localhost:3005" ,
68+ OPENAI_API_KEY : process . env . OPENAI_API_KEY || "" ,
6669 } ,
6770 } ,
6871 ] ,
Original file line number Diff line number Diff line change 11import { test , expect } from "@playwright/test" ;
22
3+ const hasOpenAiKey =
4+ typeof process . env . OPENAI_API_KEY === "string" &&
5+ process . env . OPENAI_API_KEY . trim ( ) . length > 0 ;
6+
7+ if ( ! hasOpenAiKey ) {
8+ // eslint-disable-next-line no-console -- surfaced only when tests are skipped
9+ console . warn (
10+ "Skipping AI chat smoke tests: OPENAI_API_KEY is not available in the environment." ,
11+ ) ;
12+ }
13+
14+ test . skip (
15+ ! hasOpenAiKey ,
16+ "OPENAI_API_KEY is required to run AI chat smoke tests." ,
17+ ) ;
18+
319test . describe ( "AI Chat Plugin" , ( ) => {
420 test ( "should start a new conversation and send a message" , async ( {
521 page,
You can’t perform that action at this time.
0 commit comments