MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / addLocalhostNetwork

Function addLocalhostNetwork

e2e/viewHelper.js:151–178  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149};
150
151export const addLocalhostNetwork = async () => {
152 await TabBarComponent.tapSettings();
153 await SettingsView.tapNetworks();
154 await Assertions.checkIfVisible(NetworkView.networkContainer);
155
156 await TestHelpers.delay(3000);
157 await NetworkView.tapAddNetworkButton();
158 await NetworkView.switchToCustomNetworks();
159
160 await NetworkView.typeInNetworkName('Localhost');
161 await NetworkView.typeInRpcUrl(LOCALHOST_URL);
162 await NetworkView.typeInChainId('1337');
163 await NetworkView.typeInNetworkSymbol('ETH\n');
164
165 if (device.getPlatform() === 'ios') {
166 await NetworkView.swipeToRPCTitleAndDismissKeyboard(); // Focus outside of text input field
167 await NetworkView.tapRpcNetworkAddButton();
168 }
169 await TestHelpers.delay(3000);
170
171 await Assertions.checkIfVisible(NetworkEducationModal.container);
172 await Assertions.checkIfElementToHaveText(
173 NetworkEducationModal.networkName,
174 'Localhost',
175 );
176 await NetworkEducationModal.tapGotItButton();
177 await Assertions.checkIfNotVisible(NetworkEducationModal.container);
178};
179
180export const switchToSepoliaNetwork = async () => {
181 await WalletView.tapNetworksButtonOnNavBar();

Callers

nothing calls this directly

Calls 14

tapSettingsMethod · 0.80
tapNetworksMethod · 0.80
delayMethod · 0.80
typeInNetworkNameMethod · 0.80
typeInRpcUrlMethod · 0.80
typeInChainIdMethod · 0.80
typeInNetworkSymbolMethod · 0.80
checkIfVisibleMethod · 0.45
tapAddNetworkButtonMethod · 0.45

Tested by

no test coverage detected