mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
feat(tests): update Merge contacts test (#4339)
Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
parent
9164790d8f
commit
19a456eeb1
@ -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<TalentName> {
|
||||
@ -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()
|
||||
}
|
||||
|
||||
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user