33 * SPDX-License-Identifier: AGPL-3.0-or-later
44 */
55
6- import { toggleMenuAction , triggerActionForFile } from './filesUtils.ts'
6+ import { getRowForFile , toggleMenuAction , triggerActionForFile } from './filesUtils.ts'
77
88function showSidebarForFile ( fileName : string ) {
99 toggleMenuAction ( fileName , 'details' )
@@ -60,8 +60,6 @@ export function toggleFavorite(fileName: string) {
6060 * @param fileName Name of the file to share
6161 */
6262export function createPublicShare ( fileName : string ) {
63- cy . intercept ( 'POST' , '/ocs/v2.php/apps/files_sharing/api/v1/shares' ) . as ( 'createPublicShare' )
64-
6563 showSidebarForFile ( fileName )
6664 cy . get ( '#app-sidebar-vue' )
6765 . findByRole ( 'tab' , { name : 'Sharing' } )
@@ -77,8 +75,6 @@ export function createPublicShare(fileName: string) {
7775
7876 cy . wait ( '@createShare' )
7977 closeSidebar ( )
80-
81- cy . wait ( '@createPublicShare' )
8278}
8379
8480/**
@@ -88,6 +84,11 @@ export function createPublicShare(fileName: string) {
8884 * @param newTag - The new tag
8985 */
9086export function addTag ( fileName : string , newTag : string ) {
87+ getRowForFile ( fileName )
88+ . should ( 'be.visible' )
89+ . find ( '.files-list__row-icon-preview--loaded' )
90+ . should ( 'exist' )
91+
9192 triggerActionForFile ( fileName , 'systemtags:bulk' )
9293
9394 cy . intercept ( 'POST' , '/remote.php/dav/systemtags' ) . as ( 'createTag' )
0 commit comments