mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-26 21:34:27 +00:00
feat(tests): updated tests (#4209)
Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
parent
d704f474cf
commit
ec8a3074d4
@ -37,10 +37,11 @@ test.describe('actions tests', () => {
|
||||
await page.press('body', 'Meta+k')
|
||||
|
||||
await expect(page.locator('input.actionsInput')).toBeVisible()
|
||||
await expect(page.locator('div.actionsitem div', { hasText: 'Merge contacts' })).toBeVisible()
|
||||
|
||||
await page.click('div.actionsHeader input.actionsInput')
|
||||
await page.fill('div.actionsHeader input.actionsInput', 'go to ')
|
||||
await page.waitForTimeout(500)
|
||||
|
||||
expect(await page.locator('div.selectPopup div.list-item :text("Go To Vacancies")').count()).toBe(1)
|
||||
await page.click('div.selectPopup div.list-item :text("Go To Vacancies")', { delay: 100 })
|
||||
|
||||
@ -57,10 +58,10 @@ test.describe('actions tests', () => {
|
||||
await page.press('body', 'Meta+k')
|
||||
|
||||
await expect(page.locator('input.actionsInput')).toBeVisible()
|
||||
await expect(page.locator('div.actionsitem div', { hasText: 'Merge contacts' })).toBeVisible()
|
||||
|
||||
await page.click('div.actionsHeader input.actionsInput')
|
||||
await page.fill('div.actionsHeader input.actionsInput', 'go to ')
|
||||
await page.waitForTimeout(500)
|
||||
expect(await page.locator('div.selectPopup :text("Go To Applications")').count()).toBe(1)
|
||||
await page.click('div.selectPopup :text("Go To Applications")', { delay: 100 })
|
||||
|
||||
|
@ -18,7 +18,7 @@ test.describe('Collaborative tests for Application', () => {
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws/recruit`))?.finished()
|
||||
})
|
||||
|
||||
test.skip('Add comment from several users', async ({ page, browser }) => {
|
||||
test('Add comment from several users', async ({ page, browser }) => {
|
||||
const vacancyName = 'Software Engineer'
|
||||
let talentName: TalentName
|
||||
// open second page
|
||||
@ -33,7 +33,6 @@ test.describe('Collaborative tests for Application', () => {
|
||||
vacancy: vacancyName,
|
||||
recruiterName: 'first'
|
||||
})
|
||||
await applicationsPage.selectType(vacancyName)
|
||||
await applicationsPage.openApplicationByTalentName(talentName)
|
||||
|
||||
const applicationsDetailsPage = new ApplicationsDetailsPage(page)
|
||||
@ -60,7 +59,6 @@ test.describe('Collaborative tests for Application', () => {
|
||||
await navigationMenuPageSecond.buttonApplications.click()
|
||||
|
||||
const applicationsPageSecond = new ApplicationsPage(userSecondPage)
|
||||
await applicationsPageSecond.selectType(vacancyName)
|
||||
await applicationsPageSecond.openApplicationByTalentName(talentName)
|
||||
|
||||
const applicationsDetailsPageSecond = new ApplicationsDetailsPage(userSecondPage)
|
||||
@ -85,7 +83,6 @@ test.describe('Collaborative tests for Application', () => {
|
||||
await navigationMenuPage.buttonApplications.click()
|
||||
|
||||
const applicationsPage = new ApplicationsPage(page)
|
||||
await applicationsPage.selectType(vacancyName)
|
||||
await applicationsPage.openApplicationByTalentName(talentName)
|
||||
|
||||
const applicationsDetailsPage = new ApplicationsDetailsPage(page)
|
||||
|
@ -98,8 +98,7 @@ test.describe('contact tests', () => {
|
||||
button: 'right'
|
||||
})
|
||||
await page.click('text="Delete"')
|
||||
// Click text=Yes
|
||||
await page.click('text=Yes')
|
||||
await page.click('form[id="view:string:DeleteObject"] button[type="submit"]')
|
||||
|
||||
await expect(page.locator(`td:has-text("${last} ${first}")`)).toHaveCount(0)
|
||||
})
|
||||
|
@ -13,6 +13,7 @@ export class ApplicationsPage extends CommonRecruitingPage {
|
||||
readonly buttonCreateNewApplication: Locator
|
||||
readonly buttonTabCreated: Locator
|
||||
readonly textTableFirstCell: Locator
|
||||
readonly buttonTypeSelector: Locator
|
||||
|
||||
constructor (page: Page) {
|
||||
super(page)
|
||||
@ -25,6 +26,7 @@ export class ApplicationsPage extends CommonRecruitingPage {
|
||||
this.buttonCreateNewApplication = page.locator('form[id="recruit:string:CreateApplication"] button[type="submit"]')
|
||||
this.buttonTabCreated = page.locator('div[data-id="tab-created"]')
|
||||
this.textTableFirstCell = page.locator('div[class$="firstCell"]')
|
||||
this.buttonTypeSelector = page.locator('div[class*="header"] div[class*="title"] button')
|
||||
}
|
||||
|
||||
async createNewApplication (data: NewApplication): Promise<void> {
|
||||
@ -102,10 +104,7 @@ export class ApplicationsPage extends CommonRecruitingPage {
|
||||
}
|
||||
|
||||
async selectType (type: string): Promise<void> {
|
||||
// await this.page
|
||||
// .locator('div[class*=header]')
|
||||
// .locator('div[class*=tablist-container]')
|
||||
// .locator('div', { hasText: type })
|
||||
// .click()
|
||||
await this.buttonTypeSelector.click()
|
||||
await this.selectMenuItem(this.page, type)
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,6 @@ test.describe('Application tests', () => {
|
||||
vacancy: vacancyName,
|
||||
recruiterName: 'first'
|
||||
})
|
||||
await applicationsPage.selectType(vacancyName)
|
||||
await applicationsPage.openApplicationByTalentName(talentName)
|
||||
|
||||
const applicationsDetailsPage = new ApplicationsDetailsPage(page)
|
||||
|
@ -109,7 +109,7 @@ test.describe('candidate/talents tests', () => {
|
||||
await talentsPage.checkTalentNotExist(talentName)
|
||||
})
|
||||
|
||||
test.skip('Merge contacts', async ({ page, context }) => {
|
||||
test('Merge contacts', async ({ page, context }) => {
|
||||
const navigationMenuPage = new NavigationMenuPage(page)
|
||||
await navigationMenuPage.buttonTalents.click()
|
||||
const talentsPage = new TalentsPage(page)
|
||||
|
Loading…
Reference in New Issue
Block a user