Skip to content

Commit 137d388

Browse files
committed
test: close toast for move operation
Signed-off-by: Anna Larch <anna@nextcloud.com>
1 parent 15344d9 commit 137d388

File tree

45 files changed

+2453
-12342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2453
-12342
lines changed

LICENSES/BlueOak-1.0.0.txt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Blue Oak Model License
2+
3+
Version 1.0.0
4+
5+
## Purpose
6+
7+
This license gives everyone as much permission to work with
8+
this software as possible, while protecting contributors
9+
from liability.
10+
11+
## Acceptance
12+
13+
In order to receive this license, you must agree to its
14+
rules. The rules of this license are both obligations
15+
under that agreement and conditions to your license.
16+
You must not do anything with this software that triggers
17+
a rule that you cannot or will not follow.
18+
19+
## Copyright
20+
21+
Each contributor licenses you to do everything with this
22+
software that would otherwise infringe that contributor's
23+
copyright in it.
24+
25+
## Notices
26+
27+
You must ensure that everyone who gets a copy of
28+
any part of this software from you, with or without
29+
changes, also gets the text of this license or a link to
30+
<https://blueoakcouncil.org/license/1.0.0>.
31+
32+
## Excuse
33+
34+
If anyone notifies you in writing that you have not
35+
complied with [Notices](#notices), you can keep your
36+
license by taking all practical steps to comply within 30
37+
days after the notice. If you do not do so, your license
38+
ends immediately.
39+
40+
## Patent
41+
42+
Each contributor licenses you to do everything with this
43+
software that would otherwise infringe any patent claims
44+
they can license or become able to license.
45+
46+
## Reliability
47+
48+
No contributor can revoke this license.
49+
50+
## No Liability
51+
52+
***As far as the law allows, this software comes as is,
53+
without any warranty or condition, and no contributor
54+
will be liable to anyone for any damages related to this
55+
software or this license, under any kind of legal claim.***

cypress/e2e/sidebar.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import { createFolder, getFileListRow, moveFile, navigateToFolder, renameFile } from './filesUtils.ts'
7-
import { addComment, addTag, createPublicShare, randHash, showActivityTab, toggleFavorite } from './sidebarUtils.ts'
7+
import { addComment, addTag, closeToasts, createPublicShare, randHash, showActivityTab, toggleFavorite } from './sidebarUtils.ts'
88

99
describe('Check activity listing in the sidebar', { testIsolation: true }, () => {
1010
beforeEach(function() {
@@ -56,8 +56,8 @@ describe('Check activity listing in the sidebar', { testIsolation: true }, () =>
5656
it('Has move activity', () => {
5757
createFolder('Test folder')
5858
moveFile('welcome.txt', 'Test folder')
59+
closeToasts()
5960
navigateToFolder('Test folder')
60-
6161
showActivityTab('welcome.txt')
6262
cy.get('.activity-entry').first().should('contains.text', 'You moved')
6363
})

cypress/e2e/sidebarUtils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export function closeSidebar() {
2424
.should('not.contain', 'opendetails')
2525
}
2626

27+
export function closeToasts() {
28+
cy.get('button.toast-close').click({ multiple: true })
29+
}
30+
2731
export function showActivityTab(fileName: string) {
2832
cy.intercept('GET', '/ocs/v2.php/apps/activity/api/v2/activity/filter**').as('getActivities')
2933

js/ActivityComponent.vue_vue_type_script_setup_true_lang-BPBYWpOt.chunk.mjs

Lines changed: 0 additions & 88 deletions
This file was deleted.

js/ActivityComponent.vue_vue_type_script_setup_true_lang-BPBYWpOt.chunk.mjs.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

js/ActivityComponent.vue_vue_type_script_setup_true_lang-DsNKTiYh.chunk.mjs

Lines changed: 88 additions & 0 deletions
Large diffs are not rendered by default.

js/ActivityComponent.vue_vue_type_script_setup_true_lang-BPBYWpOt.chunk.mjs.license renamed to js/ActivityComponent.vue_vue_type_script_setup_true_lang-DsNKTiYh.chunk.mjs.license

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This file is generated from multiple sources. Included packages:
3636
- version: 0.3.0
3737
- license: GPL-3.0-or-later
3838
- @nextcloud/vue
39-
- version: 9.3.1
39+
- version: 9.4.0
4040
- license: AGPL-3.0-or-later
4141
- @ungap/structured-clone
4242
- version: 1.3.0
@@ -60,7 +60,7 @@ This file is generated from multiple sources. Included packages:
6060
- version: 2.0.3
6161
- license: MIT
6262
- decode-named-character-reference
63-
- version: 1.1.0
63+
- version: 1.3.0
6464
- license: MIT
6565
- devlop
6666
- version: 1.1.0
@@ -84,7 +84,7 @@ This file is generated from multiple sources. Included packages:
8484
- version: 3.0.0
8585
- license: MIT
8686
- inline-style-parser
87-
- version: 0.2.4
87+
- version: 0.2.7
8888
- license: MIT
8989
- is-absolute-url
9090
- version: 4.0.1
@@ -195,10 +195,10 @@ This file is generated from multiple sources. Included packages:
195195
- version: 3.2.0
196196
- license: MIT
197197
- style-to-js
198-
- version: 1.1.16
198+
- version: 1.1.21
199199
- license: MIT
200200
- style-to-object
201-
- version: 1.0.8
201+
- version: 1.0.14
202202
- license: MIT
203203
- trim-lines
204204
- version: 3.0.1
@@ -216,7 +216,7 @@ This file is generated from multiple sources. Included packages:
216216
- version: 4.0.0
217217
- license: MIT
218218
- unist-util-is
219-
- version: 6.0.0
219+
- version: 6.0.1
220220
- license: MIT
221221
- unist-util-position
222222
- version: 5.0.0
@@ -225,19 +225,19 @@ This file is generated from multiple sources. Included packages:
225225
- version: 4.0.0
226226
- license: MIT
227227
- unist-util-visit
228-
- version: 5.0.0
228+
- version: 5.1.0
229229
- license: MIT
230230
- unist-util-visit-parents
231-
- version: 6.0.1
231+
- version: 6.0.2
232232
- license: MIT
233233
- vfile
234234
- version: 6.0.3
235235
- license: MIT
236236
- vfile-message
237-
- version: 4.0.2
237+
- version: 4.0.3
238238
- license: MIT
239239
- vite
240-
- version: 7.3.0
240+
- version: 7.3.1
241241
- license: MIT
242242
- vue-select
243243
- version: 4.0.0-beta.6

js/ActivityComponent.vue_vue_type_script_setup_true_lang-DsNKTiYh.chunk.mjs.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".activity[data-v-b6867024]{display:flex;flex-direction:column;overflow:hidden;height:100%}.activity__actions[data-v-b6867024]{display:flex;flex-direction:column;width:100%}.activity__list[data-v-b6867024]{flex-grow:1;overflow:scroll}.activity__empty-content[data-v-b6867024]{height:100%}[data-v-b6867024] .empty-content__icon span{background-size:64px;width:64px;height:64px}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2-
import{l as k}from"./activity-sidebar.mjs";import{h as P,e as N,g as j,d as I}from"./_plugin-vue_export-helper-DiB0wW6k.chunk.mjs";import{d as _,r as x,x as B,B as C,y as E,a as s,b as i,L as m,l as L,m as o,e as r,i as p,h as y,F as g,E as R,M as h,n as q}from"./index-6AAKmhoX.chunk.mjs";import{N as G,e as O,_ as V,A as T}from"./ActivityComponent.vue_vue_type_script_setup_true_lang-BPBYWpOt.chunk.mjs";import{g as W,a as F,b as M}from"./api-mFrM-9qG.chunk.mjs";import{l as f}from"./logger-1JHA8kGV.chunk.mjs";import"./preload-helper-DxYC2qmj.chunk.mjs";import"./index-NjYp13Ld.chunk.mjs";const U=_({__name:"ActivitySidebarPlugin",props:{plugin:{},node:{}},emits:["reload-activities"],setup(t,{emit:e}){const a=t,n=e,l=x();return B(()=>a.plugin.mount(l.value,{node:a.node,context:C()?.proxy??void 0,reload:()=>n("reload-activities")})),E(()=>a.plugin.unmount()),(b,d)=>(i(),s("div",{ref_key:"attachTarget",ref:l},null,512))}}),$=_({name:"ActivityTab",components:{ActivityComponent:V,NcEmptyContent:O,NcIconSvgWrapper:G,NcLoadingIcon:P,ActivitySidebarPlugin:U},props:{node:{type:Object,required:!0},folder:{type:Object,required:!1,default:void 0},view:{type:Object,required:!1,default:void 0}},expose:["update"],data(){return{error:"",loading:!0,activities:[],lightningBoltSVG:k,sidebarPlugins:[]}},watch:{node:{immediate:!0,async handler(){await this.update()}}},async mounted(){this.node&&await this.update()},methods:{async update(){this.sidebarPlugins=[];const t=M();t.length>0&&L(()=>{this.sidebarPlugins=t}),this.resetState(),await this.getActivities()},async getActivities(){try{this.loading=!0;const t=await this.processActivities(await this.loadRealActivities()),e=await F({node:this.node});this.activities=[...t,...e].sort((a,n)=>n.timestamp-a.timestamp)}catch(t){this.error=m("activity","Unable to load the activity list"),f.error("Error loading the activity list",{error:t})}finally{this.loading=!1}},resetState(){this.loading=!0,this.error="",this.activities=[]},async loadRealActivities(){try{const{data:t}=await N.get(j("apps/activity/api/v2/activity/filter"),{params:{format:"json",object_type:"files",object_id:this.node.fileid}});return t.ocs.data}catch(t){if(t.response!==void 0&&t.response.status===304)return[];throw t}},processActivities(t){t=t.map(a=>new T(a)),f.debug(`Processed ${t.length} activity(ies)`,{activities:t,node:this.node});const e=W();return t.filter(a=>!e||e.every(n=>n(a)))},t:m}}),z={key:0,class:"activity__actions"},D={key:3,class:"activity__list"};function H(t,e,a,n,l,b){const d=o("NcIconSvgWrapper"),v=o("NcEmptyContent"),A=o("ActivitySidebarPlugin"),w=o("NcLoadingIcon"),S=o("ActivityComponent");return i(),s("div",{class:q([{"icon-loading":t.loading},"activity"])},[t.error||!t.node?(i(),r(v,{key:0,name:t.error},{icon:p(()=>[y(d,{svg:t.lightningBoltSVG},null,8,["svg"])]),_:1},8,["name"])):(i(),s(g,{key:1},[t.sidebarPlugins.length>0?(i(),s("div",z,[(i(!0),s(g,null,h(t.sidebarPlugins,(c,u)=>(i(),r(A,{key:u,plugin:c,node:t.node,onReloadActivities:e[0]||(e[0]=J=>t.getActivities())},null,8,["plugin","node"]))),128))])):R("",!0),t.loading?(i(),r(v,{key:1,class:"activity__empty-content",name:t.t("activity","Loading activities")},{icon:p(()=>[y(w)]),_:1},8,["name"])):t.activities.length===0?(i(),r(v,{key:2,class:"activity__empty-content",name:t.t("activity","No activity yet")},{icon:p(()=>[y(d,{svg:t.lightningBoltSVG},null,8,["svg"])]),_:1},8,["name"])):(i(),s("ul",D,[(i(!0),s(g,null,h(t.activities,c=>(i(),r(S,{key:c.id,activity:c,"show-previews":!1,onReload:e[1]||(e[1]=u=>t.getActivities())},null,8,["activity"]))),128))]))],64))],2)}const at=I($,[["render",H],["__scopeId","data-v-b6867024"]]);export{at as default};
3-
//# sourceMappingURL=ActivityTab-6Gq3gTQ6.chunk.mjs.map
2+
import{l as k}from"./activity-sidebar.mjs";import{m as P,b as N,h as j,j as I,g as x}from"./_plugin-vue_export-helper-Bu_H2Odw.chunk.mjs";import{d as b,x as B,g as C,B as E,y as L,c as s,a as i,M as u,l as R,m as o,b as r,h as p,f as y,F as g,E as q,L as h,n as G}from"./index-B58hsLH5.chunk.mjs";import{N as O,_ as V,A as T}from"./ActivityComponent.vue_vue_type_script_setup_true_lang-DsNKTiYh.chunk.mjs";import{g as W,a as F,b as M}from"./api-mFrM-9qG.chunk.mjs";import{l as f}from"./logger-1JHA8kGV.chunk.mjs";import"./preload-helper-DxYC2qmj.chunk.mjs";import"./index-NjYp13Ld.chunk.mjs";const U=b({__name:"ActivitySidebarPlugin",props:{plugin:{},node:{}},emits:["reload-activities"],setup(t,{emit:e}){const a=t,n=e,l=C();return B(()=>a.plugin.mount(l.value,{node:a.node,context:E()?.proxy??void 0,reload:()=>n("reload-activities")})),L(()=>a.plugin.unmount()),(_,d)=>(i(),s("div",{ref_key:"attachTarget",ref:l},null,512))}}),$=b({name:"ActivityTab",components:{ActivityComponent:V,NcEmptyContent:O,NcIconSvgWrapper:N,NcLoadingIcon:P,ActivitySidebarPlugin:U},props:{node:{type:Object,required:!0},folder:{type:Object,required:!1,default:void 0},view:{type:Object,required:!1,default:void 0}},expose:["update"],data(){return{error:"",loading:!0,activities:[],lightningBoltSVG:k,sidebarPlugins:[]}},watch:{node:{immediate:!0,async handler(){await this.update()}}},async mounted(){this.node&&await this.update()},methods:{async update(){this.sidebarPlugins=[];const t=M();t.length>0&&R(()=>{this.sidebarPlugins=t}),this.resetState(),await this.getActivities()},async getActivities(){try{this.loading=!0;const t=await this.processActivities(await this.loadRealActivities()),e=await F({node:this.node});this.activities=[...t,...e].sort((a,n)=>n.timestamp-a.timestamp)}catch(t){this.error=u("activity","Unable to load the activity list"),f.error("Error loading the activity list",{error:t})}finally{this.loading=!1}},resetState(){this.loading=!0,this.error="",this.activities=[]},async loadRealActivities(){try{const{data:t}=await j.get(I("apps/activity/api/v2/activity/filter"),{params:{format:"json",object_type:"files",object_id:this.node.fileid}});return t.ocs.data}catch(t){if(t.response!==void 0&&t.response.status===304)return[];throw t}},processActivities(t){t=t.map(a=>new T(a)),f.debug(`Processed ${t.length} activity(ies)`,{activities:t,node:this.node});const e=W();return t.filter(a=>!e||e.every(n=>n(a)))},t:u}}),z={key:0,class:"activity__actions"},D={key:3,class:"activity__list"};function H(t,e,a,n,l,_){const d=o("NcIconSvgWrapper"),v=o("NcEmptyContent"),A=o("ActivitySidebarPlugin"),w=o("NcLoadingIcon"),S=o("ActivityComponent");return i(),s("div",{class:G([{"icon-loading":t.loading},"activity"])},[t.error||!t.node?(i(),r(v,{key:0,name:t.error},{icon:p(()=>[y(d,{svg:t.lightningBoltSVG},null,8,["svg"])]),_:1},8,["name"])):(i(),s(g,{key:1},[t.sidebarPlugins.length>0?(i(),s("div",z,[(i(!0),s(g,null,h(t.sidebarPlugins,(c,m)=>(i(),r(A,{key:m,plugin:c,node:t.node,onReloadActivities:e[0]||(e[0]=J=>t.getActivities())},null,8,["plugin","node"]))),128))])):q("",!0),t.loading?(i(),r(v,{key:1,class:"activity__empty-content",name:t.t("activity","Loading activities")},{icon:p(()=>[y(w)]),_:1},8,["name"])):t.activities.length===0?(i(),r(v,{key:2,class:"activity__empty-content",name:t.t("activity","No activity yet")},{icon:p(()=>[y(d,{svg:t.lightningBoltSVG},null,8,["svg"])]),_:1},8,["name"])):(i(),s("ul",D,[(i(!0),s(g,null,h(t.activities,c=>(i(),r(S,{key:c.id,activity:c,"show-previews":!1,onReload:e[1]||(e[1]=m=>t.getActivities())},null,8,["activity"]))),128))]))],64))],2)}const at=x($,[["render",H],["__scopeId","data-v-b6867024"]]);export{at as default};
3+
//# sourceMappingURL=ActivityTab-wUfqZYjm.chunk.mjs.map

0 commit comments

Comments
 (0)