Skip to content

Commit

Permalink
attempting to bridge test pass
Browse files Browse the repository at this point in the history
  • Loading branch information
jemeza committed Sep 14, 2023
1 parent 7d374eb commit f207a45
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
12 changes: 8 additions & 4 deletions packages/boba/gateway/cypress/e2e/pages/base/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,7 @@ export default class Page extends Base {
}

checkNetworkSwitchSuccessful(networkAbbreviation: string) {
this.getReduxStore()
.its('network')
.its('activeNetwork')
.should('equal', networkAbbreviation)
this.verifyReduxStoreNetwork('activeNetwork', networkAbbreviation)

this.verifyReduxStoreSetup('accountEnabled', true)
this.verifyReduxStoreSetup('baseEnabled', true)
Expand All @@ -237,6 +234,13 @@ export default class Page extends Base {
.should(`equal`, expectedValue)
}

verifyReduxStoreNetwork(attribute: string, expectedValue: boolean | string) {
this.getReduxStore()
.its('network')
.its(attribute)
.should('equal', expectedValue)
}

disconnectWallet() {
this.header.disconnectWallet()
}
Expand Down
10 changes: 6 additions & 4 deletions packages/boba/gateway/cypress/e2e/pages/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export default class Bridge extends Page {
this.withinPage().find('#settings').should('exist').click()
cy.get('label[title="testnetSwitch"]').should('exist').click()

this.verifyReduxStoreNetwork(
'activeNetworkType',
isTestnet ? 'Testnet' : 'Mainnet'
)

this.handleNetworkSwitchModals(network, isTestnet)

if (newNetwork) {
Expand All @@ -31,10 +36,7 @@ export default class Bridge extends Page {
} else {
this.allowNetworkSwitch()
}
this.getReduxStore()
.its('setup')
.its('netLayer')
.should('equal', newOriginLayer)
this.verifyReduxStoreSetup('netLayer', newOriginLayer)
}

selectToken(tokenSymbol: string) {
Expand Down
1 change: 0 additions & 1 deletion packages/boba/gateway/cypress/e2e/specs/history.spec.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ describe('History', () => {

it('network dropdowns', () => {
history.checkNetworkDropdowns()
history.getNetworksSwitchIcon()
})
it('status filter', () => {
history.checkStatusFilter()
Expand Down

0 comments on commit f207a45

Please sign in to comment.