From 6a5d2e0a2273db2025f37c98980fa61dd5cb85a6 Mon Sep 17 00:00:00 2001 From: Carey P Gumaer Date: Tue, 25 Jun 2024 14:44:33 -0400 Subject: [PATCH] remove course filter from featured carousel (#1164) * remove course filter from featured carousel * fix homepage tests --- frontends/mit-open/src/pages/HomePage/HomePage.test.tsx | 9 ++++----- frontends/mit-open/src/pages/HomePage/carousels.ts | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frontends/mit-open/src/pages/HomePage/HomePage.test.tsx b/frontends/mit-open/src/pages/HomePage/HomePage.test.tsx index 20d77c741c..74a33fedba 100644 --- a/frontends/mit-open/src/pages/HomePage/HomePage.test.tsx +++ b/frontends/mit-open/src/pages/HomePage/HomePage.test.tsx @@ -115,16 +115,15 @@ describe("Home Page Carousel", () => { test.each<{ tab: string; params: FeaturedRequest }>([ { tab: "All", - params: { limit: 12, resource_type: ["course"] }, + params: { limit: 12 }, }, { tab: "Free", - params: { limit: 12, resource_type: ["course"], free: true }, + params: { limit: 12, free: true }, }, { tab: "With Certificate", params: { - resource_type: ["course"], limit: 12, certification: true, professional: false, @@ -132,7 +131,7 @@ describe("Home Page Carousel", () => { }, { tab: "Professional & Executive Learning", - params: { resource_type: ["course"], limit: 12, professional: true }, + params: { limit: 12, professional: true }, }, ])("Featured Courses Carousel Tabs", async ({ tab, params }) => { const resources = learningResources.resources({ count: 12 }) @@ -140,7 +139,7 @@ describe("Home Page Carousel", () => { // The "All" tab is initially visible, so it needs a response. setMockResponse.get( - urls.learningResources.featured({ limit: 12, resource_type: ["course"] }), + urls.learningResources.featured({ limit: 12 }), learningResources.resources({ count: 0 }), ) // This is for the clicked tab (which might be "All") diff --git a/frontends/mit-open/src/pages/HomePage/carousels.ts b/frontends/mit-open/src/pages/HomePage/carousels.ts index de65f61727..fd7c461c12 100644 --- a/frontends/mit-open/src/pages/HomePage/carousels.ts +++ b/frontends/mit-open/src/pages/HomePage/carousels.ts @@ -2,7 +2,6 @@ import type { ResourceCarouselProps } from "@/page-components/ResourceCarousel/R import type { FeaturedApiFeaturedListRequest as FeaturedListParams } from "api" const FEATURED_COMMON_PARAMS: FeaturedListParams = { - resource_type: ["course"], limit: 12, } const FEATURED_RESOURCES_CAROUSEL: ResourceCarouselProps["config"] = [