Skip to content

Commit

Permalink
Code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RaymondLuong3 committed Dec 17, 2024
1 parent 73d9960 commit 6ebab5e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ class SFProjectMigration22 extends DocMigration {
}
}

await submitMigrationOp(SFProjectMigration21.VERSION, doc, ops);
await submitMigrationOp(SFProjectMigration22.VERSION, doc, ops);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ describe('DraftGenerationStepsComponent', () => {
when(mockProjectService.getProfile('alternateTrainingProject')).thenResolve(
mockAlternateTrainingSourceProjectDoc
);
when(mockFeatureFlagService.allowFastTraining).thenReturn(createTestFeatureFlag(false));
when(mockTrainingDataService.queryTrainingDataAsync(anything())).thenResolve(instance(mockTrainingDataQuery));
when(mockTrainingDataQuery.docs).thenReturn([]);
when(mockFeatureFlagService.allowFastTraining).thenReturn(createTestFeatureFlag(false));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,10 @@ export class DraftGenerationStepsComponent extends SubscriptionDisposable implem
this.activatedProject.projectDoc?.data?.translateConfig.draftConfig.lastSelectedTrainingScriptureRanges?.find(
r => r.projectId === trainingSourceId
)?.scriptureRange ?? '';
const trainingScriptureRange =
const trainingScriptureRange: string | undefined =
this.activatedProject.projectDoc?.data?.translateConfig.draftConfig.lastSelectedTrainingScriptureRange;
if (previousTrainingRange === '' && trainingScriptureRange != null) {
previousTrainingRange =
this.activatedProject.projectDoc?.data?.translateConfig.draftConfig.lastSelectedTrainingScriptureRange ?? '';
previousTrainingRange = trainingScriptureRange;

Check warning on line 413 in src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-generation-steps/draft-generation-steps.component.ts

View check run for this annotation

Codecov / codecov/patch

src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-generation-steps/draft-generation-steps.component.ts#L413

Added line #L413 was not covered by tests
}
const previousBooks: Set<number> = new Set<number>(booksFromScriptureRange(previousTrainingRange));

Expand Down

0 comments on commit 6ebab5e

Please sign in to comment.