Skip to content

Commit 6809b40

Browse files
authored
Merge pull request #9460 from gitbutlerapp/fix-error-handling-tests
Re-enable and fix errorHandling tests
2 parents 5eb7b0d + 8721d60 commit 6809b40

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

apps/desktop/cypress/e2e/errorHandling.cy.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,15 @@ describe('Error handling - commit actions', () => {
4747
cy.getByTestId('commit-row').first().should('contain', originalCommitMessage).click();
4848

4949
// Should open the commit drawer
50-
cy.get('.commit-view').first().should('contain', originalCommitMessage);
50+
cy.getByTestId('commit-drawer-title').first().should('contain', originalCommitMessage);
5151

52-
// Click on the edit message button
53-
cy.getByTestId('commit-drawer-action-edit-message').should('contain', 'Edit message').click();
52+
// Click on the kebab menu to access edit message
53+
cy.getByTestId('commit-drawer').within(() => {
54+
cy.getByTestId('kebab-menu-btn').click();
55+
});
56+
57+
// Click on the edit message button in the context menu
58+
cy.getByTestId('commit-row-context-menu-edit-message-menu-btn').should('be.enabled').click();
5459

5560
// Should open the commit rename drawer
5661
cy.getByTestId('edit-commit-message-box').should('be.visible');
@@ -271,8 +276,12 @@ describe('Error handling - commit actions', () => {
271276
// Should open the commit drawer
272277
cy.getByTestId('commit-drawer').first().should('be.visible');
273278

274-
// Click on the uncommit button
275-
cy.getByTestId('commit-drawer-action-uncommit').click();
279+
// Click on the kebab menu to access edit message
280+
cy.getByTestId('commit-drawer').within(() => {
281+
cy.getByTestId('kebab-menu-btn').click();
282+
});
283+
284+
cy.getByTestId('commit-row-context-menu-uncommit-menu-btn').should('be.enabled').click();
276285

277286
// Should show the error message
278287
cy.getByTestId('toast-info-message')
@@ -290,7 +299,7 @@ describe('Error handling - project acitons', () => {
290299
});
291300
});
292301

293-
it.only('Gracefully handle missing project', () => {
302+
it('Gracefully handle missing project', () => {
294303
cy.getByTestId('project-not-found-page').should('be.visible');
295304
});
296305
});

0 commit comments

Comments
 (0)