1
1
import {
2
2
batchTransactions ,
3
3
checkOpenTabs ,
4
- initTransaction ,
5
4
login ,
6
5
validateToast ,
7
6
validateTransaction
@@ -12,25 +11,11 @@ import {
12
11
TransactionIndexEnum ,
13
12
WalletAdressEnum
14
13
} from '../../utils/enums.ts' ;
15
- import { pingPongHandler } from '../../utils/actions.ts' ;
14
+ import { pingPongHandler , accesDaap } from '../../utils/actions.ts' ;
16
15
17
- describe ( 'Sign with Keystore ' , ( ) => {
16
+ describe ( 'Ping & Pong ABI test ' , ( ) => {
18
17
beforeEach ( async ( ) => {
19
- await browser . url ( 'https://integration.template-dapp.multiversx.com/' ) ;
20
- await $ ( GlobalSelectorEnum . connectBtn ) . click ( ) ;
21
- } ) ;
22
- afterEach ( async ( ) => {
23
- await browser . reloadSession ( ) ;
24
- } ) ;
25
-
26
- it ( 'should sign ping&pong manual transaction' , async ( ) => {
27
- const loginData = {
28
- selector : GlobalSelectorEnum . keystoreBtn ,
29
- file : GlobalDataEnum . keystoreFile ,
30
- adress : WalletAdressEnum . adress1
31
- } ;
32
- await login ( loginData ) ;
33
- await pingPongHandler ( GlobalSelectorEnum . rawType ) ;
18
+ await accesDaap ( ) ;
34
19
} ) ;
35
20
36
21
it ( 'should sign ping&pong ABI' , async ( ) => {
@@ -42,43 +27,64 @@ describe('Sign with Keystore', () => {
42
27
await login ( loginData ) ;
43
28
await pingPongHandler ( GlobalSelectorEnum . abiType ) ;
44
29
} ) ;
30
+ } ) ;
45
31
46
- it ( 'should sign ping&pong Service' , async ( ) => {
32
+ describe ( 'batch transactions' , ( ) => {
33
+ beforeEach ( async ( ) => {
34
+ await browser . url ( 'https://integration.template-dapp.multiversx.com/' ) ;
35
+ await $ ( GlobalSelectorEnum . connectBtn ) . click ( ) ;
36
+ } ) ;
37
+
38
+ it ( 'should sign swap & lock transactions' , async ( ) => {
47
39
const loginData = {
48
40
selector : GlobalSelectorEnum . keystoreBtn ,
49
41
file : GlobalDataEnum . keystoreFile ,
50
42
adress : WalletAdressEnum . adress3
51
43
} ;
52
44
await login ( loginData ) ;
53
- await pingPongHandler ( GlobalSelectorEnum . serviceType ) ;
45
+ await batchTransactions ( GlobalSelectorEnum . swapLockType ) ;
46
+ await validateToast ( GlobalSelectorEnum . toastSelector ) ;
47
+ await browser . pause ( 4500 ) ;
48
+ await validateTransaction ( TransactionIndexEnum . swapLock ) ;
54
49
} ) ;
50
+ } ) ;
55
51
56
- it ( 'should sign sign & batch ' , async ( ) => {
52
+ describe ( 'Ping and Pong manual transaciton' , ( ) => {
53
+ before ( async ( ) => {
54
+ await accesDaap ( ) ;
55
+ } ) ;
56
+
57
+ it ( 'should sign ping&pong manual transaction' , async ( ) => {
57
58
const loginData = {
58
59
selector : GlobalSelectorEnum . keystoreBtn ,
59
60
file : GlobalDataEnum . keystoreFile ,
60
- adress : WalletAdressEnum . adress3
61
+ adress : WalletAdressEnum . adress1
61
62
} ;
62
63
await login ( loginData ) ;
63
- await batchTransactions ( GlobalSelectorEnum . signAndBatchType ) ;
64
- await validateToast ( GlobalSelectorEnum . toastSelector ) ;
65
- await browser . pause ( 4500 ) ;
66
- await validateTransaction ( TransactionIndexEnum . signBatch ) ;
64
+ await pingPongHandler ( GlobalSelectorEnum . rawType ) ;
67
65
} ) ;
66
+ } ) ;
68
67
69
- it ( 'should sign sign & batch controlled sending ' , async ( ) => {
68
+ describe ( 'PEM' , ( ) => {
69
+ beforeEach ( async ( ) => {
70
+ await accesDaap ( ) ;
71
+ } ) ;
72
+
73
+ it ( 'should sign transaction with PEM' , async ( ) => {
70
74
const loginData = {
71
- selector : GlobalSelectorEnum . keystoreBtn ,
72
- file : GlobalDataEnum . keystoreFile ,
75
+ selector : GlobalSelectorEnum . pemBtn ,
76
+ file : GlobalDataEnum . pemFile ,
73
77
adress : WalletAdressEnum . adress3
74
78
} ;
75
79
await login ( loginData ) ;
76
- await batchTransactions ( GlobalSelectorEnum . controlledSendingType ) ;
77
- await validateToast ( GlobalSelectorEnum . toastSelector ) ;
78
- await browser . pause ( 4500 ) ;
79
- await validateTransaction ( TransactionIndexEnum . signBatch ) ;
80
+ await pingPongHandler ( GlobalSelectorEnum . abiType ) ;
80
81
} ) ;
82
+ } ) ;
81
83
84
+ describe ( 'Close the wallet test' , ( ) => {
85
+ beforeEach ( async ( ) => {
86
+ await accesDaap ( ) ;
87
+ } ) ;
82
88
it ( 'should close the wallet' , async ( ) => {
83
89
const loginData = {
84
90
selector : GlobalSelectorEnum . keystoreBtn ,
@@ -96,34 +102,55 @@ describe('Sign with Keystore', () => {
96
102
}
97
103
await checkOpenTabs ( ) ;
98
104
} ) ;
105
+ } ) ;
99
106
100
- it ( 'should sign transaction with PEM' , async ( ) => {
107
+ describe ( 'Batch controoled sending' , ( ) => {
108
+ beforeEach ( async ( ) => {
109
+ await accesDaap ( ) ;
110
+ } ) ;
111
+ it ( 'should sign sign & batch controlled sending ' , async ( ) => {
101
112
const loginData = {
102
- selector : GlobalSelectorEnum . pemBtn ,
103
- file : GlobalDataEnum . pemFile ,
113
+ selector : GlobalSelectorEnum . keystoreBtn ,
114
+ file : GlobalDataEnum . keystoreFile ,
104
115
adress : WalletAdressEnum . adress3
105
116
} ;
106
117
await login ( loginData ) ;
107
- await pingPongHandler ( GlobalSelectorEnum . abiType ) ;
118
+ await batchTransactions ( GlobalSelectorEnum . controlledSendingType ) ;
119
+ await validateToast ( GlobalSelectorEnum . toastSelector ) ;
120
+ await browser . pause ( 4500 ) ;
121
+ await validateTransaction ( TransactionIndexEnum . signBatch ) ;
108
122
} ) ;
109
123
} ) ;
110
124
111
- describe ( 'batch transactions ' , ( ) => {
125
+ describe ( 'Sign & Batch ' , ( ) => {
112
126
beforeEach ( async ( ) => {
113
- await browser . url ( 'https://integration.template-dapp.multiversx.com/' ) ;
114
- await $ ( GlobalSelectorEnum . connectBtn ) . click ( ) ;
127
+ await accesDaap ( ) ;
115
128
} ) ;
116
-
117
- it ( 'should sign swap & lock transactions' , async ( ) => {
129
+ it ( 'should sign sign & batch ' , async ( ) => {
118
130
const loginData = {
119
131
selector : GlobalSelectorEnum . keystoreBtn ,
120
132
file : GlobalDataEnum . keystoreFile ,
121
133
adress : WalletAdressEnum . adress3
122
134
} ;
123
135
await login ( loginData ) ;
124
- await batchTransactions ( GlobalSelectorEnum . swapLockType ) ;
136
+ await batchTransactions ( GlobalSelectorEnum . signAndBatchType ) ;
125
137
await validateToast ( GlobalSelectorEnum . toastSelector ) ;
126
138
await browser . pause ( 4500 ) ;
127
- await validateTransaction ( TransactionIndexEnum . swapLock ) ;
139
+ await validateTransaction ( TransactionIndexEnum . signBatch ) ;
140
+ } ) ;
141
+ } ) ;
142
+
143
+ describe ( 'Ping&Pong Service test' , ( ) => {
144
+ beforeEach ( async ( ) => {
145
+ await accesDaap ( ) ;
146
+ } ) ;
147
+ it ( 'should sign ping&pong Service' , async ( ) => {
148
+ const loginData = {
149
+ selector : GlobalSelectorEnum . keystoreBtn ,
150
+ file : GlobalDataEnum . keystoreFile ,
151
+ adress : WalletAdressEnum . adress3
152
+ } ;
153
+ await login ( loginData ) ;
154
+ await pingPongHandler ( GlobalSelectorEnum . serviceType ) ;
128
155
} ) ;
129
156
} ) ;
0 commit comments