diff --git a/tests/sanity/tests/model/recruiting/talents-page.ts b/tests/sanity/tests/model/recruiting/talents-page.ts index fe913af8c3..12729344a9 100644 --- a/tests/sanity/tests/model/recruiting/talents-page.ts +++ b/tests/sanity/tests/model/recruiting/talents-page.ts @@ -9,6 +9,7 @@ export class TalentsPage extends CommonRecruitingPage { readonly buttonCreateTalent: Locator readonly textVacancyMatchingTalent: Locator readonly textVacancyMatchingScore: Locator + readonly inputSearchTalent: Locator constructor (page: Page) { super(page) @@ -21,6 +22,7 @@ export class TalentsPage extends CommonRecruitingPage { this.textVacancyMatchingScore = page.locator( 'form[id="recruit:string:VacancyMatching"] table > tbody > tr > td:nth-child(2)' ) + this.inputSearchTalent = page.locator('div[class*="header"] input') } async createNewTalent (): Promise { @@ -40,7 +42,7 @@ export class TalentsPage extends CommonRecruitingPage { async openTalentByTalentName (talentName: TalentName): Promise { await this.page .locator('tr', { hasText: `${talentName.lastName} ${talentName.firstName}` }) - .locator('div[class$="firstCell"]') + .locator('a.noOverflow') .click() } @@ -59,4 +61,11 @@ export class TalentsPage extends CommonRecruitingPage { await expect(this.textVacancyMatchingTalent).toContainText(talentName, { ignoreCase: true }) await expect(this.textVacancyMatchingScore).toContainText(score) } + + async searchTalentByTalentName (talentName: TalentName): Promise { + await this.inputSearchTalent.fill(`${talentName.lastName} ${talentName.firstName}`) + await this.inputSearchTalent.press('Enter') + + await expect(this.page.locator('tr', { hasText: `${talentName.lastName} ${talentName.firstName}` })).toBeVisible() + } } diff --git a/tests/sanity/tests/recruiting/talents.spec.ts b/tests/sanity/tests/recruiting/talents.spec.ts index 05df969e0c..9184c587f2 100644 --- a/tests/sanity/tests/recruiting/talents.spec.ts +++ b/tests/sanity/tests/recruiting/talents.spec.ts @@ -156,6 +156,7 @@ test.describe('candidate/talents tests', () => { }) await navigationMenuPage.buttonTalents.click() + await talentsPage.searchTalentByTalentName(talentNameFirst) await talentsPage.openTalentByTalentName(talentNameFirst) await talentDetailsPage.checkSocialLinks('Phone', '123123213213') await talentDetailsPage.checkSocialLinks('Email', 'test-merge-2@gmail.com')