Skip to content

Commit

Permalink
cypress - properly delete a project
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveDarsa committed Jul 4, 2024
1 parent 4a2f4f8 commit 6cc828e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cypress/support/actions/organizations/ProjectsActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class ProjectsActions {
});
}
doDeleteProject(projectName: string) {
projects.getDeleteBtn().first().click();
projects.getDeleteBtn(projectName).click();

cy.get('.highlight')
.invoke('text')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default class ProjectsRepository {
getProjectRows() {
return cy.getBySel('table-row');
}
getDeleteBtn() {
return cy.getBySel('deleteProject');
getDeleteBtn(projectName: string) {
return cy.getBySel('table-row').filter(`:contains(${projectName})`).find('[data-cy=deleteProject]');
}
getDeleteConfirmInput() {
return cy.getBySel('deleteProjectConfirm');
Expand Down

0 comments on commit 6cc828e

Please sign in to comment.