Check sortie checklist group completion flags
This commit is contained in:
@@ -9598,6 +9598,12 @@ function assertSortieTacticalRoster(state, requiredUnitIds) {
|
||||
if (state.sortieChecklistSummary.complete !== (state.sortieChecklistSummary.completeCount === state.sortieChecklistSummary.total)) {
|
||||
throw new Error(`Expected sortie checklist completion flag to match summary counts: ${JSON.stringify(state.sortieChecklistSummary)}`);
|
||||
}
|
||||
if (state.sortieChecklistSummary.requiredComplete !== (state.sortieChecklistSummary.requiredRemainingCount === 0)) {
|
||||
throw new Error(`Expected required checklist completion flag to match remaining count: ${JSON.stringify(state.sortieChecklistSummary)}`);
|
||||
}
|
||||
if (state.sortieChecklistSummary.recommendedComplete !== (state.sortieChecklistSummary.recommendedRemainingCount === 0)) {
|
||||
throw new Error(`Expected recommended checklist completion flag to match remaining count: ${JSON.stringify(state.sortieChecklistSummary)}`);
|
||||
}
|
||||
if (state.sortieChecklistSummary.complete && state.sortieChecklistSummary.nextIncompleteLabel !== null) {
|
||||
throw new Error(`Expected complete sortie checklist summary to clear next incomplete item: ${JSON.stringify(state.sortieChecklistSummary)}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user