Skip to content

Commit c652555

Browse files
committed
Update snapshots, handle missing data
1 parent af4f8bf commit c652555

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

client/components/TestPlanVersionsPage/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const TestPlanVersionsPage = () => {
9191
// GraphQL results are read only so they need to be cloned
9292
// before passing to SortableIssuesTable
9393
const issues = useMemo(() => {
94-
return [...data.testPlan.issues];
94+
return data ? [...data.testPlan.issues] : [];
9595
}, [data]);
9696

9797
if (error) {

client/components/TestReview/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const TestReview = () => {
3939
// GraphQL results are read only so they need to be cloned
4040
// before passing to SortableIssuesTable
4141
const issues = useMemo(() => {
42-
return [...data.testPlanVersion.testPlan.issues];
42+
return data ? [...data.testPlanVersion.testPlan.issues] : [];
4343
}, [data]);
4444

4545
if (loading) {

client/tests/e2e/snapshots/saved/_test-review_8.html

+37
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,43 @@ <h2>Supporting Documentation</h2>
123123
>
124124
</li>
125125
</ul>
126+
<h2 id="github-issues">GitHub Issues (0 open, 0&nbsp;closed)</h2>
127+
<ul
128+
class="d-flex align-items-center my-3"
129+
aria-label="Filter GitHub issues"
130+
role="group">
131+
<li aria-hidden="true">Filter</li>
132+
<li>
133+
<button
134+
type="button"
135+
data-test="filter-open"
136+
aria-pressed="true"
137+
class="css-14jv778 btn active btn-secondary">
138+
Open
139+
</button>
140+
</li>
141+
<li>
142+
<button
143+
type="button"
144+
data-test="filter-closed"
145+
aria-pressed="false"
146+
class="css-14jv778 btn btn-secondary">
147+
Closed
148+
</button>
149+
</li>
150+
<li>
151+
<button
152+
type="button"
153+
data-test="filter-all"
154+
aria-pressed="false"
155+
class="css-14jv778 btn btn-secondary">
156+
All
157+
</button>
158+
</li>
159+
</ul>
160+
<div aria-labelledby="github-issues" class="css-gy9uo3">
161+
No GitHub Issues
162+
</div>
126163
<h2>Tests</h2>
127164
<div class="css-ifttx1">
128165
<ul

0 commit comments

Comments
 (0)