Skip to content

Commit 692414f

Browse files
authored
Merge pull request #3837 from codecrafters-io/andy/fix-test-failed-state
CC-2221: Fix "test failed" still on local setup stage
2 parents 49ca738 + 8518c6b commit 692414f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/utils/course-page-step-list/course-stage-step.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ This failure is expected!
6060
Check the [How to pass this stage](#first-stage-tutorial-heading) section for instructions.`.trim();
6161
}
6262

63+
get hasOnlyOneSubmission(): boolean {
64+
return this.repository.submissionsCount === 1;
65+
}
66+
6367
get lastFailedSubmission() {
6468
if (this.repository.lastSubmissionHasFailureStatus) {
6569
return this.repository.lastSubmission;
@@ -94,7 +98,7 @@ Check the [How to pass this stage](#first-stage-tutorial-heading) section for in
9498
text: this.completionNoticeMessage!,
9599
};
96100
} else if (this.testsStatus === 'failed') {
97-
if (this.lastSubmissionIsSystemInitiated) {
101+
if (this.lastSubmissionIsSystemInitiated || this.hasOnlyOneSubmission) {
98102
return {
99103
dotColor: 'gray',
100104
dotType: 'static',

0 commit comments

Comments
 (0)