Skip to content

Commit 55cb797

Browse files
committed
fix(ws): apply feedback to fix Cypress tests
1 parent f8aa5bc commit 55cb797

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

workspaces/frontend/src/__tests__/cypress/cypress/tests/mocked/workspaces/WorkspaceDetailsActivity.cy.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ describe('WorkspaceDetailsActivity Component', () => {
1111

1212
// This tests depends on the mocked workspaces data at home page, needs revisit once workspace data fetched from BE
1313
it('open workspace details, open activity tab, check all fields match', () => {
14-
cy.findAllByTestId('table-body').first().findByTestId('action-column').click();
14+
cy.findAllByTestId('table-body')
15+
.first()
16+
.findByTestId('action-column')
17+
.find('button')
18+
.should('be.visible')
19+
.click();
1520
// Extract first workspace from mock data
1621
cy.wait('@getWorkspaces').then((interception) => {
1722
if (!interception.response || !interception.response.body) {

workspaces/frontend/src/__tests__/cypress/cypress/tests/mocked/workspaces/Workspaces.cy.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,12 @@ describe('Workspaces Component', () => {
119119
});
120120

121121
function openDeleteModal() {
122-
cy.findAllByTestId('table-body').first().findByTestId('action-column').click();
122+
cy.findAllByTestId('table-body')
123+
.first()
124+
.findByTestId('action-column')
125+
.find('button')
126+
.should('be.visible')
127+
.click();
123128
cy.findByTestId('action-delete').click();
124129
cy.findByTestId('delete-modal-input').should('have.value', '');
125130
}

0 commit comments

Comments
 (0)