From f52c9669318bc1ff6aa01b6c013b67db35a9d288 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tumanov Date: Tue, 19 Mar 2024 09:46:43 +0500 Subject: [PATCH] Remove related issues from viewlets and update some tests (#5008) --- models/lead/src/index.ts | 36 --------- models/recruit/src/index.ts | 80 +------------------ .../src/components/KanbanCard.svelte | 2 +- .../model/recruiting/applications-page.ts | 4 +- .../tests/model/recruiting/vacancies-page.ts | 1 + .../sanity/tests/recruiting/vacancies.spec.ts | 2 +- 6 files changed, 6 insertions(+), 119 deletions(-) diff --git a/models/lead/src/index.ts b/models/lead/src/index.ts index de8706db59..9f29fe88bb 100644 --- a/models/lead/src/index.ts +++ b/models/lead/src/index.ts @@ -238,14 +238,6 @@ export function createModel (builder: Builder): void { '_class', 'leads', 'attachments', - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - props: { - kind: 'link' - }, - label: tracker.string.Relations - }, 'comments', 'modifiedOn', { @@ -257,13 +249,6 @@ export function createModel (builder: Builder): void { configOptions: { hiddenKeys: ['name'], sortable: true - }, - options: { - lookup: { - _id: { - related: [tracker.class.Issue, 'relations._id'] - } - } } }, lead.viewlet.TableCustomer @@ -280,14 +265,6 @@ export function createModel (builder: Builder): void { 'title', 'attachedTo', 'assignee', - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - props: { - kind: 'link' - }, - label: tracker.string.Issues - }, 'status', 'attachments', 'comments', @@ -299,13 +276,6 @@ export function createModel (builder: Builder): void { ], configOptions: { sortable: true - }, - options: { - lookup: { - _id: { - related: [tracker.class.Issue, 'relations._id'] - } - } } }, lead.viewlet.TableLead @@ -363,12 +333,6 @@ export function createModel (builder: Builder): void { maxWidth: '10rem' } }, - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - label: tracker.string.Relations, - props: { size: 'small' } - }, { key: 'attachments', displayProps: { key: 'attachments', suffix: true } }, { key: 'comments', displayProps: { key: 'comments', suffix: true } }, { key: '', displayProps: { grow: true } }, diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index 06f8559a30..23f9e24a6c 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -434,14 +434,6 @@ export function createModel (builder: Builder): void { 'city', 'applications', 'attachments', - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - props: { - kind: 'link' - }, - label: tracker.string.Relations - }, 'comments', { // key: '$lookup.skills', // Required, since presenter require list of tag references or '' and TagsPopupPresenter @@ -465,13 +457,6 @@ export function createModel (builder: Builder): void { configOptions: { hiddenKeys: ['name'], sortable: true - }, - options: { - lookup: { - _id: { - related: [tracker.class.Issue, 'relations._id'] - } - } } }, recruit.viewlet.TableCandidate @@ -528,14 +513,6 @@ export function createModel (builder: Builder): void { label: recruit.string.Applications }, 'comments', - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - props: { - kind: 'link' - }, - label: tracker.string.Issues - }, '$lookup.company', '$lookup.company.$lookup.channels', 'location', @@ -577,12 +554,6 @@ export function createModel (builder: Builder): void { label: recruit.string.Applications }, 'comments', - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - label: tracker.string.Issues, - props: { size: 'small', kind: 'link' } - }, '$lookup.channels', { key: '@applications.modifiedOn', @@ -615,14 +586,6 @@ export function createModel (builder: Builder): void { } }, 'assignee', - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - props: { - kind: 'link' - }, - label: tracker.string.Issues - }, 'status', 'attachments', 'comments', @@ -636,13 +599,6 @@ export function createModel (builder: Builder): void { configOptions: { hiddenKeys: ['name', 'attachedTo'], sortable: true - }, - options: { - lookup: { - _id: { - related: [tracker.class.Issue, 'relations._id'] - } - } } }, recruit.viewlet.TableApplicant @@ -665,14 +621,6 @@ export function createModel (builder: Builder): void { } }, 'assignee', - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - props: { - kind: 'link' - }, - label: tracker.string.Issues - }, 'status', 'attachments', 'comments', @@ -686,9 +634,6 @@ export function createModel (builder: Builder): void { ], options: { lookup: { - _id: { - related: [tracker.class.Issue, 'relations._id'] - }, space: recruit.class.Vacancy } }, @@ -733,10 +678,7 @@ export function createModel (builder: Builder): void { }, space: recruit.class.Vacancy } - ], - _id: { - related: [tracker.class.Issue, 'relations._id'] - } + ] } const applicationDoneOption: ViewOptionModel = { @@ -811,12 +753,6 @@ export function createModel (builder: Builder): void { }, { key: 'attachments', displayProps: { key: 'attachments', suffix: true } }, { key: 'comments', displayProps: { key: 'comments', suffix: true } }, - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - label: tracker.string.Issues, - props: { size: 'small' } - }, { key: '', displayProps: { grow: true } }, { key: '$lookup.space.company', @@ -852,9 +788,6 @@ export function createModel (builder: Builder): void { ], options: { lookup: { - _id: { - related: [tracker.class.Issue, 'relations._id'] - }, space: recruit.class.Vacancy } }, @@ -930,12 +863,6 @@ export function createModel (builder: Builder): void { props: { kind: 'list', size: 'small', shouldShowName: false } }, 'comments', - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - label: tracker.string.Issues, - props: { size: 'small' } - }, { key: '$lookup.channels', label: contact.string.ContactInfo, @@ -986,11 +913,6 @@ export function createModel (builder: Builder): void { }, 'description', 'comments', - { - key: '', - presenter: tracker.component.RelatedIssueSelector, - label: tracker.string.Issues - }, { key: '', displayProps: { grow: true } }, { key: '$lookup.company', diff --git a/plugins/recruit-resources/src/components/KanbanCard.svelte b/plugins/recruit-resources/src/components/KanbanCard.svelte index a4fb5c6824..267eea0881 100644 --- a/plugins/recruit-resources/src/components/KanbanCard.svelte +++ b/plugins/recruit-resources/src/components/KanbanCard.svelte @@ -111,7 +111,7 @@ }} /> {/if} - + {#if enabledConfig(config, 'dueDate')} { const count = await this.page.locator('tr[class*="row"]').count() for (let i = 0; i < count; i++) { + await this.page.locator('tr[class*="row"]').nth(i).hover() await this.page.locator('tr[class*="row"] td:first-child > div').nth(i).click() } } diff --git a/tests/sanity/tests/recruiting/vacancies.spec.ts b/tests/sanity/tests/recruiting/vacancies.spec.ts index a289aea5e5..8e10a9cdaa 100644 --- a/tests/sanity/tests/recruiting/vacancies.spec.ts +++ b/tests/sanity/tests/recruiting/vacancies.spec.ts @@ -145,7 +145,7 @@ test.describe('Vacancy tests', () => { const vacanciesPage = new VacanciesPage(page) await vacanciesPage.selectAll() - await vacanciesPage.exportVacanciesWithCheck('Software Engineer') + await vacanciesPage.exportVacanciesWithCheck('Software Engineer', 2000) }) test('Archive a Vacancy', async ({ page }) => {