Update locator

Signed-off-by: Jasmin <jasmin@hardcoreeng.com
This commit is contained in:
Jasmin 2024-05-06 17:09:21 +02:00
parent 844e393460
commit 670ee0b497

View File

@ -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"] div.horizontal button[id="gmail:string:Email"]')
async clickAddApplication (): Promise<void> {
await this.addApplicationButton().click()
@ -170,9 +172,7 @@ export class TalentsPage extends CommonRecruitingPage {
}
async verifyEmailInPopup (email: string): Promise<void> {
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)
}