Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] fix log output of unit test in FileShares.spec #6722

Merged
merged 1 commit into from
Apr 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Collaborators from '@/__fixtures__/collaborators'
import mockAxios from 'jest-mock-axios'
import { spaceRoleManager } from '../../../../../src/helpers/share'
import VueCompositionAPI from '@vue/composition-api/dist/vue-composition-api'
import * as reactivities from 'web-pkg/src/composables/reactivity'

const localVue = createLocalVue()
localVue.use(DesignSystem)
Expand All @@ -18,6 +19,8 @@ localVue.use(GetTextPlugin, {
silent: true
})

jest.mock('web-pkg/src/composables/reactivity')

const user = Users.alice
const collaborators = [Collaborators[0], Collaborators[1]]

Expand Down Expand Up @@ -269,7 +272,6 @@ function getMountedWrapper(data, loading = false) {
localVue,
store: createStore(data),
mocks: {
sharesLoading: loading,
$route: {
params: { storageId: 1 }
},
Expand All @@ -292,6 +294,8 @@ function getMountedWrapper(data, loading = false) {
}

function getShallowMountedWrapper(data, loading = false) {
reactivities.useDebouncedRef.mockImplementationOnce(() => loading)

return shallowMount(FileShares, {
localVue,
store: createStore(data),
Expand All @@ -301,7 +305,6 @@ function getShallowMountedWrapper(data, loading = false) {
'oc-spinner': true
},
mocks: {
sharesLoading: loading,
$route: {
params: {
storageId: 1
Expand Down