Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 4c87798

Browse files
committed
fix filesystem story and update mock data
1 parent dab9b6b commit 4c87798

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

src/components/pages/filesytem/Filesystem.stories.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,21 @@ import MockAdapter from "axios-mock-adapter";
1010
import axios from "axios";
1111
import folderContentMock from "./__tests__/folderContentMock.json";
1212

13-
const mock = new MockAdapter(axios);
1413
const API_REQUEST = hostname + filesystemPath + "contents";
1514

1615
storiesOf("Filesystem", module).add("default", () => {
17-
mock.onGet(API_REQUEST).reply(200, folderContentMock);
18-
return (
19-
<Provider store={store}>
20-
<BrowserRouter>
21-
<FileSystem />
22-
</BrowserRouter>
23-
</Provider>
24-
);
16+
// @ts-ignore
17+
18+
const mock = new MockAdapter(axios);
19+
mock.onGet(API_REQUEST).reply(200, folderContentMock, {
20+
"x-ff-current": "3"
21+
});
22+
23+
return (
24+
<Provider store={store}>
25+
<BrowserRouter>
26+
<FileSystem />
27+
</BrowserRouter>
28+
</Provider>
29+
);
2530
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"fileSystemId":2,"path":"/dummyFile.txt","name":"dummyFile.txt","size":420.0,"createdByUser":{"userId":1,"username":"Zorro","groups":["ADMIN"]},"lastUpdatedBy":1612088407,"type":"TEXT","shared":false},{"fileSystemId":3,"path":"/SomeFolder","name":"SomeFolder","size":4446.0,"createdByUser":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":1612088407,"type":"FOLDER","shared":false}]
1+
[{"fileSystemId":594,"path":"/admin/bike2dh/.git","name":".git","size":2.8742263E7,"owner":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdated":1621493233,"type":"FOLDER","mimeType":null,"shared":false},{"fileSystemId":667,"path":"/admin/bike2dh/.idea","name":".idea","size":1153.0,"owner":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdated":1621493233,"type":"FOLDER","mimeType":null,"shared":false},{"fileSystemId":674,"path":"/admin/bike2dh/.gitignore","name":".gitignore","size":215.0,"owner":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdated":1621493233,"type":"APPLICATION","mimeType":"application/octet-stream","shared":false},{"fileSystemId":675,"path":"/admin/bike2dh/client","name":"client","size":1.2949691E7,"owner":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdated":1621493251,"type":"FOLDER","mimeType":null,"shared":false},{"fileSystemId":864,"path":"/admin/bike2dh/server","name":"server","size":252872.0,"owner":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdated":1621493253,"type":"FOLDER","mimeType":null,"shared":false},{"fileSystemId":900,"path":"/admin/bike2dh/build.sh","name":"build.sh","size":510.0,"owner":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdated":1621493253,"type":"TEXT","mimeType":"text/x-sh","shared":false},{"fileSystemId":901,"path":"/admin/bike2dh/build_local.sh","name":"build_local.sh","size":265.0,"owner":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdated":1621493253,"type":"TEXT","mimeType":"text/x-sh","shared":false},{"fileSystemId":902,"path":"/admin/bike2dh/.github","name":".github","size":384242.0,"owner":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdated":1621493256,"type":"FOLDER","mimeType":null,"shared":false},{"fileSystemId":966,"path":"/admin/bike2dh/readme.md","name":"README.md","size":3532.0,"owner":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdated":1621493256,"type":"APPLICATION","mimeType":"application/octet-stream","shared":false},{"fileSystemId":967,"path":"/admin/bike2dh/.prettierignore","name":".prettierignore","size":125.0,"owner":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdatedBy":{"userId":1,"username":"Admin","groups":["ADMIN"]},"lastUpdated":1621493256,"type":"APPLICATION","mimeType":"application/octet-stream","shared":false}]

0 commit comments

Comments
 (0)