Skip to content

SF-3731 Show message on summary step when no training books selected#3711

Open
RaymondLuong3 wants to merge 2 commits intomasterfrom
fix/sf-3731-no-training-books
Open

SF-3731 Show message on summary step when no training books selected#3711
RaymondLuong3 wants to merge 2 commits intomasterfrom
fix/sf-3731-no-training-books

Conversation

@RaymondLuong3
Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 commented Feb 25, 2026

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.


Open with Devin

This change is Reviewable

@RaymondLuong3 RaymondLuong3 added the will require testing PR should not be merged until testers confirm testing is complete label Feb 25, 2026
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.75%. Comparing base (2cb0b81) to head (386c4b0).
⚠️ Report is 8 commits behind head on master.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Nateowami Nateowami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@RaymondLuong3 RaymondLuong3 force-pushed the fix/sf-3731-no-training-books branch from 04fe920 to 386c4b0 Compare February 26, 2026 17:42
Copy link
Collaborator Author

@RaymondLuong3 RaymondLuong3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Collaborator

@Nateowami Nateowami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@Nateowami reviewed 3 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on RaymondLuong3).

@Nateowami Nateowami self-assigned this Mar 3, 2026
@Nateowami Nateowami added ready to test and removed will require testing PR should not be merged until testers confirm testing is complete labels Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants