11import React from 'react' ;
22import { render , screen , waitFor } from '@testing-library/react' ;
33
4- import { withUserProvider , mockUser } from '../fixtures' ;
4+ import { withAuth0Provider , mockUser } from '../fixtures' ;
55import Profile from '../../app/profile/page' ;
66
77describe ( 'profile' , ( ) => {
88 it ( 'should render without crashing' , async ( ) => {
9- render ( < Profile /> , { wrapper : withUserProvider ( { user : mockUser } ) } ) ;
9+ render ( < Profile /> , { wrapper : withAuth0Provider ( { user : mockUser } ) } ) ;
1010
1111 expect ( screen . queryByTestId ( 'loading' ) ) . not . toBeInTheDocument ( ) ;
1212 expect ( screen . getByTestId ( 'profile' ) ) . toBeInTheDocument ( ) ;
@@ -16,14 +16,14 @@ describe('profile', () => {
1616 } ) ;
1717
1818 it ( 'should render a spinner when the user is loading' , async ( ) => {
19- render ( < Profile /> , { wrapper : withUserProvider ( { user : undefined } ) } ) ;
19+ render ( < Profile /> , { wrapper : withAuth0Provider ( { user : undefined } ) } ) ;
2020
2121 waitFor ( ( ) => screen . getByTestId ( 'loading' ) . toBeInTheDocument ( ) ) ;
2222 waitFor ( ( ) => screen . queryByTestId ( 'profile' ) . not . toBeInTheDocument ( ) ) ;
2323 } ) ;
2424
2525 it ( 'should render the user profile' , async ( ) => {
26- render ( < Profile /> , { wrapper : withUserProvider ( { user : mockUser } ) } ) ;
26+ render ( < Profile /> , { wrapper : withAuth0Provider ( { user : mockUser } ) } ) ;
2727
2828 waitFor ( ( ) => screen . queryByTestId ( 'loading' ) . not . toBeInTheDocument ( ) ) ;
2929 Object . keys ( mockUser ) . forEach ( key => {
0 commit comments