From 59fb7680d5c9c3416d1c76dac5aa493d255fd0e4 Mon Sep 17 00:00:00 2001 From: Andy Li
Need help?
-
- {{svg-jar "information-circle" class="w-5 h-5 mb-1 inline-flex text-sky-500"}}
- Note:
- After your first Git push, you should see
- Tests failed
- in the bar below this card. This is expected! Complete the steps above to pass the tests.
-
+ {{svg-jar "information-circle" class="w-5 h-5 mb-1 inline-flex text-sky-500"}}
+ Note:
+ After your first Git push, you should see
+ Tests
+ failed
+ in the bar below this card. This is expected! Complete the steps above to pass the tests.
+
- Once you run the commands above, our system will automatically test your code.
+ Once you run the commands above, the
+ Tests failed
+ message below this card will change to
+ Tests passed
.
- Note: - If you're still seeing "Tests failed" after completing the steps above, - view logs - to troubleshoot. -
- {{/unless}} ++ Note: + If you're still seeing "Tests failed" after completing the steps above, + view logs + to troubleshoot. +
{{/unless}} \ No newline at end of file diff --git a/app/components/course-page/course-stage-step/first-stage-tutorial-card/submit-code-step.ts b/app/components/course-page/course-stage-step/first-stage-tutorial-card/submit-code-step.ts index d6c56f9fc..a10c576ed 100644 --- a/app/components/course-page/course-stage-step/first-stage-tutorial-card/submit-code-step.ts +++ b/app/components/course-page/course-stage-step/first-stage-tutorial-card/submit-code-step.ts @@ -8,7 +8,6 @@ interface Signature { Args: { isComplete: boolean; - shouldHideTestRunnerCardRelatedCopy: boolean; }; } diff --git a/app/controllers/course/stage/instructions.ts b/app/controllers/course/stage/instructions.ts index 798eccfe0..132665df7 100644 --- a/app/controllers/course/stage/instructions.ts +++ b/app/controllers/course/stage/instructions.ts @@ -4,7 +4,6 @@ import { tracked } from '@glimmer/tracking'; import type AuthenticatorService from 'codecrafters-frontend/services/authenticator'; import type CoursePageStateService from 'codecrafters-frontend/services/course-page-state'; import type CourseStageModel from 'codecrafters-frontend/models/course-stage'; -import type FeatureFlagsService from 'codecrafters-frontend/services/feature-flags'; import type RepositoryModel from 'codecrafters-frontend/models/repository'; import type CourseStageStep from 'codecrafters-frontend/utils/course-page-step-list/course-stage-step'; import { action } from '@ember/object'; @@ -12,10 +11,10 @@ import type RouterService from '@ember/routing/router-service'; import { next } from '@ember/runloop'; import { task } from 'ember-concurrency'; import type Store from '@ember-data/store'; + export default class CourseStageInstructionsController extends Controller { @service declare authenticator: AuthenticatorService; @service declare coursePageState: CoursePageStateService; - @service declare featureFlags: FeatureFlagsService; @service declare router: RouterService; @service declare store: Store; @@ -48,10 +47,6 @@ export default class CourseStageInstructionsController extends Controller { return this.model.courseStage.prerequisiteInstructionsMarkdownFor(this.model.activeRepository); } - get shouldHideTestRunnerCardBeforeStage1Submission() { - return this.featureFlags.cannotSeeTestRunnerCardBeforeStage1Submission; - } - get shouldShowFeedbackPrompt() { return !this.currentStep.courseStage.isFirst && this.currentStep.status === 'complete'; } @@ -61,21 +56,7 @@ export default class CourseStageInstructionsController extends Controller { } get shouldShowTestRunnerCard() { - if (!this.isCurrentStage) { - return false; - } - - if (this.currentStep.status === 'complete') { - return false; - } - - if (this.model.courseStage.isFirst) { - // For stage 1, we hide the test runner card until the user's submission. - return !(this.model.activeRepository.submissionsCount <= 1 && this.shouldHideTestRunnerCardBeforeStage1Submission); - } else { - // For other stages, we always show the test runner card - return true; - } + return this.isCurrentStage && this.currentStep.status !== 'complete'; } get shouldShowUpgradePrompt() { diff --git a/app/services/feature-flags.js b/app/services/feature-flags.js index d5f34c3fd..c3dd77615 100644 --- a/app/services/feature-flags.js +++ b/app/services/feature-flags.js @@ -18,8 +18,8 @@ export default class FeatureFlagsService extends Service { return this.currentUser?.isStaff || this.getFeatureFlagValue('can-see-short-instructions-for-stage-2') === 'test'; } - get cannotSeeTestRunnerCardBeforeStage1Submission() { - return this.currentUser?.isStaff || this.getFeatureFlagValue('cannot-see-test-runner-card-before-stage1-submission') === 'test'; + get canSeeTweaksForStage1() { + return this.currentUser?.isStaff || this.getFeatureFlagValue('can-see-tweaks-for-stage-1') === 'test'; } get currentUser() { diff --git a/app/templates/course/stage/instructions.hbs b/app/templates/course/stage/instructions.hbs index c654faaa8..b34a1f916 100644 --- a/app/templates/course/stage/instructions.hbs +++ b/app/templates/course/stage/instructions.hbs @@ -33,13 +33,7 @@ {{/if}} {{#if @model.courseStage.isFirst}} -