Skip to content

Commit 41a1dee

Browse files
Merge pull request #221 from multiversx/development
Development
2 parents 50f65fc + f6e6594 commit 41a1dee

File tree

6 files changed

+783
-248
lines changed

6 files changed

+783
-248
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"@fortawesome/fontawesome-svg-core": "6.5.1",
1010
"@fortawesome/free-solid-svg-icons": "6.5.1",
1111
"@fortawesome/react-fontawesome": "0.2.0",
12-
"@multiversx/sdk-core": "13.0.0-beta.9",
13-
"@multiversx/sdk-dapp": "2.31.0",
12+
"@multiversx/sdk-core": "13.0.1",
13+
"@multiversx/sdk-dapp": "2.31.6",
1414
"@multiversx/sdk-network-providers": "2.2.1",
1515
"axios": "1.6.5",
1616
"classnames": "2.3.2",

src/utils/sdkDappCore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export { SmartContract } from '@multiversx/sdk-core/out/smartcontracts/smartCont
66
export { AbiRegistry } from '@multiversx/sdk-core/out/smartcontracts/typesystem/abiRegistry';
77
export { SignableMessage } from '@multiversx/sdk-core/out/signableMessage';
88
export { AddressValue } from '@multiversx/sdk-core/out/smartcontracts/typesystem/address';
9-
export { TokenTransfer } from '@multiversx/sdk-core/out/tokenTransfer';
9+
export { TokenTransfer } from '@multiversx/sdk-core/out/tokens';
Lines changed: 71 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
batchTransactions,
33
checkOpenTabs,
4-
initTransaction,
54
login,
65
validateToast,
76
validateTransaction
@@ -12,25 +11,11 @@ import {
1211
TransactionIndexEnum,
1312
WalletAdressEnum
1413
} from '../../utils/enums.ts';
15-
import { pingPongHandler } from '../../utils/actions.ts';
14+
import { pingPongHandler, accesDaap } from '../../utils/actions.ts';
1615

17-
describe('Sign with Keystore', () => {
16+
describe('Ping & Pong ABI test', () => {
1817
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();
3419
});
3520

3621
it('should sign ping&pong ABI', async () => {
@@ -42,43 +27,64 @@ describe('Sign with Keystore', () => {
4227
await login(loginData);
4328
await pingPongHandler(GlobalSelectorEnum.abiType);
4429
});
30+
});
4531

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 () => {
4739
const loginData = {
4840
selector: GlobalSelectorEnum.keystoreBtn,
4941
file: GlobalDataEnum.keystoreFile,
5042
adress: WalletAdressEnum.adress3
5143
};
5244
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);
5449
});
50+
});
5551

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 () => {
5758
const loginData = {
5859
selector: GlobalSelectorEnum.keystoreBtn,
5960
file: GlobalDataEnum.keystoreFile,
60-
adress: WalletAdressEnum.adress3
61+
adress: WalletAdressEnum.adress1
6162
};
6263
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);
6765
});
66+
});
6867

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 () => {
7074
const loginData = {
71-
selector: GlobalSelectorEnum.keystoreBtn,
72-
file: GlobalDataEnum.keystoreFile,
75+
selector: GlobalSelectorEnum.pemBtn,
76+
file: GlobalDataEnum.pemFile,
7377
adress: WalletAdressEnum.adress3
7478
};
7579
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);
8081
});
82+
});
8183

84+
describe('Close the wallet test', () => {
85+
beforeEach(async () => {
86+
await accesDaap();
87+
});
8288
it('should close the wallet', async () => {
8389
const loginData = {
8490
selector: GlobalSelectorEnum.keystoreBtn,
@@ -96,34 +102,55 @@ describe('Sign with Keystore', () => {
96102
}
97103
await checkOpenTabs();
98104
});
105+
});
99106

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 () => {
101112
const loginData = {
102-
selector: GlobalSelectorEnum.pemBtn,
103-
file: GlobalDataEnum.pemFile,
113+
selector: GlobalSelectorEnum.keystoreBtn,
114+
file: GlobalDataEnum.keystoreFile,
104115
adress: WalletAdressEnum.adress3
105116
};
106117
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);
108122
});
109123
});
110124

111-
describe('batch transactions', () => {
125+
describe('Sign & Batch', () => {
112126
beforeEach(async () => {
113-
await browser.url('https://integration.template-dapp.multiversx.com/');
114-
await $(GlobalSelectorEnum.connectBtn).click();
127+
await accesDaap();
115128
});
116-
117-
it('should sign swap & lock transactions', async () => {
129+
it('should sign sign & batch ', async () => {
118130
const loginData = {
119131
selector: GlobalSelectorEnum.keystoreBtn,
120132
file: GlobalDataEnum.keystoreFile,
121133
adress: WalletAdressEnum.adress3
122134
};
123135
await login(loginData);
124-
await batchTransactions(GlobalSelectorEnum.swapLockType);
136+
await batchTransactions(GlobalSelectorEnum.signAndBatchType);
125137
await validateToast(GlobalSelectorEnum.toastSelector);
126138
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);
128155
});
129156
});

wdio/test/utils/actions.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function login(payload: {
4040
await browser.pause(4500);
4141
await browser.switchWindow(GlobalDataEnum.walletWindow);
4242
await $(payload.selector).click();
43-
await browser.pause(3500);
43+
await browser.pause(3600);
4444
await uploadFile(payload.file);
4545
if (payload.selector === GlobalSelectorEnum.keystoreBtn) {
4646
await confirmPass();
@@ -176,3 +176,9 @@ export const pingPongHandler = async (type: string) => {
176176
await scTransaction(`btnPing${type}`);
177177
}
178178
};
179+
180+
export const accesDaap = async () => {
181+
await browser.reloadSession();
182+
await browser.url('https://integration.template-dapp.multiversx.com/');
183+
await $(GlobalSelectorEnum.connectBtn).click();
184+
};

wdio/wdio.conf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const config: Options.Testrunner = {
2323
exclude: [],
2424

2525
maxInstances: 4,
26-
specFileRetries: 2,
26+
specFileRetries: 1,
2727
specFileRetriesDeferred: true,
2828

2929
capabilities: [

0 commit comments

Comments
 (0)