Skip to content

Commit

Permalink
Added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davibroc committed Feb 3, 2025
1 parent 3084376 commit bacc859
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
4 changes: 4 additions & 0 deletions e2e/pages/wallet/TokenOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class TokenOverview {
return Matchers.getElementByID(WalletViewSelectorsIDs.STAKE_MORE_BUTTON);
}

get stakedBalance() {
return Matchers.getElementByID(TokenOverviewSelectorsText.STAKED_BALANCE);
}

get actionSheetSendButton() {
return Matchers.getElementByID(WalletActionsBottomSheetSelectorsIDs.SEND_BUTTON);
}
Expand Down
3 changes: 2 additions & 1 deletion e2e/pages/wallet/WalletView.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ class WalletView {
await Gestures.waitAndTap(this.currentMainWalletAccountActions);
}

async tapOnToken(token) {
async tapOnToken(token, index = 0) {
const element = Matchers.getElementByText(
token || WalletViewSelectorsText.DEFAULT_TOKEN,
index,
);
await Gestures.waitAndTap(element);
}
Expand Down
1 change: 1 addition & 0 deletions e2e/selectors/wallet/TokenOverview.selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const TokenOverviewSelectorsIDs = {
};

export const TokenOverviewSelectorsText = {
STAKED_BALANCE: enContent.stake.staked_balance,
NO_CHART_DATA: enContent.asset_overview.no_chart_data.title,
'1d': enContent.asset_overview.chart_time_period_navigation['1d'],
'1w': enContent.asset_overview.chart_time_period_navigation['1w'],
Expand Down
11 changes: 11 additions & 0 deletions e2e/specs/stake/stake-action-smoke.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,23 @@ describe(SmokeStake('Stake from Actions'), () => {
})

it('should make sure staking actions are hidden for ETH assets that are not on main', async () => {
const THIRD_ONE = 2
await TabBarComponent.tapWallet();
await WalletView.tapNetworksButtonOnNavBar();
await NetworkListModal.changeNetworkTo(PopularNetworksList.zkSync.providerConfig.nickname, false);
await NetworkEducationModal.tapGotItButton();
await Assertions.checkIfNotVisible(WalletView.earnButton)
await Assertions.checkIfNotVisible(WalletView.stakedEthereumLabel)
await WalletView.tapTokenNetworkFilter();
await WalletView.tapTokenNetworkFilterAll();
// 3rd one is Linea Network
await WalletView.tapOnToken('Ethereum', THIRD_ONE)
await TokenOverview.scrollOnScreen();
await TestHelpers.delay(3000);
await Assertions.checkIfNotVisible(TokenOverview.stakedBalance);
await Assertions.checkIfNotVisible(TokenOverview.unstakingBanner);
await Assertions.checkIfNotVisible(TokenOverview.unstakeButton);
await TokenOverview.tapBackButton()
await WalletView.tapNetworksButtonOnNavBar();
await NetworkListModal.changeNetworkTo(CustomNetworks.Holesky.providerConfig.nickname);
await NetworkEducationModal.tapGotItButton();
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ SPEC CHECKSUMS:
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
Permission-BluetoothPeripheral: 34ab829f159c6cf400c57bac05f5ba1b0af7a86e
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCT-Folly: 8dc08ca5a393b48b1c523ab6220dfdcc0fe000ad
RCTRequired: fb207f74935626041e7308c9e88dcdda680f1073
RCTSearchApi: 5fc36140c598a74fd831dca924a28ed53bc7aa18
RCTTypeSafety: 146fd11361680250b7580dd1f7f601995cfad1b1
Expand Down

0 comments on commit bacc859

Please sign in to comment.