File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -72,10 +72,11 @@ const meta: Meta<typeof TaskPage> = {
7272 reactRouter : reactRouterParameters ( {
7373 location : {
7474 pathParams : {
75- taskId : MockTasks [ 0 ] . id ,
75+ username : MockTask . owner_name ,
76+ taskId : MockTask . id ,
7677 } ,
7778 } ,
78- routing : { path : "/tasks/:taskId" } ,
79+ routing : { path : "/tasks/:username/: taskId" } ,
7980 } ) ,
8081 } ,
8182} ;
@@ -89,6 +90,14 @@ export const LoadingTask: Story = {
8990 ( ) => new Promise ( ( ) => { } ) ,
9091 ) ;
9192 } ,
93+ play : async ( ) => {
94+ await waitFor ( ( ) => {
95+ expect ( API . experimental . getTask ) . toHaveBeenCalledWith (
96+ MockTask . owner_name ,
97+ MockTask . id ,
98+ ) ;
99+ } ) ;
100+ } ,
92101} ;
93102
94103export const LoadingWorkspace : Story = {
Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ const TaskPageLayout: FC<PropsWithChildren> = ({ children }) => {
5555} ;
5656
5757const TaskPage = ( ) => {
58- const { task : taskId , username } = useParams ( ) as {
59- task : string ;
58+ const { taskId, username } = useParams ( ) as {
59+ taskId : string ;
6060 username : string ;
6161 } ;
6262 const { data : task , ...taskQuery } = useQuery ( {
You can’t perform that action at this time.
0 commit comments