diff --git a/app/components/tracks-page/track-card.hbs b/app/components/tracks-page/track-card.hbs index 6a0ff6e51..ab669d7d2 100644 --- a/app/components/tracks-page/track-card.hbs +++ b/app/components/tracks-page/track-card.hbs @@ -12,7 +12,7 @@ {{! Text }}
-
+
{{@language.name}}
@@ -36,8 +36,8 @@ /> {{else}}
- {{svg-jar "academic-cap" class="w-4 mr-1 fill-current text-gray-300"}} - {{this.stagesCount}} stages + {{svg-jar "academic-cap" class="w-4 mr-1 fill-current text-gray-300 dark:text-gray-700"}} + {{this.stagesCount}} stages
{{/if}} @@ -50,7 +50,7 @@ {{/if}} - {{svg-jar "arrow-right" class="w-4 fill-current text-gray-300 group-hover:text-teal-500 transition-colors"}} + {{svg-jar "arrow-right" class="w-4 fill-current text-gray-300 dark:text-gray-700 group-hover:text-teal-500 transition-colors"}}
\ No newline at end of file diff --git a/app/routes/course.ts b/app/routes/course.ts index f49e00817..3a50d4a24 100644 --- a/app/routes/course.ts +++ b/app/routes/course.ts @@ -11,7 +11,6 @@ import type Transition from '@ember/routing/transition'; import { StepList } from 'codecrafters-frontend/utils/course-page-step-list'; import { inject as service } from '@ember/service'; import { next } from '@ember/runloop'; -import RouteInfoMetadata, { RouteColorScheme } from 'codecrafters-frontend/utils/route-info-metadata'; export type ModelType = { course: CourseModel; diff --git a/tests/acceptance/view-courses-test.js b/tests/acceptance/view-courses-test.js index 6ac39e711..0e30155d9 100644 --- a/tests/acceptance/view-courses-test.js +++ b/tests/acceptance/view-courses-test.js @@ -35,6 +35,22 @@ module('Acceptance | view-courses', function (hooks) { assert.notOk(catalogPage.courseCardByName('Build your own SQLite').hasBetaLabel, 'live challenges should not have beta label'); }); + test('it renders with dark mode', async function (assert) { + testScenario(this.server); + signIn(this.owner, this.server); + + const darkMode = this.owner.lookup('service:dark-mode'); + darkMode.updateLocalStoragePreference('dark'); + + const course = this.server.schema.courses.findBy({ slug: 'grep' }); + course.update({ releaseStatus: 'beta' }); + + await catalogPage.visit(); + assert.strictEqual(catalogPage.courseCards.length, 5, 'expected 5 course cards to be present'); + + await percySnapshot('Catalog Page - Dark Mode'); + }); + test('it renders alpha courses if user is staff', async function (assert) { testScenario(this.server); signInAsStaff(this.owner, this.server);