Skip to content

Commit

Permalink
fix: Sidebar tests
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Nov 18, 2023
1 parent 898dbec commit bb56e4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/sidebar.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('Check activity listing in the sidebar', { testIsolation: true }, () =>
addComment('welcome.txt', 'A comment')

showActivityTab('welcome.txt')
cy.get('.activity-entry').first().should('contains.text', 'You commented')
cy.get('.comments-activity').first().should('contains.text', 'A comment')
})

})
6 changes: 3 additions & 3 deletions cypress/e2e/sidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { toggleMenuAction } from './filesUtils'
function showSidebarForFile(fileName: string) {
closeSidebar()
toggleMenuAction(fileName)
cy.get('[data-cy-files-list-row-action="details"]').click()
cy.get('[data-cy-files-list-row-action="details"] button').click()
cy.get('#app-sidebar-vue').should('be.visible')
}

Expand Down Expand Up @@ -67,7 +67,7 @@ export function createPublicShare(fileName: string) {

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')
cy.get('#app-sidebar-vue .sharing-entry__copy').should('be.visible')
closeSidebar()
}

Expand All @@ -83,7 +83,7 @@ export function addTag(fileName: string, tag: string) {

export function addComment(fileName: string, comment: string) {
showSidebarForFile(fileName)
cy.get('#app-sidebar-vue').contains('Comments').click()
cy.get('#app-sidebar-vue').contains('Activity').click()
cy.get('.comment__editor .rich-contenteditable__input').type(comment)
cy.get('.comment__submit button').click()

Expand Down

0 comments on commit bb56e4b

Please sign in to comment.