diff --git a/tests/sanity/tests/model/recruiting/talents-page.ts b/tests/sanity/tests/model/recruiting/talents-page.ts index cecec4ab3c..3b81987ff6 100644 --- a/tests/sanity/tests/model/recruiting/talents-page.ts +++ b/tests/sanity/tests/model/recruiting/talents-page.ts @@ -59,6 +59,8 @@ export class TalentsPage extends CommonRecruitingPage { openOtherSkills = (): Locator => this.page.getByText('Other') skillsLink = (): Locator => this.page.locator('text=Skills') newSkillButton = (): Locator => this.page.locator('button:has-text("Skill")') + emailContact = (): Locator => + this.page.locator('div[class^="popupPanel-body__header"] button[id="gmail:string:Email"]') async clickAddApplication (): Promise { await this.addApplicationButton().click() @@ -170,9 +172,7 @@ export class TalentsPage extends CommonRecruitingPage { } async verifyEmailInPopup (email: string): Promise { - const emailLocator = this.popupPanel().locator('[id="gmail\\:string\\:Email"]') - await emailLocator.scrollIntoViewIfNeeded() - await emailLocator.click() + await this.emailContact().click() const actualEmail = await this.page.locator('.cover-channel >> input').inputValue() expect(actualEmail).toEqual(email) }