Skip to content

Commit

Permalink
Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Feb 28, 2022
1 parent 5b8a123 commit 366cf37
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 14 additions & 1 deletion packages/web-app-files/tests/unit/views/spaces/Project.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Files from '@/__fixtures__/files'
import mockAxios from 'jest-mock-axios'
import SpaceProject from '../../../../src/views/spaces/Project.vue'
import Vuex from 'vuex'
import {ShareTypes, spaceManager} from "../../../../src/helpers/share";

localVue.use(GetTextPlugin, {
translations: 'does-not-matter.json',
Expand Down Expand Up @@ -54,6 +55,18 @@ const spaceMocks = {
}
}

const spaceShare = {
id: '1',
shareType: ShareTypes.space.value,
collaborator: {
onPremisesSamAccountName: 'Alice',
displayName: 'alice'
},
role: {
name: spaceManager.name
}
}

describe('Spaces project view', () => {
it('should not show anything if space can not be found', async () => {
mockAxios.request.mockImplementationOnce(() => {
Expand Down Expand Up @@ -226,7 +239,7 @@ function getMountedWrapper(spaceResources = [], spaceItem = null) {
selectedFiles: () => [],
totalFilesSize: () => 10,
pages: () => 1,
currentFileOutgoingCollaborators: () => []
currentFileOutgoingCollaborators: () => [spaceShare]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ exports[`Spaces project view space readme should show if given 1`] = `
<div>
<div class="oc-flex oc-flex-middle">
<h1 class="space-overview-name oc-my-s oc-mr-s">space</h1>
<!---->
<oc-button-stub type="button" size="medium" arialabel="Show invited people" variation="passive" appearance="raw" justifycontent="center" gapsize="medium">
<oc-icon-stub name="group" filltype="line" accessiblelabel="" type="span" size="small" variation="passive" color=""></oc-icon-stub> <span class="space-overview-people-count oc-text-small">1 invited person</span>
</oc-button-stub>
</div>
<!---->
<div>
Expand Down

0 comments on commit 366cf37

Please sign in to comment.