@@ -8,15 +8,15 @@ import {
88} from "@/test-utils"
99import LearningResourceDrawerV2 from "./LearningResourceDrawerV2"
1010import { urls , factories , setMockResponse } from "api/test-utils"
11- import { LearningResourceExpanded } from "ol-components"
11+ import { LearningResourceExpandedV2 } from "ol-components"
1212import { RESOURCE_DRAWER_QUERY_PARAM } from "@/common/urls"
1313import { ResourceTypeEnum } from "api"
1414
1515jest . 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