diff --git a/tests/sanity/tests/actions.spec.ts b/tests/sanity/tests/actions.spec.ts index 339667231d..b5e6f2d0dd 100644 --- a/tests/sanity/tests/actions.spec.ts +++ b/tests/sanity/tests/actions.spec.ts @@ -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 }) diff --git a/tests/sanity/tests/collaborative/applications.spec.ts b/tests/sanity/tests/collaborative/applications.spec.ts index d760d64ec6..461dfe52ec 100644 --- a/tests/sanity/tests/collaborative/applications.spec.ts +++ b/tests/sanity/tests/collaborative/applications.spec.ts @@ -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) diff --git a/tests/sanity/tests/contacts.spec.ts b/tests/sanity/tests/contacts.spec.ts index bd05ccc4de..e68c754dd3 100644 --- a/tests/sanity/tests/contacts.spec.ts +++ b/tests/sanity/tests/contacts.spec.ts @@ -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) }) diff --git a/tests/sanity/tests/model/recruiting/applications-page.ts b/tests/sanity/tests/model/recruiting/applications-page.ts index 890dba8141..1de298e169 100644 --- a/tests/sanity/tests/model/recruiting/applications-page.ts +++ b/tests/sanity/tests/model/recruiting/applications-page.ts @@ -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 { @@ -102,10 +104,7 @@ export class ApplicationsPage extends CommonRecruitingPage { } async selectType (type: string): Promise { - // 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) } } diff --git a/tests/sanity/tests/recruiting/applications.spec.ts b/tests/sanity/tests/recruiting/applications.spec.ts index 424eaceecc..b4819770ae 100644 --- a/tests/sanity/tests/recruiting/applications.spec.ts +++ b/tests/sanity/tests/recruiting/applications.spec.ts @@ -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) diff --git a/tests/sanity/tests/recruiting/talents.spec.ts b/tests/sanity/tests/recruiting/talents.spec.ts index 3ff07a66f6..7d42b8f2a8 100644 --- a/tests/sanity/tests/recruiting/talents.spec.ts +++ b/tests/sanity/tests/recruiting/talents.spec.ts @@ -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)