Skip to content

Commit

Permalink
play around
Browse files Browse the repository at this point in the history
  • Loading branch information
dschmidt committed Nov 18, 2022
1 parent 3750da0 commit c0e9450
Show file tree
Hide file tree
Showing 23 changed files with 446 additions and 68 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@noble/hashes": "1.1.3",
"@ownclouders/design-system": "workspace:*",
"@ownclouders/babel-preset": "workspace:*",
"@ownclouders/design-system": "workspace:*",
"@ownclouders/eslint-config": "workspace:*",
"@ownclouders/prettier-config": "workspace:*",
"@ownclouders/tsconfig": "workspace:*",
Expand Down Expand Up @@ -85,10 +85,10 @@
"focus-trap": "6.9.4",
"focus-trap-vue": "1.1.1",
"git-repo-info": "2.1.1",
"happy-dom": "^7.7.0",
"jest": "29.3.1",
"jest-axe": "5.0.1",
"jest-environment-jsdom": "29.3.1",
"vitest-fetch-mock": "0.2.1",
"jest-mock-axios": "4.6.2",
"jest-mock-extended": "3.0.1",
"jest-serializer-vue": "2.0.2",
Expand Down Expand Up @@ -122,10 +122,11 @@
"tslib": "2.4.1",
"typescript": "4.9.3",
"url-search-params-polyfill": "8.1.1",
"vue-gettext": "2.1.12",
"vite": "3.2.3",
"vite-plugin-environment": "^1.1.3",
"vitest": "^0.25.2",
"vitest-fetch-mock": "0.2.1",
"vue-gettext": "2.1.12",
"vue-tsc": "1.0.9",
"vuex-mock-store": "0.0.8",
"wait-for-expect": "3.0.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"vue-inline-svg": "^2.0.0",
"vue-jest": "^3.0.4",
"vue-loader": "^15.9.0",
"vue-select": "^3.12.0",
"vue-select": "3.20.0",
"vue-style-loader": "^4.1.2",
"vue-styleguidist": "^4.44.2",
"vue": "2.7.14",
Expand All @@ -136,7 +136,7 @@
"v-calendar": "^2.3.2",
"vue": "^2.7.13",
"vue-inline-svg": "^2.0.0",
"vue-select": "^3.12.0",
"vue-select": "3.20.0",
"webfontloader": "^1.6.28"
},
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Fuse from 'fuse.js'
import uniqueId from '../../utils/uniqueId'
import VueSelect from 'vue-select'
import 'vue-select/dist/vue-select.css'
import { nextTick } from 'vue'
/**
* Select component with a trigger and dropdown based on [Vue Select](https://vue-select.org/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import DesignSystem from '@ownclouders/design-system'
import GetTextPlugin from 'vue-gettext'

import stubs from '@/tests/unit/stubs'
import CreateAndUpload from 'web-app-files/src/components/AppBar/CreateAndUpload'
import CreateAndUpload from 'web-app-files/src/components/AppBar/CreateAndUpload.vue'
import { createLocationSpaces } from '../../../../src/router'
import { ResolveStrategy, ResourcesUpload } from '../../../../src/helpers/resource'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import GetTextPlugin from 'vue-gettext'

import stubs from '@/tests/unit/stubs'

import SharesNavigation from 'web-app-files/src/components/AppBar/SharesNavigation'
import SharesNavigation from 'web-app-files/src/components/AppBar/SharesNavigation.vue'

const localVue = createLocalVue()
localVue.use(Vuex)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1

exports[`SharesNavigation component > renders a shares navigation for both mobile and a desktop viewports 1`] = `
VueWrapper {
"_emitted": {
"hook:beforeCreate": [
[],
],
"hook:beforeMount": [
[],
],
"hook:created": [
[],
],
"hook:mounted": [
[],
],
},
"_emittedByOrder": [
{
"args": [],
"name": "hook:beforeCreate",
},
{
"args": [],
"name": "hook:created",
},
{
"args": [],
"name": "hook:beforeMount",
},
{
"args": [],
"name": "hook:mounted",
},
],
"isFunctionalComponent": undefined,
}
`;

exports[`SharesNavigation component renders a shares navigation for both mobile and a desktop viewports 1`] = `
<nav id="shares-navigation" aria-label="Shares pages navigation" class="oc-py-s">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1

exports[`ContextActions > menu items > renders a list of actions for a file 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`ContextActions > menu items > renders a list of actions for a folder 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`ContextActions menu items renders a list of actions for a file 1`] = `
<div id="oc-files-context-menu">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,100 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1

exports[`Details SideBar Panel > displays a resource of type file > on a private page > updates when the shareTree updates 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type file > on a private page > updates when the shareTree updates 2`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type file > on a private page > with timestamp, size info and (me) as owner 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type file > on a private page > with timestamp, size info, share info, share date and preview 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type file > on a private page > with timestamp, size info, share info, share date and preview running on eos 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type file > on a public page > with owner, timestamp, size info, no share info and preview 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type file > on a public page > with owner, timestamp, size info, no share info and preview running on eos 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type folder > on a private page > with timestamp, size info and (me) as owner 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type folder > on a private page > with timestamp, size info, share info and share date 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type folder > on a private page > with timestamp, size info, share info and share date running on eos 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type folder > on a public page > with owner, timestamp, size info and no share info 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel > displays a resource of type folder > on a public page > with owner, timestamp, size info and no share info running on eos 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel displays a resource of type file on a private page updates when the shareTree updates 1`] = `
<div id="oc-file-details-sidebar">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1

exports[`Details SideBar Panel > displays the details side panel 1`] = `
VueWrapper {
"_emitted": {},
"_emittedByOrder": [],
"isFunctionalComponent": undefined,
}
`;

exports[`Details SideBar Panel displays the details side panel 1`] = `
<div id="oc-space-details-sidebar">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import DesignSystem from '@ownclouders/design-system'
import stubs from '../../../../../../../../../tests/unit/stubs'
import { mockDeep } from 'jest-mock-extended'
import { ClientService } from 'web-pkg/src'
import { vi as jest } from 'vitest'

// console.log('FORM', InviteCollaboratorForm)

const localVue = createLocalVue()
localVue.use(GetTextPlugin, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1

exports[`InviteCollaborator RecipientContainer displays an avatar image if capability is present 1`] = `
exports[`InviteCollaborator RecipientContainer > displays an avatar image if capability is present 1`] = `
<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-Albert Einstein"><span width="16.8" aria-hidden="true" focusable="false" data-test-user-name="Albert Einstein" class="vue-avatar--wrapper oc-avatar oc-recipient-avatar" style="width: 16.8px; height: 16.8px; line-height: 16.8px; background-color: rgb(194, 28, 83); font-size: 6px; font-family: Helvetica, Arial, sans-serif; color: white;" data-testid="recipient-avatar"><span class="avatarInitials">AE</span></span>
<p data-testid="recipient-name" class="oc-recipient-name">Albert Einstein</p> <button aria-label="Deselect Albert Einstein" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw">
<p data-testid="recipient-name" class="oc-recipient-name">Albert Einstein</p><button aria-label="Deselect Albert Einstein" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw">
<ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub>
</button></span>
`;

exports[`InviteCollaborator RecipientContainer renders a recipient with a deselect button different recipients for different shareTypes 1`] = `<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-Albert Einstein"><ocicon-stub name="user" filltype="fill" accessiblelabel="User" type="span" size="small" variation="passive" color="" data-testid="recipient-icon" class="oc-recipient-icon"></ocicon-stub> <p data-testid="recipient-name" class="oc-recipient-name">Albert Einstein</p> <button aria-label="Deselect Albert Einstein" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw"><ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub></button></span>`;
exports[`InviteCollaborator RecipientContainer > renders a recipient with a deselect button > different recipients for different shareTypes 1`] = `<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-Albert Einstein"><ocicon-stub name="user" filltype="fill" accessiblelabel="User" type="span" size="small" variation="passive" color="" data-testid="recipient-icon" class="oc-recipient-icon"></ocicon-stub><p data-testid="recipient-name" class="oc-recipient-name">Albert Einstein</p><button aria-label="Deselect Albert Einstein" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw"><ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub></button></span>`;

exports[`InviteCollaborator RecipientContainer renders a recipient with a deselect button different recipients for different shareTypes 2`] = `<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-physics-lovers"><ocicon-stub name="user" filltype="fill" accessiblelabel="User" type="span" size="small" variation="passive" color="" data-testid="recipient-icon" class="oc-recipient-icon"></ocicon-stub> <p data-testid="recipient-name" class="oc-recipient-name">physics-lovers</p> <button aria-label="Deselect physics-lovers" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw"><ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub></button></span>`;
exports[`InviteCollaborator RecipientContainer > renders a recipient with a deselect button > different recipients for different shareTypes 2`] = `<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-physics-lovers"><ocicon-stub name="user" filltype="fill" accessiblelabel="User" type="span" size="small" variation="passive" color="" data-testid="recipient-icon" class="oc-recipient-icon"></ocicon-stub><p data-testid="recipient-name" class="oc-recipient-name">physics-lovers</p><button aria-label="Deselect physics-lovers" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw"><ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub></button></span>`;

exports[`InviteCollaborator RecipientContainer renders a recipient with a deselect button different recipients for different shareTypes 3`] = `<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-guest-user"><ocicon-stub name="user" filltype="fill" accessiblelabel="User" type="span" size="small" variation="passive" color="" data-testid="recipient-icon" class="oc-recipient-icon"></ocicon-stub> <p data-testid="recipient-name" class="oc-recipient-name">guest-user</p> <button aria-label="Deselect guest-user" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw"><ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub></button></span>`;
exports[`InviteCollaborator RecipientContainer > renders a recipient with a deselect button > different recipients for different shareTypes 3`] = `<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-guest-user"><ocicon-stub name="user" filltype="fill" accessiblelabel="User" type="span" size="small" variation="passive" color="" data-testid="recipient-icon" class="oc-recipient-icon"></ocicon-stub><p data-testid="recipient-name" class="oc-recipient-name">guest-user</p><button aria-label="Deselect guest-user" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw"><ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub></button></span>`;

exports[`InviteCollaborator RecipientContainer renders a recipient with a deselect button different recipients for different shareTypes 4`] = `<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-remote-user"><ocicon-stub name="user" filltype="fill" accessiblelabel="User" type="span" size="small" variation="passive" color="" data-testid="recipient-icon" class="oc-recipient-icon"></ocicon-stub> <p data-testid="recipient-name" class="oc-recipient-name">remote-user</p> <button aria-label="Deselect remote-user" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw"><ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub></button></span>`;
exports[`InviteCollaborator RecipientContainer > renders a recipient with a deselect button > different recipients for different shareTypes 4`] = `<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-remote-user"><ocicon-stub name="user" filltype="fill" accessiblelabel="User" type="span" size="small" variation="passive" color="" data-testid="recipient-icon" class="oc-recipient-icon"></ocicon-stub><p data-testid="recipient-name" class="oc-recipient-name">remote-user</p><button aria-label="Deselect remote-user" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw"><ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub></button></span>`;

exports[`InviteCollaborator RecipientContainer renders a recipient with a deselect button different recipients for different shareTypes 5`] = `<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-Albert Einstein"><ocicon-stub name="user" filltype="fill" accessiblelabel="User" type="span" size="small" variation="passive" color="" data-testid="recipient-icon" class="oc-recipient-icon"></ocicon-stub> <p data-testid="recipient-name" class="oc-recipient-name">Albert Einstein</p> <button aria-label="Deselect Albert Einstein" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw"><ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub></button></span>`;
exports[`InviteCollaborator RecipientContainer > renders a recipient with a deselect button > different recipients for different shareTypes 5`] = `<span class="oc-recipient files-share-invite-recipient" data-testid="recipient-container-Albert Einstein"><ocicon-stub name="user" filltype="fill" accessiblelabel="User" type="span" size="small" variation="passive" color="" data-testid="recipient-icon" class="oc-recipient-icon"></ocicon-stub><p data-testid="recipient-name" class="oc-recipient-name">Albert Einstein</p><button aria-label="Deselect Albert Einstein" type="button" class="files-share-invite-recipient-btn-remove oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw"><ocicon-stub name="close" filltype="fill" accessiblelabel="" type="span" size="small" variation="passive" color=""></ocicon-stub></button></span>`;
Loading

0 comments on commit c0e9450

Please sign in to comment.