Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tests): update Merge contacts test #4339

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tests/sanity/tests/model/recruiting/talents-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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<TalentName> {
Expand All @@ -40,7 +42,7 @@ export class TalentsPage extends CommonRecruitingPage {
async openTalentByTalentName (talentName: TalentName): Promise<void> {
await this.page
.locator('tr', { hasText: `${talentName.lastName} ${talentName.firstName}` })
.locator('div[class$="firstCell"]')
.locator('a.noOverflow')
.click()
}

Expand All @@ -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<void> {
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()
}
}
1 change: 1 addition & 0 deletions tests/sanity/tests/recruiting/talents.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down