From dc0ec6bd4660e867a82641e8913f908f9ec2bb13 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sat, 14 Jan 2023 18:13:22 +0100 Subject: [PATCH] Fix types and tests --- .../__snapshots__/OcBreadcrumb.spec.ts.snap | 16 +++---- .../tests/unit/components/AppTemplate.spec.ts | 4 +- .../web-app-external/tests/unit/app.spec.ts | 3 +- packages/web-app-files/src/router/common.ts | 6 +-- .../web-app-files/src/router/deprecated.ts | 19 +++++--- packages/web-app-files/src/router/index.ts | 5 ++- packages/web-app-files/src/router/public.ts | 6 +-- packages/web-app-files/src/router/shares.ts | 6 +-- packages/web-app-files/src/router/spaces.ts | 6 +-- packages/web-app-files/src/router/trash.ts | 6 +-- packages/web-app-files/src/router/utils.ts | 14 +++--- packages/web-app-files/src/services/folder.ts | 2 +- .../src/services/folder/loaderFavorites.ts | 2 +- .../services/folder/loaderSharedViaLink.ts | 2 +- .../src/services/folder/loaderSharedWithMe.ts | 2 +- .../services/folder/loaderSharedWithOthers.ts | 2 +- .../unit/components/AppBar/AppBar.spec.ts | 7 +-- .../components/AppBar/CreateAndUpload.spec.ts | 5 ++- .../AppBar/SharesNavigation.spec.ts | 17 ++++--- .../unit/components/SideBar/FileInfo.spec.ts | 5 ++- .../InviteCollaboratorForm.spec.ts | 6 ++- .../SideBar/Shares/FileShares.spec.ts | 7 ++- .../SideBar/Shares/SpaceMembers.spec.ts | 7 ++- .../unit/components/SideBar/SideBar.spec.ts | 5 ++- .../Spaces/SpaceContextActions.spec.ts | 6 ++- .../driveResolver/useDriveResolver.spec.ts | 23 +++++++--- .../composables/scrollTo/useScrollTo.spec.ts | 14 +++--- .../upload/useUploadHelpers.spec.ts | 7 +-- .../unit/mixins/actions/acceptShare.spec.ts | 7 ++- .../tests/unit/mixins/actions/delete.spec.ts | 6 ++- .../tests/unit/mixins/spaces/setImage.spec.ts | 9 ++-- .../unit/mixins/spaces/uploadImage.spec.ts | 9 ++-- .../tests/unit/router/utils.spec.ts | 45 +++++++++++++------ .../tests/unit/search/sdk.spec.ts | 5 ++- .../tests/unit/views/Favorites.spec.ts | 5 ++- .../tests/unit/views/FilesDrop.spec.ts | 6 ++- .../unit/views/shares/SharedViaLink.spec.ts | 7 +-- .../unit/views/shares/SharedWithMe.spec.ts | 6 +-- .../views/shares/SharedWithOthers.spec.ts | 6 +-- .../unit/views/spaces/DriveResolver.spec.ts | 10 +++-- .../unit/views/spaces/GenericSpace.spec.ts | 5 ++- .../unit/views/spaces/GenericTrash.spec.ts | 7 +-- .../tests/unit/views/spaces/Projects.spec.ts | 7 +-- .../src/composables/appDefaults/types.ts | 5 ++- .../appDefaults/useAppDocumentTitle.ts | 6 +-- .../appDefaults/useAppFolderHandling.ts | 4 +- .../appDefaults/useAppNavigation.ts | 8 ++-- .../src/composables/authContext/useRequest.ts | 5 +-- .../web-pkg/src/composables/router/types.ts | 1 - .../src/composables/router/useActiveApp.ts | 5 ++- .../composables/router/useFileRouteReplace.ts | 2 +- .../src/composables/router/useRouteName.ts | 2 +- .../src/composables/router/useRouteQuery.ts | 3 +- .../src/helpers/router/routeOptions.ts | 12 ++--- .../composables/router/useRouteQuery.spec.ts | 35 ++++++++++----- .../tests/unit/mixins/spaces/delete.spec.ts | 9 ++-- .../tests/unit/mixins/spaces/disable.spec.ts | 9 ++-- .../mixins/spaces/editDescription.spec.ts | 9 ++-- .../tests/unit/mixins/spaces/navigate.spec.ts | 6 ++- .../tests/unit/mixins/spaces/rename.spec.ts | 9 ++-- .../tests/unit/mixins/spaces/restore.spec.ts | 9 ++-- .../unit/mixins/spaces/setReadme.spec.ts | 9 ++-- packages/web-runtime/src/container/api.ts | 12 ++--- packages/web-runtime/src/container/types.ts | 6 +-- packages/web-runtime/src/router/helpers.ts | 44 ++++++++++-------- packages/web-runtime/src/router/index.ts | 2 +- .../web-runtime/src/router/setupAuthGuard.ts | 4 +- .../src/services/auth/authService.ts | 6 +-- .../tests/unit/router/index.spec.ts | 2 + packages/web-test-helpers/src/helpers.ts | 11 ++++- .../src/mocks/defaultComponentMocks.ts | 16 +++---- tests/unit/config/jest.init.js | 7 +-- 72 files changed, 376 insertions(+), 232 deletions(-) diff --git a/packages/design-system/src/components/OcBreadcrumb/__snapshots__/OcBreadcrumb.spec.ts.snap b/packages/design-system/src/components/OcBreadcrumb/__snapshots__/OcBreadcrumb.spec.ts.snap index 57edbec70e2..b47e417a253 100644 --- a/packages/design-system/src/components/OcBreadcrumb/__snapshots__/OcBreadcrumb.spec.ts.snap +++ b/packages/design-system/src/components/OcBreadcrumb/__snapshots__/OcBreadcrumb.spec.ts.snap @@ -4,7 +4,7 @@ exports[`OcBreadcrumb displays all items 1`] = `