Skip to content

Commit

Permalink
fix(cypress): Adjust sharing tests for new sidebar tab for sharing
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Nov 6, 2023
1 parent 33ca0af commit cf0da3a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cypress/e2e/sidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,19 @@ export function removeFromFavorites(fileName: string) {
cy.get('.toast-close').click()
}

/**
* Create a new public link share for a given file
*
* @param fileName Name of the file to share
*/
export function createPublicShare(fileName: string) {
toggleMenuAction(fileName)
cy.contains('Open details').click()
cy.get('#app-sidebar-vue').contains('Sharing').click()

cy.get('#app-sidebar-vue [data-id="sharing"]').trigger('click')
cy.get('#app-sidebar-vue button.new-share-link').trigger('click')
cy.get('#app-sidebar-vue a.sharing-entry__copy')
cy.get('#app-sidebar-vue #tab-sharing').should('be.visible')
cy.get('#app-sidebar-vue button.new-share-link').click({ force: true })
cy.get('#app-sidebar-vue a.sharing-entry__copy').should('be.visible')
}

export function addTag(fileName: string, tag: string) {
Expand Down

0 comments on commit cf0da3a

Please sign in to comment.