From 8e309b1e4687a1b57edfec9696c8a2262fb39462 Mon Sep 17 00:00:00 2001 From: asekawa Date: Thu, 15 Feb 2024 14:39:43 +0530 Subject: [PATCH 1/2] Update Login Page test id's --- src/ui/constants/login-page-dom-constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/constants/login-page-dom-constants.ts b/src/ui/constants/login-page-dom-constants.ts index 04e3dc5..8fdf15d 100644 --- a/src/ui/constants/login-page-dom-constants.ts +++ b/src/ui/constants/login-page-dom-constants.ts @@ -33,8 +33,8 @@ export class LoginPageDomConstants { // TODO: Use data test id's here. // Tracker: https://github.com/wso2-enterprise/asgardeo-product/issues/999 - public static readonly USERNAME_INPUT_DATA_ATTR: string = "#usernameUserInput"; + public static readonly USERNAME_INPUT_DATA_ATTR: string = "usernameUserInput"; public static readonly PASSWORD_INPUT_DATA_ATTR: string = "login-page-password-input"; - public static readonly CONTINUE_BUTTON_DATA_ATTR: string = "Continue"; + public static readonly CONTINUE_BUTTON_DATA_ATTR: string = "identifier-auth-continue-button"; public static readonly SUBMIT_BUTTON_DATA_ATTR: string = "login-page-continue-login-button"; } From 354604ea9a6f969067721cb0031112be1f883d13 Mon Sep 17 00:00:00 2001 From: asekawa Date: Mon, 19 Feb 2024 15:30:46 +0530 Subject: [PATCH 2/2] Update test id --- src/ui/constants/login-page-dom-constants.ts | 2 +- src/ui/page-objects/login-page.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ui/constants/login-page-dom-constants.ts b/src/ui/constants/login-page-dom-constants.ts index 8fdf15d..93cfcaa 100644 --- a/src/ui/constants/login-page-dom-constants.ts +++ b/src/ui/constants/login-page-dom-constants.ts @@ -33,7 +33,7 @@ export class LoginPageDomConstants { // TODO: Use data test id's here. // Tracker: https://github.com/wso2-enterprise/asgardeo-product/issues/999 - public static readonly USERNAME_INPUT_DATA_ATTR: string = "usernameUserInput"; + public static readonly USERNAME_INPUT_DATA_ATTR: string = "login-page-username-input"; public static readonly PASSWORD_INPUT_DATA_ATTR: string = "login-page-password-input"; public static readonly CONTINUE_BUTTON_DATA_ATTR: string = "identifier-auth-continue-button"; public static readonly SUBMIT_BUTTON_DATA_ATTR: string = "login-page-continue-login-button"; diff --git a/src/ui/page-objects/login-page.ts b/src/ui/page-objects/login-page.ts index 140aef3..8b975dc 100644 --- a/src/ui/page-objects/login-page.ts +++ b/src/ui/page-objects/login-page.ts @@ -41,8 +41,9 @@ export class LoginPage { * Get the data attribute for login page user input field. * @return {Cypress.Chainable>} */ - public getLoginUsernameInputField(): Cypress.Chainable> { - return cy.get(LoginPageDomConstants.USERNAME_INPUT_DATA_ATTR); + public getLoginUsernameInputField(): Cypress.Chainable { + + return cy.dataTestId(LoginPageDomConstants.USERNAME_INPUT_DATA_ATTR); } /**