feat(work-view): show custom section task counts #9068 (#9109)

This commit is contained in:
coyaSONG 2026-07-17 22:58:50 +09:00 committed by GitHub
parent 99f923ad6c
commit 5097155e25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -304,7 +304,7 @@ test.describe('Sections', () => {
await expect(sectionByTitle(page, 'Doomed')).toHaveCount(0);
});
test('drops a task into a section via drag and drop', async ({
test('drops a task into a section and updates its task count', async ({
page,
workViewPage,
projectPage,
@ -322,6 +322,8 @@ test.describe('Sections', () => {
const section = sectionByTitle(page, 'Target');
await expect(section).toBeVisible();
const sectionTitle = section.locator('.collapsible-title');
await expect(sectionTitle).toHaveText('Target (0)');
// The section's inner task-list is the drop target.
const sectionTaskList = section.locator('task-list').first();
const noSectionTaskList = page.locator('.no-section task-list').first();
@ -336,6 +338,7 @@ test.describe('Sections', () => {
await expect(section.locator('task').filter({ hasText: 'Movable' })).toBeVisible({
timeout: 5000,
});
await expect(sectionTitle).toHaveText('Target (1)');
await expect(
noSectionTaskList.locator('task').filter({ hasText: 'Movable' }),
).toHaveCount(0);

View file

@ -187,7 +187,9 @@
[cdkDragLockAxis]="'y'"
>
<collapsible
[title]="section.title"
[title]="
section.title + ' (' + bySection.dict[section.id].length + ')'
"
[isIconBefore]="true"
[isExpanded]="section.isExpanded"
(isExpandedChange)="