mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-26 21:34:27 +00:00
feat(tests): TESTS-106 (#4217)
Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
parent
a82ef5aa94
commit
20fda19cf2
@ -10,7 +10,7 @@ export class ApplicationsDetailsPage extends CommonRecruitingPage {
|
||||
constructor (page: Page) {
|
||||
super(page)
|
||||
this.page = page
|
||||
this.textApplicationId = page.locator('div.popupPanel-title div.title.not-active')
|
||||
this.textApplicationId = page.locator('div.popupPanel-title div.title:last-child')
|
||||
this.buttonState = page
|
||||
.locator('div[class*="collapsed-container"]')
|
||||
.nth(0)
|
||||
@ -43,4 +43,8 @@ export class ApplicationsDetailsPage extends CommonRecruitingPage {
|
||||
}
|
||||
await this.buttonSelectCollaborators.press('Escape')
|
||||
}
|
||||
|
||||
async waitApplicationDetailsOpened (applicationId: string): Promise<void> {
|
||||
await expect(this.textApplicationId).toHaveText(applicationId)
|
||||
}
|
||||
}
|
||||
|
@ -116,4 +116,11 @@ export class TalentDetailsPage extends CommonRecruitingPage {
|
||||
|
||||
await this.buttonPopupMergeContacts.click()
|
||||
}
|
||||
|
||||
async waitTalentDetailsOpened (applicationFirstName: string, applicationLastName?: string): Promise<void> {
|
||||
await this.page.waitForSelector(`div[class*="header"] div.name:first-child :has-text("${applicationFirstName}")`)
|
||||
if (applicationLastName != null) {
|
||||
await this.page.waitForSelector(`div[class*="header"] div.name:nth-child(2) :has-text("${applicationFirstName}")`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,4 +159,28 @@ test.describe('Application tests', () => {
|
||||
applicationsDetailsPage = new ApplicationsDetailsPage(page)
|
||||
await applicationsDetailsPage.changeState('Offer')
|
||||
})
|
||||
|
||||
test('Comment stored after reload the page', async ({ page }) => {
|
||||
const commentText = `Application comment should be stored after reload-${generateId()}`
|
||||
|
||||
const vacancyName = 'Software Engineer'
|
||||
const navigationMenuPage = new NavigationMenuPage(page)
|
||||
await navigationMenuPage.buttonApplications.click()
|
||||
|
||||
const applicationsPage = new ApplicationsPage(page)
|
||||
const talentName = await applicationsPage.createNewApplicationWithNewTalent({
|
||||
vacancy: vacancyName,
|
||||
recruiterName: 'first'
|
||||
})
|
||||
await applicationsPage.openApplicationByTalentName(talentName)
|
||||
|
||||
const applicationsDetailsPage = new ApplicationsDetailsPage(page)
|
||||
const applicationId = await applicationsDetailsPage.getApplicationId()
|
||||
await applicationsDetailsPage.addComment(commentText)
|
||||
await applicationsDetailsPage.checkCommentExist(commentText)
|
||||
|
||||
await page.reload()
|
||||
await applicationsDetailsPage.waitApplicationDetailsOpened(applicationId)
|
||||
await applicationsDetailsPage.checkCommentExist(commentText)
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user