From 48a08abf7b72b0bd09214e66be382eceee0f98a7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 19:15:07 +0000 Subject: [PATCH 1/4] Initial plan From 6771f6ffba826afe2f73368ce753390304f54579 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 19:20:39 +0000 Subject: [PATCH 2/4] Add Stub_ShowProjectInbox and focused test --- .../project_item.searchprojectitem.test.ps1 | 21 ++++++++++++++++++- public/items/project_item.ps1 | 21 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Test/public/project_item.searchprojectitem.test.ps1 b/Test/public/project_item.searchprojectitem.test.ps1 index 112b9b0..e143088 100644 --- a/Test/public/project_item.searchprojectitem.test.ps1 +++ b/Test/public/project_item.searchprojectitem.test.ps1 @@ -122,4 +122,23 @@ function Test_SearchProjectItem_AND_Filter_SUCCESS { # Negative: second token missing $notFound = Search-ProjectItem -Owner $Owner -ProjectNumber $ProjectNumber -Filter "UniqueSearchAlpha","MissingZeta" Assert-Count -Expected 0 -Presented $notFound -} \ No newline at end of file +} + +function Test_StubShowProjectInbox_SUCCESS { + + # Arrange + Reset-InvokeCommandMock + $p = Get-Mock_Project_700 ; $owner = $p.owner ; $projectNumber = $p.number + MockCall_GetProject_700 + $expected = @($p.items.values | Where-Object { [string]::IsNullOrWhiteSpace($_.status) }) + + # Act + $result = Stub_ShowProjectInbox -Owner $owner -ProjectNumber $projectNumber -PassThru + + # Assert + Assert-Count -Expected $expected.Count -Presented $result + Assert-IsTrue -Condition (@($result | Where-Object { -not [string]::IsNullOrWhiteSpace($_.Status) }).Count -eq 0) + foreach($id in $expected.id){ + Assert-Contains -Expected $id -Presented $result.id + } +} diff --git a/public/items/project_item.ps1 b/public/items/project_item.ps1 index 04ffae4..90958c5 100644 --- a/public/items/project_item.ps1 +++ b/public/items/project_item.ps1 @@ -245,6 +245,27 @@ function Search-ProjectItem { } Export-ModuleMember -Function Search-ProjectItem -Alias "spi" +function Stub_ShowProjectInbox{ + [CmdletBinding()] + param( + [Parameter()][string]$Owner, + [Parameter()][string]$ProjectNumber, + [Parameter()][switch]$PassThru + ) + + ($Owner, $ProjectNumber) = Resolve-ProjectParameters -Owner $Owner -ProjectNumber $ProjectNumber + + $items = Search-ProjectItem -Owner $Owner -ProjectNumber $ProjectNumber -IncludeDone -PassThru + $items = @($items | Where-Object { [string]::IsNullOrWhiteSpace($_.Status) }) + + if($PassThru){ + return $items + } + + return $items | Use-Order + +} Export-ModuleMember -Function Stub_ShowProjectInbox + function Format-ProjectItem{ [CmdletBinding()] [Alias("fpi")] From 650f2ed6722eb9a173db9d9bbacf9fe2fa4ad474 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 19:21:26 +0000 Subject: [PATCH 3/4] Adjust new inbox test style and property casing --- Test/public/project_item.searchprojectitem.test.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Test/public/project_item.searchprojectitem.test.ps1 b/Test/public/project_item.searchprojectitem.test.ps1 index e143088..b16c675 100644 --- a/Test/public/project_item.searchprojectitem.test.ps1 +++ b/Test/public/project_item.searchprojectitem.test.ps1 @@ -128,9 +128,11 @@ function Test_StubShowProjectInbox_SUCCESS { # Arrange Reset-InvokeCommandMock - $p = Get-Mock_Project_700 ; $owner = $p.owner ; $projectNumber = $p.number + $p = Get-Mock_Project_700 + $owner = $p.owner + $projectNumber = $p.number MockCall_GetProject_700 - $expected = @($p.items.values | Where-Object { [string]::IsNullOrWhiteSpace($_.status) }) + $expected = @($p.items.values | Where-Object { [string]::IsNullOrWhiteSpace($_.Status) }) # Act $result = Stub_ShowProjectInbox -Owner $owner -ProjectNumber $projectNumber -PassThru From c409146b78358eaa845f9efcbd8e8c678063a28f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 19:21:59 +0000 Subject: [PATCH 4/4] Refine inbox stub test assertions --- Test/public/project_item.searchprojectitem.test.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Test/public/project_item.searchprojectitem.test.ps1 b/Test/public/project_item.searchprojectitem.test.ps1 index b16c675..c7cfbe4 100644 --- a/Test/public/project_item.searchprojectitem.test.ps1 +++ b/Test/public/project_item.searchprojectitem.test.ps1 @@ -138,8 +138,9 @@ function Test_StubShowProjectInbox_SUCCESS { $result = Stub_ShowProjectInbox -Owner $owner -ProjectNumber $projectNumber -PassThru # Assert + $itemsWithStatus = @($result | Where-Object { -not [string]::IsNullOrWhiteSpace($_.Status) }) Assert-Count -Expected $expected.Count -Presented $result - Assert-IsTrue -Condition (@($result | Where-Object { -not [string]::IsNullOrWhiteSpace($_.Status) }).Count -eq 0) + Assert-Count -Expected 0 -Presented $itemsWithStatus foreach($id in $expected.id){ Assert-Contains -Expected $id -Presented $result.id }