11import { test , expect , seedAuthenticatedSession , seedProjectGroupSelection } from './fixtures' ;
22import { recordContract } from './contract' ;
3- import { projectGroups , PROJECT_GROUP_ID } from '../mocks/fixtures' ;
3+ import { projectGroups , PROJECT_GROUP_ID , TEST_API_BASE } from '../mocks/fixtures' ;
44
55// Generated from the @test outline in pages/dashboard.vue.
66//
@@ -21,8 +21,8 @@ test.describe('dashboard', () => {
2121 // (The populated WorkspaceResponse shape is also asserted at the unit level.)
2222 test ( 'makes no new-API calls that violate the OpenAPI spec' , async ( { page } ) => {
2323 await seedAuthenticatedSession ( page ) ;
24- await page . route ( '**/ workspaces/mine' , EMPTY ) ;
25- await page . route ( '** /project-group-roles/**' , EMPTY ) ;
24+ await page . route ( ` ${ TEST_API_BASE } workspaces/mine` , EMPTY ) ;
25+ await page . route ( ` ${ TEST_API_BASE } tdei-user /project-group-roles/**` , EMPTY ) ;
2626
2727 const contract = recordContract ( page ) ;
2828 await page . goto ( '/dashboard' ) ;
@@ -34,8 +34,8 @@ test.describe('dashboard', () => {
3434 // @test e2e: the page renders with a simulated API response with no project groups
3535 test ( 'shows the empty notice when the user has no project groups' , async ( { page } ) => {
3636 await seedAuthenticatedSession ( page ) ;
37- await page . route ( '**/ workspaces/mine' , EMPTY ) ;
38- await page . route ( '** /project-group-roles/**' , EMPTY ) ;
37+ await page . route ( ` ${ TEST_API_BASE } workspaces/mine` , EMPTY ) ;
38+ await page . route ( ` ${ TEST_API_BASE } tdei-user /project-group-roles/**` , EMPTY ) ;
3939
4040 await page . goto ( '/dashboard' ) ;
4141
@@ -46,8 +46,8 @@ test.describe('dashboard', () => {
4646 test ( 'shows the empty notice when the selected project group has no workspaces' , async ( { page } ) => {
4747 await seedAuthenticatedSession ( page ) ;
4848 await seedProjectGroupSelection ( page , { id : PROJECT_GROUP_ID , name : 'Puget Sound' } ) ;
49- await page . route ( '**/ workspaces/mine' , EMPTY ) ; // group exists, but no workspaces in it
50- await page . route ( '** /project-group-roles/**' , route => route . fulfill ( { json : projectGroups } ) ) ;
49+ await page . route ( ` ${ TEST_API_BASE } workspaces/mine` , EMPTY ) ; // group exists, but no workspaces in it
50+ await page . route ( ` ${ TEST_API_BASE } tdei-user /project-group-roles/**` , route => route . fulfill ( { json : projectGroups } ) ) ;
5151
5252 await page . goto ( '/dashboard' ) ;
5353
0 commit comments