File tree 1 file changed +5
-3
lines changed
site/src/pages/WorkspacePage 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import { server } from "testHelpers/server";
22
22
import { WorkspacePage } from "./WorkspacePage" ;
23
23
24
24
// It renders the workspace page and waits for it be loaded
25
- const renderWorkspacePage = async ( ) => {
25
+ const renderWorkspacePage = async ( mockWorkspace = MockWorkspace ) => {
26
26
jest . spyOn ( api , "getTemplate" ) . mockResolvedValueOnce ( MockTemplate ) ;
27
27
jest . spyOn ( api , "getTemplateVersionRichParameters" ) . mockResolvedValueOnce ( [ ] ) ;
28
28
jest
@@ -34,11 +34,13 @@ const renderWorkspacePage = async () => {
34
34
options . onDone && options . onDone ( ) ;
35
35
return new WebSocket ( "" ) ;
36
36
} ) ;
37
+
37
38
renderWithAuth ( < WorkspacePage /> , {
38
- route : `/@${ MockWorkspace . owner_name } /${ MockWorkspace . name } ` ,
39
+ route : `/@${ mockWorkspace . owner_name } /${ mockWorkspace . name } ` ,
39
40
path : "/:username/:workspace" ,
40
41
} ) ;
41
- await screen . findByText ( MockWorkspace . name ) ;
42
+
43
+ await screen . findByText ( mockWorkspace . name ) ;
42
44
} ;
43
45
44
46
/**
You can’t perform that action at this time.
0 commit comments