Remove related issues from viewlets and update some tests (#5008)

This commit is contained in:
Vyacheslav Tumanov 2024-03-19 09:46:43 +05:00 committed by GitHub
parent c9761b3502
commit f52c966931
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 6 additions and 119 deletions

View File

@ -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 } },

View File

@ -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',

View File

@ -111,7 +111,7 @@
}}
/>
{/if}
<Component showLoading={false} is={tracker.component.RelatedIssueSelector} props={{ object, size: 'small' }} />
<!-- <Component showLoading={false} is={tracker.component.RelatedIssueSelector} props={{ object, size: 'small' }} /> -->
{#if enabledConfig(config, 'dueDate')}
<DueDatePresenter
size={'small'}

View File

@ -86,7 +86,7 @@ export class ApplicationsPage extends CommonRecruitingPage {
this.page
.locator('tr', { hasText: `${talentName.lastName} ${talentName.firstName}` })
.locator('td')
.nth(5)
.nth(4)
).toHaveText(done)
}
@ -98,7 +98,7 @@ export class ApplicationsPage extends CommonRecruitingPage {
await this.page
.locator('tr', { hasText: `${talentName.lastName} ${talentName.firstName}` })
.locator('td')
.nth(5)
.nth(4)
.click()
await this.selectFromDropdown(this.page, status)
}

View File

@ -75,6 +75,7 @@ export class VacanciesPage extends CommonRecruitingPage {
async selectAll (): Promise<void> {
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()
}
}

View File

@ -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 }) => {