Skip to content

Commit

Permalink
Merge pull request #164 from nesrineabdmouleh/AddMethodEditLanguage
Browse files Browse the repository at this point in the history
Add method to edit language in myProfile page
  • Loading branch information
nesrineabdmouleh authored Oct 2, 2024
2 parents ecb041e + 2bc493a commit 78d0839
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/interfaces/BO/advancedParameters/team/myProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface BOMyProfilePageInterface extends BOTeamBasePageInterface {
readonly errorInvalidLastNameMessage: string;
readonly successfulUpdateMessageFR: string;

editLanguage(page: Page, language: string): Promise<void>;
getAlertError(page: Page): Promise<string>;
getAlertSuccess(page: Page): Promise<string>;
isGravatarEnabled(page: Page): Promise<boolean>;
Expand Down
11 changes: 11 additions & 0 deletions src/versions/develop/pages/BO/advancedParameters/team/myProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ class BOMyProfilePage extends EmployeeBasePage implements BOMyProfilePageInterfa
await this.clickAndWaitForLoadState(page, this.saveButton);
}

/**
* Edit language
* @param page {Page} Browser tab
* @param language {string} Language to edit
* @returns {Promise<void>}
*/
async editLanguage(page: Page, language: string): Promise<void> {
await this.selectByVisibleText(page, this.languageSelect, language);
await this.clickAndWaitForLoadState(page, this.saveButton);
}

/**
* Get the value of an input
* @override
Expand Down

0 comments on commit 78d0839

Please sign in to comment.