@@ -7,9 +7,9 @@ import { render, routerWrapperBuilder, screen } from '../../test-support/test-ut
77import ProposedSolutionsList from '../../../pages/ChangeRequestDetailPage/ProposedSolutionsList' ;
88import { ProposedSolution } from 'shared' ;
99import { exampleAdminUser , exampleLeadershipUser } from '../../test-support/test-data/users.stub' ;
10- import * as authHooks from '../../../hooks/auth.hooks' ;
11- import { mockAuth } from '../../test-support/test-data/test-utils.stub' ;
1210import { ToastProvider } from '../../../components/Toast/ToastProvider' ;
11+ import AppContextUser from '../../../app/AppContextUser' ;
12+ import * as userHooks from '../../../hooks/users.hooks' ;
1313
1414const exampleProposedSolution1 : ProposedSolution = {
1515 id : '1' ,
@@ -41,17 +41,19 @@ const exampleProposedSolutions = [exampleProposedSolution1, exampleProposedSolut
4141const renderComponent = ( proposedSolutions : ProposedSolution [ ] = [ ] , crReviewed : boolean | undefined = undefined ) => {
4242 const RouterWrapper = routerWrapperBuilder ( { } ) ;
4343 return render (
44- < RouterWrapper >
45- < ToastProvider >
46- < ProposedSolutionsList proposedSolutions = { proposedSolutions } crReviewed = { crReviewed } crId = { 0 } /> { ' ' }
47- </ ToastProvider >
48- </ RouterWrapper >
44+ < AppContextUser >
45+ < RouterWrapper >
46+ < ToastProvider >
47+ < ProposedSolutionsList proposedSolutions = { proposedSolutions } crReviewed = { crReviewed } crId = { 0 } /> { ' ' }
48+ </ ToastProvider >
49+ </ RouterWrapper >
50+ </ AppContextUser >
4951 ) ;
5052} ;
5153
5254describe ( 'Proposed Solutions List Test Suite' , ( ) => {
5355 beforeEach ( ( ) => {
54- vi . spyOn ( authHooks , 'useAuth ' ) . mockReturnValue ( mockAuth ( false , exampleAdminUser ) ) ;
56+ vi . spyOn ( userHooks , 'useCurrentUser ' ) . mockReturnValue ( exampleAdminUser ) ;
5557 } ) ;
5658
5759 it ( 'Renders correctly when not empty and CR is not reviewed' , ( ) => {
0 commit comments