Skip to content

Commit 746da6d

Browse files
committed
Update PR tests for v2 projects
1 parent 72f5fbb commit 746da6d

2 files changed

Lines changed: 29 additions & 2 deletions

File tree

pkg/cmd/pr/view/fixtures/prViewPreviewWithMetadataByNumber.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,33 @@
5454
],
5555
"totalcount": 5
5656
},
57+
"projectitems": {
58+
"totalCount": 2,
59+
"nodes": [
60+
{
61+
"id": "NO_STATUS_ITEM",
62+
"project": {
63+
"id": "PROJECT1",
64+
"title": "v2 Project 1"
65+
},
66+
"status": {
67+
"optionId": "",
68+
"name": ""
69+
}
70+
},
71+
{
72+
"id": "DONE_STATUS_ITEM",
73+
"project": {
74+
"id": "PROJECT2",
75+
"title": "v2 Project 2"
76+
},
77+
"status": {
78+
"optionId": "PROJECTITEMFIELD1",
79+
"name": "Done"
80+
}
81+
}
82+
]
83+
},
5784
"projectcards": {
5885
"nodes": [
5986
{

pkg/cmd/pr/view/view_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ func TestPRView_Preview_nontty(t *testing.T) {
286286
`reviewers:\t1 \(Requested\)\n`,
287287
`assignees:\tmarseilles, monaco\n`,
288288
`labels:\tClosed: Duplicate, Closed: Won't Fix, help wanted, Status: In Progress, Type: Bug\n`,
289-
`projects:\tProject 1 \(column A\), Project 2 \(column B\), Project 3 \(column C\), Project 4 \(Awaiting triage\)\n`,
289+
`projects:\tv2 Project 1 \(No Status\), v2 Project 2 \(Done\), Project 1 \(column A\), Project 2 \(column B\), Project 3 \(column C\), Project 4 \(Awaiting triage\)\n`,
290290
`milestone:\tuluru\n`,
291291
`\*\*blueberries taste good\*\*`,
292292
},
@@ -457,7 +457,7 @@ func TestPRView_Preview(t *testing.T) {
457457
`Reviewers:.*1 \(.*Requested.*\)\n`,
458458
`Assignees:.*marseilles, monaco\n`,
459459
`Labels:.*Closed: Duplicate, Closed: Won't Fix, help wanted, Status: In Progress, Type: Bug\n`,
460-
`Projects:.*Project 1 \(column A\), Project 2 \(column B\), Project 3 \(column C\), Project 4 \(Awaiting triage\)\n`,
460+
`Projects:.*v2 Project 1 \(No Status\), v2 Project 2 \(Done\), Project 1 \(column A\), Project 2 \(column B\), Project 3 \(column C\), Project 4 \(Awaiting triage\)\n`,
461461
`Milestone:.*uluru\n`,
462462
`blueberries taste good`,
463463
`View this pull request on GitHub: https://github.com/OWNER/REPO/pull/12`,

0 commit comments

Comments
 (0)