mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 00:10:37 +00:00
fix for the list (#6096)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
807426e0b2
commit
cfe99b6bcf
@ -15,8 +15,8 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { PersonAccount } from '@hcengineering/contact'
|
import { PersonAccount } from '@hcengineering/contact'
|
||||||
import { AggregateValue, Ref } from '@hcengineering/core'
|
import core, { AggregateValue, Ref } from '@hcengineering/core'
|
||||||
import { IconSize } from '@hcengineering/ui'
|
import { IconSize, Label } from '@hcengineering/ui'
|
||||||
import { personAccountByIdStore } from '../utils'
|
import { personAccountByIdStore } from '../utils'
|
||||||
import PersonAccountPresenter from './PersonAccountPresenter.svelte'
|
import PersonAccountPresenter from './PersonAccountPresenter.svelte'
|
||||||
import { personStore } from '..'
|
import { personStore } from '..'
|
||||||
@ -48,4 +48,6 @@
|
|||||||
{compact}
|
{compact}
|
||||||
on:accent-color
|
on:accent-color
|
||||||
/>
|
/>
|
||||||
|
{:else}
|
||||||
|
<Label label={core.string.System} />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -371,7 +371,6 @@
|
|||||||
{#each categories as category, i (typeof category === 'object' ? category.name : category)}
|
{#each categories as category, i (typeof category === 'object' ? category.name : category)}
|
||||||
{@const items = groupByKey === noCategory ? docs : getGroupByValues(groupByDocs, category)}
|
{@const items = groupByKey === noCategory ? docs : getGroupByValues(groupByDocs, category)}
|
||||||
{@const categoryDocKeys = getGroupByKey(docKeys, category, resultQuery)}
|
{@const categoryDocKeys = getGroupByKey(docKeys, category, resultQuery)}
|
||||||
{#if items.length !== 0}
|
|
||||||
<ListCategory
|
<ListCategory
|
||||||
bind:this={listListCategory[i]}
|
bind:this={listListCategory[i]}
|
||||||
{extraHeaders}
|
{extraHeaders}
|
||||||
@ -493,5 +492,4 @@
|
|||||||
/>
|
/>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
</ListCategory>
|
</ListCategory>
|
||||||
{/if}
|
|
||||||
{/each}
|
{/each}
|
||||||
|
@ -93,6 +93,9 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
viewButton = (): Locator => this.page.locator('button:has-text("View")')
|
viewButton = (): Locator => this.page.locator('button:has-text("View")')
|
||||||
firstOptionButton = (): Locator => this.page.locator('.antiCard >> button >> nth=0')
|
firstOptionButton = (): Locator => this.page.locator('.antiCard >> button >> nth=0')
|
||||||
assigneeMenuItem = (): Locator => this.page.locator('.menu-item:has-text("Assignee")')
|
assigneeMenuItem = (): Locator => this.page.locator('.menu-item:has-text("Assignee")')
|
||||||
|
shouldShowAllToggle = (): Locator =>
|
||||||
|
this.page.locator('.antiCard.menu .antiCard-menu__item:has-text("Show empty groups")')
|
||||||
|
|
||||||
header = (): Locator => this.page.getByText('Issues All Active Backlog')
|
header = (): Locator => this.page.getByText('Issues All Active Backlog')
|
||||||
filter = (): Locator => this.page.getByRole('button', { name: 'Filter' })
|
filter = (): Locator => this.page.getByRole('button', { name: 'Filter' })
|
||||||
view = (): Locator => this.page.getByRole('button', { name: 'View' })
|
view = (): Locator => this.page.getByRole('button', { name: 'View' })
|
||||||
@ -122,6 +125,12 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async openViewOptionsAndToggleShouldShowAll (): Promise<void> {
|
||||||
|
await this.viewButton().click()
|
||||||
|
await this.shouldShowAllToggle().click()
|
||||||
|
await this.page.keyboard.press('Escape')
|
||||||
|
}
|
||||||
|
|
||||||
async verifyViewOption (panel: string, viewletSelector: string): Promise<void> {
|
async verifyViewOption (panel: string, viewletSelector: string): Promise<void> {
|
||||||
await this.page.click(`text="${panel}"`)
|
await this.page.click(`text="${panel}"`)
|
||||||
const viewlet = this.page.locator(viewletSelector)
|
const viewlet = this.page.locator(viewletSelector)
|
||||||
|
@ -100,6 +100,13 @@ export class IssuesPage extends CommonTrackerPage {
|
|||||||
todoHeader = (): Locator => this.page.locator('.categoryHeader :text-is("Todo")').first()
|
todoHeader = (): Locator => this.page.locator('.categoryHeader :text-is("Todo")').first()
|
||||||
doneHeader = (): Locator => this.page.locator('.categoryHeader :text-is("Done")').first()
|
doneHeader = (): Locator => this.page.locator('.categoryHeader :text-is("Done")').first()
|
||||||
canceledHeader = (): Locator => this.page.locator('.categoryHeader :text-is("Canceled")').first()
|
canceledHeader = (): Locator => this.page.locator('.categoryHeader :text-is("Canceled")').first()
|
||||||
|
|
||||||
|
inProgressHeaderKanban = (): Locator => this.page.locator('.header :text-is("In Progress")').first()
|
||||||
|
backlogHeaderKanban = (): Locator => this.page.locator('.header :text-is("Backlog")').first()
|
||||||
|
todoHeaderKanban = (): Locator => this.page.locator('.header :text-is("Todo")').first()
|
||||||
|
doneHeaderKanban = (): Locator => this.page.locator('.header :text-is("Done")').first()
|
||||||
|
canceledHeaderKanban = (): Locator => this.page.locator('.header :text-is("Canceled")').first()
|
||||||
|
|
||||||
myIssuesButton = (): Locator => this.page.locator('text="My issues"')
|
myIssuesButton = (): Locator => this.page.locator('text="My issues"')
|
||||||
assignedTab = (): Locator => this.page.locator('[data-id="tab-assigned"]')
|
assignedTab = (): Locator => this.page.locator('[data-id="tab-assigned"]')
|
||||||
createdTab = (): Locator => this.page.locator('[data-id="tab-created"]')
|
createdTab = (): Locator => this.page.locator('[data-id="tab-created"]')
|
||||||
@ -602,6 +609,14 @@ export class IssuesPage extends CommonTrackerPage {
|
|||||||
await expect(this.canceledHeader()).toBeVisible()
|
await expect(this.canceledHeader()).toBeVisible()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async verifyCategoryHeadersVisibilityKanban (): Promise<void> {
|
||||||
|
await expect(this.inProgressHeaderKanban()).toBeVisible()
|
||||||
|
await expect(this.backlogHeaderKanban()).toBeVisible()
|
||||||
|
await expect(this.todoHeaderKanban()).toBeVisible()
|
||||||
|
await expect(this.doneHeaderKanban()).toBeVisible()
|
||||||
|
await expect(this.canceledHeaderKanban()).toBeVisible()
|
||||||
|
}
|
||||||
|
|
||||||
async openAllCategories (): Promise<void> {
|
async openAllCategories (): Promise<void> {
|
||||||
for await (const category of iterateLocator(this.buttonCollapsedCategories())) {
|
for await (const category of iterateLocator(this.buttonCollapsedCategories())) {
|
||||||
await category.click()
|
await category.click()
|
||||||
|
@ -2,7 +2,7 @@ import { test } from '@playwright/test'
|
|||||||
import { CommonTrackerPage } from '../model/tracker/common-tracker-page'
|
import { CommonTrackerPage } from '../model/tracker/common-tracker-page'
|
||||||
import { IssuesDetailsPage } from '../model/tracker/issues-details-page'
|
import { IssuesDetailsPage } from '../model/tracker/issues-details-page'
|
||||||
import { IssuesPage } from '../model/tracker/issues-page'
|
import { IssuesPage } from '../model/tracker/issues-page'
|
||||||
import { PlatformSetting, fillSearch } from '../utils'
|
import { PlatformSetting, PlatformURI, fillSearch } from '../utils'
|
||||||
import {
|
import {
|
||||||
DEFAULT_STATUSES,
|
DEFAULT_STATUSES,
|
||||||
ViewletSelectors,
|
ViewletSelectors,
|
||||||
@ -169,6 +169,25 @@ test.describe('Tracker tests', () => {
|
|||||||
dueDate: '24'
|
dueDate: '24'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('check shouldShowAll option', async ({ page }) => {
|
||||||
|
await (
|
||||||
|
await page.goto(`${PlatformURI}/workbench/sanity-ws/tracker/tracker%3Aproject%3ADefaultProject/issues`)
|
||||||
|
)?.finished()
|
||||||
|
const issuesPage = new IssuesPage(page)
|
||||||
|
await navigate(page)
|
||||||
|
await issuesPage.navigateToIssues()
|
||||||
|
await issuesPage.searchIssueByName('!!!!')
|
||||||
|
await issuesPage.openViewOptionsAndToggleShouldShowAll()
|
||||||
|
await issuesPage.clickModelSelectorAll()
|
||||||
|
await issuesPage.verifyCategoryHeadersVisibility()
|
||||||
|
await issuesPage.openViewOptionsAndToggleShouldShowAll()
|
||||||
|
|
||||||
|
await page.click(ViewletSelectors.Board)
|
||||||
|
await issuesPage.openViewOptionsAndToggleShouldShowAll()
|
||||||
|
await issuesPage.verifyCategoryHeadersVisibilityKanban()
|
||||||
|
await issuesPage.openViewOptionsAndToggleShouldShowAll()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
async function doSaveViewTest (
|
async function doSaveViewTest (
|
||||||
panels: string[],
|
panels: string[],
|
||||||
|
Loading…
Reference in New Issue
Block a user