SF-3731 Show message on summary step when no training books selected#3711
SF-3731 Show message on summary step when no training books selected#3711RaymondLuong3 wants to merge 2 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3711 +/- ##
=======================================
Coverage 81.75% 81.75%
=======================================
Files 619 619
Lines 38634 38635 +1
Branches 6287 6307 +20
=======================================
+ Hits 31585 31586 +1
+ Misses 6090 6077 -13
- Partials 959 972 +13 ☔ View full report in Codecov by Sentry. |
Nateowami
left a comment
There was a problem hiding this comment.
@Nateowami made 2 comments.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on RaymondLuong3).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-generation-steps/draft-generation-steps.component.ts line 485 at r1 (raw file):
.filter(b => b.selected) .map(b => b.number); if (trainingBooksBySource.length === 0) continue;
I think it would make more sense to just put the trainingRanges.push in an if
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts line 1419 at r1 (raw file):
component.onSourceTrainingBookSelect([], config.trainingSources[0]); component.onSourceTrainingBookSelect([], config.trainingSources[1]); expect(component.selectedTrainingBooksCollapsed().length).toEqual(0);
Shouldn't the assertion be that the text "No training books selected" is shown? I can't read this test and conclude that it tests what it intends to test.
04fe920 to
386c4b0
Compare
RaymondLuong3
left a comment
There was a problem hiding this comment.
@RaymondLuong3 made 1 comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on Nateowami).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts line 1419 at r1 (raw file):
Previously, Nateowami wrote…
Shouldn't the assertion be that the text "No training books selected" is shown? I can't read this test and conclude that it tests what it intends to test.
Done.
Nateowami
left a comment
There was a problem hiding this comment.
@Nateowami reviewed 3 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on RaymondLuong3).
A change in PR #3700 mistakenly ignored the case when there are no training books selected and did not show the "no training books" message on the draft summary step. Very few drafts use no training books, but it is possible. This corrects the logic so the message is shown on the summary step.
This change is