File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,13 @@ export const loginWithoutBalanceValidation = async (
31
31
* @param driver - The webdriver instance.
32
32
* @param localNode - The local node server instance
33
33
* @param password - The password used to unlock the wallet.
34
+ * @param value - The balance value to be checked
34
35
*/
35
36
export const loginWithBalanceValidation = async (
36
37
driver : Driver ,
37
38
localNode ?: Ganache | Anvil ,
38
39
password ?: string ,
40
+ value ?: string ,
39
41
) => {
40
42
await loginWithoutBalanceValidation ( driver , password ) ;
41
43
const homePage = new HomePage ( driver ) ;
@@ -44,6 +46,6 @@ export const loginWithBalanceValidation = async (
44
46
if ( localNode ) {
45
47
await homePage . check_localNodeBalanceIsDisplayed ( localNode ) ;
46
48
} else {
47
- await homePage . check_expectedBalanceIsDisplayed ( ) ;
49
+ await homePage . check_expectedBalanceIsDisplayed ( value ) ;
48
50
}
49
51
} ;
Original file line number Diff line number Diff line change 1
1
import { Suite } from 'mocha' ;
2
- import { Driver } from '../../webdriver/driver' ;
3
2
import TestDappPage from '../../page-objects/pages/test-dapp' ;
4
3
import FixtureBuilder from '../../fixture-builder' ;
5
4
import { WINDOW_TITLES , withFixtures } from '../../helpers' ;
6
5
import { KNOWN_PUBLIC_KEY_ADDRESSES } from '../../../stub/keyring-bridge' ;
7
- import { loginWithoutBalanceValidation } from '../../page-objects/flows/login.flow' ;
6
+ import { loginWithBalanceValidation } from '../../page-objects/flows/login.flow' ;
8
7
import CreateContractModal from '../../page-objects/pages/dialog/create-contract' ;
9
8
10
9
describe ( 'Ledger Hardware' , function ( this : Suite ) {
@@ -25,7 +24,12 @@ describe('Ledger Hardware', function (this: Suite) {
25
24
KNOWN_PUBLIC_KEY_ADDRESSES [ 0 ] . address ,
26
25
'0x100000000000000000000' ,
27
26
) ) ?? console . error ( 'localNodes is undefined or empty' ) ;
28
- await loginWithoutBalanceValidation ( driver ) ;
27
+ await loginWithBalanceValidation (
28
+ driver ,
29
+ undefined ,
30
+ undefined ,
31
+ '1208925.8196' ,
32
+ ) ;
29
33
const testDappPage = new TestDappPage ( driver ) ;
30
34
await testDappPage . openTestDappPage ( ) ;
31
35
await testDappPage . check_pageIsLoaded ( ) ;
You can’t perform that action at this time.
0 commit comments