From 44a341eae3b3708c9bdb7526bfce87d04e063a6c Mon Sep 17 00:00:00 2001 From: Vyacheslav Tumanov Date: Sat, 13 Jan 2024 18:47:49 +0500 Subject: [PATCH] Fix edit Vacancy test (#4346) Signed-off-by: Vyacheslav Tumanov Signed-off-by: Alex Velichko Co-authored-by: Alex Velichko --- tests/sanity/tests/model/recruiting/common-recruiting-page.ts | 2 +- tests/sanity/tests/model/recruiting/talent-details-page.ts | 1 + tests/sanity/tests/model/recruiting/vacancy-details-page.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/sanity/tests/model/recruiting/common-recruiting-page.ts b/tests/sanity/tests/model/recruiting/common-recruiting-page.ts index a0c92fcaea..efc3ef9848 100644 --- a/tests/sanity/tests/model/recruiting/common-recruiting-page.ts +++ b/tests/sanity/tests/model/recruiting/common-recruiting-page.ts @@ -29,7 +29,7 @@ export class CommonRecruitingPage extends CalendarPage { this.buttonSendComment = page.locator('g#Send') this.textComment = page.locator('div.showMore-content p') this.inputAddAttachment = page.locator('div.antiSection #file') - this.textAttachmentName = page.locator('div.name a') + this.textAttachmentName = page.locator('div.attachment-container > a') this.buttonCreateFirstReview = page.locator('span:has-text("Create review")') this.buttonMoreActions = page.locator('.popupPanel-title > .flex-row-center > button >> nth=0') this.buttonDelete = page.locator('button[class*="menuItem"] span', { hasText: 'Delete' }) diff --git a/tests/sanity/tests/model/recruiting/talent-details-page.ts b/tests/sanity/tests/model/recruiting/talent-details-page.ts index ac691e070a..30897ca37c 100644 --- a/tests/sanity/tests/model/recruiting/talent-details-page.ts +++ b/tests/sanity/tests/model/recruiting/talent-details-page.ts @@ -30,6 +30,7 @@ export class TalentDetailsPage extends CommonRecruitingPage { this.buttonPopupMergeContacts = page.locator('form[id="contact:string:MergePersons"] button > span', { hasText: 'Merge contacts' }) + this.textAttachmentName = page.locator('div.name a') } async addSkill (skillTag: string, skillDescription: string): Promise { diff --git a/tests/sanity/tests/model/recruiting/vacancy-details-page.ts b/tests/sanity/tests/model/recruiting/vacancy-details-page.ts index 8fda3a20b9..4d1105ad23 100644 --- a/tests/sanity/tests/model/recruiting/vacancy-details-page.ts +++ b/tests/sanity/tests/model/recruiting/vacancy-details-page.ts @@ -33,7 +33,7 @@ export class VacancyDetailsPage extends CommonRecruitingPage { async addAttachments (filePath: string): Promise { await this.inputAttachFile.setInputFiles(path.join(__dirname, `../../files/${filePath}`)) - await expect(this.textAttachmentName.filter({ hasText: filePath })).toBeVisible() + await expect(this.textAttachmentName).toHaveAttribute('download', filePath) } async addDescription (description: string): Promise {