From c43ab63f156233bb2f3aea6eee32a240b9df2e85 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Fri, 17 Nov 2023 18:01:52 -0800 Subject: [PATCH] fix: Sidebar tests Signed-off-by: Christopher Ng --- cypress/e2e/sidebar.cy.ts | 2 +- cypress/e2e/sidebarUtils.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/sidebar.cy.ts b/cypress/e2e/sidebar.cy.ts index a984ba2bb..ca3de2631 100644 --- a/cypress/e2e/sidebar.cy.ts +++ b/cypress/e2e/sidebar.cy.ts @@ -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('.activity-entry').first().should('contains.text', 'A comment') }) }) diff --git a/cypress/e2e/sidebarUtils.ts b/cypress/e2e/sidebarUtils.ts index d1f0b8bf3..57c367154 100644 --- a/cypress/e2e/sidebarUtils.ts +++ b/cypress/e2e/sidebarUtils.ts @@ -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') } @@ -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() }