Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Oct 29, 2023
1 parent 97af353 commit 1b8c6ee
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 18 deletions.
9 changes: 0 additions & 9 deletions cypress/e2e/pages/balances.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const hiddenTokenDeselectAllBtn = 'span[data-track="assets: Deselect all hide di
const hiddenTokenIcon = 'svg[data-testid="VisibilityOffOutlinedIcon"]'

const hideTokenDefaultString = 'Hide tokens'
const gotItStr = 'Got it!'
const assetNameSortBtnStr = 'Asset'
const assetBalanceSortBtnStr = 'Balance'
const sendBtnStr = 'Send'
Expand Down Expand Up @@ -184,14 +183,6 @@ export function verifyEachRowHasCheckbox(state) {
})
}

export function acceptSpamWarning() {
cy.get('button').contains(gotItStr).click()
verifySpamWarningNotdisplayed()
}

export function verifySpamWarningNotdisplayed() {
cy.contains(gotItStr).should('not.exist')
}
export function verifyTokensTabIsSelected(option) {
cy.get(`a[aria-selected="${option}"]`).contains('Tokens')
}
Expand Down
4 changes: 3 additions & 1 deletion cypress/e2e/pages/main.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export function clickOnSideMenuItem(item) {
export function acceptCookies() {
cy.wait(1000)

cy.findAllByText('Got it!').each(($el) => $el.click())
cy.findAllByText('Got it!')
.should('have.length.at.least', 0)
.each(($el) => $el.click())

cy.get('button')
.contains(acceptSelection)
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/smoke/assets.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ describe('Assets tests', () => {
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
cy.clearLocalStorage()
main.acceptCookies()
balances.acceptSpamWarning()
})

it('Verify that the token tab is selected by default and the table is visible [C56039]', () => {
Expand Down Expand Up @@ -107,7 +106,6 @@ describe('Assets tests', () => {
it('Verify that a tool tip is shown pointing to "Token list" dropdown [C56044]', () => {
//Spam warning message is removed in beforeEach hook
cy.reload()
balances.verifySpamWarningNotdisplayed()
})

it('Verify that Token list dropdown down options show/hide spam tokens [C56045]', () => {
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/smoke/balances.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ describe('Balance tests', () => {
cy.clearLocalStorage()
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
main.acceptCookies()
balances.acceptSpamWarning()
cy.contains('Assets')
cy.get(balances.balanceSingleRow).should('have.length.lessThan', ASSETS_LENGTH)
balances.selectTokenList(balances.tokenListOptions.allTokens)
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/smoke/balances_pagination.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ describe('Balance tests', () => {
// Table is loaded
cy.contains('Görli Ether')

cy.contains('button', 'Got it').click()
cy.contains('div', 'Default tokens').click()
cy.wait(100)
cy.contains('div', 'All tokens').click()
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/smoke/batch_tx.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as batch from '../pages/batches.pages'
import * as constants from '../../support/constants'
import * as main from '../../e2e/pages/main.page'
import * as balances from '../pages/balances.pages'

const currentNonce = 3
const funds_first_tx = '0.001'
Expand All @@ -12,7 +11,6 @@ describe('Batch transaction tests', () => {
cy.clearLocalStorage()
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
main.acceptCookies()
balances.acceptSpamWarning()
})

it('Verify empty batch list can be opened [C56082]', () => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/smoke/create_tx.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as constants from '../../support/constants'
import * as main from '../../e2e/pages/main.page'
import * as createtx from '../../e2e/pages/create_tx.pages'
import * as balances from '../pages/balances.pages'

const sendValue = 0.00002
const currentNonce = 1
Expand All @@ -11,7 +10,6 @@ describe('Create transactions tests', () => {
cy.clearLocalStorage()
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
main.acceptCookies()
balances.acceptSpamWarning()
})

it('Verify a new send token transaction can be created [C56104]', () => {
Expand Down

0 comments on commit 1b8c6ee

Please sign in to comment.