Skip to content

Commit

Permalink
Tests: Fix safe apps tests (#4539)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike10ca authored Nov 20, 2024
1 parent 6b64842 commit 4e824f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/pages/safeapps.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ export function verifyNoAppsTextPresent() {
cy.contains(noAppsStr).should('exist')
}

export function pinApp(app, pin = true) {
export function pinApp(index, app, pin = true) {
const option = pin ? 'Pin' : 'Unpin'
cy.get(`[aria-label="${option} ${app}"]`).click()
cy.get(`[aria-label="${option} ${app}"]`).eq(index).click()
}

export function clickOnBookmarkedAppsTab() {
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/safe-apps/apps_list.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ describe('Safe Apps list tests', () => {

it('Verify apps can be pinned', () => {
safeapps.clearSearchAppInput()
safeapps.pinApp(safeapps.transactionBuilderStr)
safeapps.pinApp(1, safeapps.transactionBuilderStr)
safeapps.verifyPinnedAppCount(1)
})

it('Verify apps can be unpinned', () => {
safeapps.pinApp(safeapps.transactionBuilderStr)
safeapps.pinApp(safeapps.transactionBuilderStr, false)
safeapps.pinApp(1, safeapps.transactionBuilderStr)
safeapps.pinApp(0, safeapps.transactionBuilderStr, false)
safeapps.verifyPinnedAppCount(0)
})

Expand Down

0 comments on commit 4e824f3

Please sign in to comment.