Skip to content

Commit c42b84a

Browse files
committed
fix tests
1 parent f198879 commit c42b84a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

frontends/main/src/page-components/LearningResourceDrawer/LearningResourceDrawerV2.test.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import {
88
} from "@/test-utils"
99
import LearningResourceDrawerV2 from "./LearningResourceDrawerV2"
1010
import { urls, factories, setMockResponse } from "api/test-utils"
11-
import { LearningResourceExpanded } from "ol-components"
11+
import { LearningResourceExpandedV2 } from "ol-components"
1212
import { RESOURCE_DRAWER_QUERY_PARAM } from "@/common/urls"
1313
import { ResourceTypeEnum } from "api"
1414

1515
jest.mock("ol-components", () => {
1616
const actual = jest.requireActual("ol-components")
1717
return {
1818
...actual,
19-
LearningResourceExpanded: jest.fn(actual.LearningResourceExpanded),
19+
LearningResourceExpandedV2: jest.fn(actual.LearningResourceExpandedV2),
2020
}
2121
})
2222

@@ -52,9 +52,9 @@ describe("LearningResourceDrawerV2", () => {
5252
renderWithProviders(<LearningResourceDrawerV2 />, {
5353
url: `?dog=woof&${RESOURCE_DRAWER_QUERY_PARAM}=${resource.id}`,
5454
})
55-
expect(LearningResourceExpanded).toHaveBeenCalled()
55+
expect(LearningResourceExpandedV2).toHaveBeenCalled()
5656
await waitFor(() => {
57-
expectProps(LearningResourceExpanded, { resource })
57+
expectProps(LearningResourceExpandedV2, { resource })
5858
})
5959
await screen.findByText(resource.title)
6060

@@ -70,7 +70,7 @@ describe("LearningResourceDrawerV2", () => {
7070
renderWithProviders(<LearningResourceDrawerV2 />, {
7171
url: "?dog=woof",
7272
})
73-
expect(LearningResourceExpanded).not.toHaveBeenCalled()
73+
expect(LearningResourceExpandedV2).not.toHaveBeenCalled()
7474
})
7575

7676
test.each([
@@ -121,10 +121,10 @@ describe("LearningResourceDrawerV2", () => {
121121
url: `?resource=${resource.id}`,
122122
})
123123

124-
expect(LearningResourceExpanded).toHaveBeenCalled()
124+
expect(LearningResourceExpandedV2).toHaveBeenCalled()
125125

126126
await waitFor(() => {
127-
expectProps(LearningResourceExpanded, { resource })
127+
expectProps(LearningResourceExpandedV2, { resource })
128128
})
129129

130130
const section = screen.getByTestId("drawer-cta")

0 commit comments

Comments
 (0)