File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ test.describe('start session', () => {
1818 await expect ( startSessionPage . selectField ) . toHaveValue ( 'PERSONAL_INFO' ) ;
1919
2020 // Fill the subject first name field
21- await startSessionPage . fillSessionForm ( 'firstNameTest' , 'lastNameTest' ) ;
21+ await startSessionPage . fillSessionForm ( 'firstNameTest' , 'lastNameTest' , 'Male' ) ;
2222
2323 // Verify the field was filled
2424 const firstNameField = startSessionPage . sessionForm . locator ( '[name="subjectFirstName"]' ) ;
@@ -29,5 +29,8 @@ test.describe('start session', () => {
2929
3030 const dobField = startSessionPage . sessionForm . locator ( '[name="subjectDateOfBirth"]' ) ;
3131 await expect ( dobField ) . toHaveValue ( '01-01-1990' ) ;
32+
33+ const sexField = startSessionPage . sessionForm . locator ( '[name="subjectSex"]' ) ;
34+ await expect ( sexField ) . toHaveValue ( 'MALE' ) ;
3235 } ) ;
3336} ) ;
Original file line number Diff line number Diff line change @@ -14,11 +14,12 @@ export class StartSessionPage extends AppPage {
1414 this . selectField = page . locator ( '[name="subjectIdentificationMethod"]' ) ;
1515 }
1616
17- async fillSessionForm ( firstName : string , lastName : string ) {
17+ async fillSessionForm ( firstName : string , lastName : string , sex : string ) {
1818 // Wait for the subjectFirstName field to appear after selecting PERSONAL_INFO
1919 const firstNameField = this . sessionForm . locator ( '[name="subjectFirstName"]' ) ;
2020 const lastNameField = this . sessionForm . locator ( '[name="subjectLastName"]' ) ;
2121 const dateOfBirthField = this . sessionForm . locator ( '[name="subjectDateOfBirth"]' ) ;
22+ const sexSelector = this . sessionForm . locator ( '[name="subjectSex"]' ) ;
2223 await firstNameField . waitFor ( { state : 'visible' } ) ;
2324 await firstNameField . fill ( firstName ) ;
2425
@@ -27,6 +28,8 @@ export class StartSessionPage extends AppPage {
2728
2829 await dateOfBirthField . waitFor ( { state : 'visible' } ) ;
2930 await dateOfBirthField . fill ( '01-01-1990' ) ;
31+
32+ await sexSelector . selectOption ( sex ) ;
3033 }
3134
3235 async selectIdentificationMethod ( methodName : string ) {
You can’t perform that action at this time.
0 commit comments