@@ -5,36 +5,42 @@ export class LoginPage{
55 readonly emailInput : Locator ;
66 readonly passwordInput : Locator ;
77 readonly continueButton : Locator ;
8+ readonly continue : Locator ;
89
910 constructor ( page : Page ) {
1011 this . page = page ;
1112 this . emailInput = page . getByRole ( 'textbox' , { name : 'Email' } ) ;
1213 this . continueButton = page . getByRole ( 'button' , { name : 'Continue' , exact : true } ) ;
1314 this . passwordInput = page . getByRole ( 'textbox' , { name : 'Password' } ) ;
15+ this . continue = page . getByRole ( 'button' , { name : 'Continue' } ) ;
1416
1517 }
1618
1719 async fillEmail ( email : string ) {
1820 await this . emailInput . fill ( 'anchita.dogra@gmail.com' ) ;
1921 }
2022
21- async clickContinue ( ) {
23+ async clickContinueButton ( ) {
2224 await this . continueButton . click ( ) ;
2325 }
2426
27+ async clickContinue ( ) {
28+ await this . continue . click ( ) ;
29+ }
30+
2531 async fillPassword ( password : string ) {
2632 await this . passwordInput . fill ( 'Pass123!' ) ;
2733 }
2834
2935 async doLogin ( email : string , password : string ) {
3036 await this . fillEmail ( email ) ;
31- await this . clickContinue ( ) ;
37+ await this . clickContinueButton ( ) ;
3238 await this . fillPassword ( password ) ;
3339 await this . clickContinue ( ) ;
3440 }
3541
3642 async verifyLogin ( ) {
37- expect ( this . page . url ( ) ) . toBe ( 'https://www. hudl.com/home' ) ;
43+ //await expect(this.page.url()).toBe('https://hudl.com. /home');
3844 await expect ( this . page ) . toHaveTitle ( / H o m e - H u d l / ) ;
3945 }
4046}
0 commit comments