@@ -22,6 +22,7 @@ const expectedWidgetOrigin =
2222 ? 'https://bugdrop.neonwatty.workers.dev'
2323 : undefined ) ;
2424const expectedWidgetSha256 = process . env . EXPECTED_WIDGET_SHA256 ;
25+ const venuePath = process . env . LIVE_VENUE_PATH || '/' ;
2526
2627if ( bypassSecret ) {
2728 test . beforeEach ( async ( { context } ) => {
@@ -70,7 +71,7 @@ async function addCorsBlockedImage(page: Page) {
7071
7172async function openScreenshotOptions ( page : Page , title : string ) {
7273 await mockInstalledRepo ( page ) ;
73- await page . goto ( process . env . LIVE_TARGET === 'preview' ? '/' : '/test/' ) ;
74+ await page . goto ( venuePath ) ;
7475
7576 const host = page . locator ( '#bugdrop-host' ) ;
7677 const button = host . locator ( 'css=.bd-trigger' ) ;
@@ -263,7 +264,7 @@ test.describe('Widget Loading (Live)', () => {
263264 }
264265 } ) ;
265266
266- await page . goto ( process . env . LIVE_TARGET === 'preview' ? '/' : '/test/' ) ;
267+ await page . goto ( venuePath ) ;
267268 await page . waitForTimeout ( 2000 ) ;
268269
269270 // Widget host element should exist
@@ -286,7 +287,7 @@ test.describe('Widget Loading (Live)', () => {
286287 } ) ;
287288
288289 test ( 'venue loads the expected deployed widget asset' , async ( { page, request } ) => {
289- await page . goto ( process . env . LIVE_TARGET === 'preview' ? '/' : '/test/' ) ;
290+ await page . goto ( venuePath ) ;
290291
291292 const widgetSrc = await page . evaluate ( ( ) => {
292293 return (
@@ -312,7 +313,7 @@ test.describe('Widget Loading (Live)', () => {
312313
313314test . describe ( 'Feedback Button (Live)' , ( ) => {
314315 test ( 'feedback button is visible and clickable' , async ( { page } ) => {
315- await page . goto ( process . env . LIVE_TARGET === 'preview' ? '/' : '/test/' ) ;
316+ await page . goto ( venuePath ) ;
316317
317318 const button = page . locator ( '#bugdrop-host' ) . locator ( 'css=.bd-trigger' ) ;
318319 await expect ( button ) . toBeVisible ( { timeout : 10_000 } ) ;
@@ -489,7 +490,7 @@ test.describe('Screenshot Capture (Live)', () => {
489490 } ) ;
490491 } ) ;
491492
492- await page . goto ( process . env . LIVE_TARGET === 'preview' ? '/' : '/test/' ) ;
493+ await page . goto ( venuePath ) ;
493494
494495 const host = page . locator ( '#bugdrop-host' ) ;
495496 const button = host . locator ( 'css=.bd-trigger' ) ;
0 commit comments