11import { expect , test } from './helpers/fixtures' ;
22
33test . describe ( 'start session' , ( ) => {
4+ test . beforeAll ( async ( { page } ) => {
5+ // Set disclaimer as accepted for persistence across tests
6+ await page . addInitScript ( ( ) => {
7+ localStorage . setItem ( 'app' , JSON . stringify ( { state : { isDisclaimerAccepted : true } , version : 1 } ) ) ;
8+ } ) ;
9+ } ) ;
10+
411 test ( 'should display the start session form header' , async ( { getPageModel } ) => {
512 const startSessionPage = await getPageModel ( '/session/start-session' ) ;
613 await expect ( startSessionPage . pageHeader ) . toBeVisible ( ) ;
@@ -10,6 +17,7 @@ test.describe('start session', () => {
1017
1118 test ( 'should fill subject identification input' , async ( { getPageModel } ) => {
1219 const startSessionPage = await getPageModel ( '/session/start-session' ) ;
20+
1321 await startSessionPage . sessionForm . waitFor ( { state : 'visible' } ) ;
1422 const formType = startSessionPage . sessionForm . getByTestId ( 'subjectIdentificationMethod-select-trigger' ) ;
1523 await formType . click ( ) ;
@@ -19,8 +27,9 @@ test.describe('start session', () => {
1927 // await startSessionPage.selectIdentificationMethod('Personal Information')
2028 await expect ( formType ) . toHaveText ( 'Personal Information' ) ;
2129
22- const identifier = startSessionPage . sessionForm . locator ( '#subjectFirstName' ) ;
23- await expect ( identifier ) . toHaveText ( '' ) ;
30+ // const identifier = startSessionPage.sessionForm.locator('#subjectFirstName');
31+ // await identifier.fill('john')
32+ // await expect(identifier).toHaveText('john');
2433 // await startSessionPage.fillSessionForm('john')
2534
2635 // await startSessionPage.sessionForm.fill('John');
0 commit comments