From 94c37cf3d7529d5ff620f2315a1c274427a89ef6 Mon Sep 17 00:00:00 2001 From: tudorgabriel Date: Mon, 1 Apr 2024 19:49:18 +0300 Subject: [PATCH 1/3] Th/update/wdio conf (#204) * increase timeout time --- wdio/wdio.conf.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wdio/wdio.conf.ts b/wdio/wdio.conf.ts index 59b08a5f..7aa1c318 100644 --- a/wdio/wdio.conf.ts +++ b/wdio/wdio.conf.ts @@ -51,7 +51,7 @@ export const config: Options.Testrunner = { reporters: ['spec', 'concise'], mochaOpts: { ui: 'bdd', - timeout: 120000 + timeout: 160000 }, before: () => {} }; From c4e36a3d6e97ce1e41fc8b9c5a18aba7cd62449b Mon Sep 17 00:00:00 2001 From: tudorgabriel Date: Tue, 9 Apr 2024 11:07:54 +0300 Subject: [PATCH 2/3] add another describe block (#206) --- .../test/specs/KeystoreScreen/Keystore.e2e.ts | 33 +++++++++++-------- wdio/test/utils/actions.ts | 3 +- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/wdio/test/specs/KeystoreScreen/Keystore.e2e.ts b/wdio/test/specs/KeystoreScreen/Keystore.e2e.ts index adb62279..79fe9a7c 100644 --- a/wdio/test/specs/KeystoreScreen/Keystore.e2e.ts +++ b/wdio/test/specs/KeystoreScreen/Keystore.e2e.ts @@ -53,19 +53,6 @@ describe('Sign with Keystore', () => { await pingPongHandler(GlobalSelectorEnum.serviceType); }); - it('should sign swap & lock transactions', async () => { - const loginData = { - selector: GlobalSelectorEnum.keystoreBtn, - file: GlobalDataEnum.keystoreFile, - adress: WalletAdressEnum.adress3 - }; - await login(loginData); - await batchTransactions(GlobalSelectorEnum.swapLockType); - await validateToast(GlobalSelectorEnum.toastSelector); - await browser.pause(4500); - await validateTransaction(TransactionIndexEnum.swapLock); - }); - it('should sign sign & batch ', async () => { const loginData = { selector: GlobalSelectorEnum.keystoreBtn, @@ -120,3 +107,23 @@ describe('Sign with Keystore', () => { await pingPongHandler(GlobalSelectorEnum.abiType); }); }); + +describe('batch transactions', () => { + beforeEach(async () => { + await browser.url('https://integration.template-dapp.multiversx.com/'); + await $(GlobalSelectorEnum.connectBtn).click(); + }); + + it('should sign swap & lock transactions', async () => { + const loginData = { + selector: GlobalSelectorEnum.keystoreBtn, + file: GlobalDataEnum.keystoreFile, + adress: WalletAdressEnum.adress3 + }; + await login(loginData); + await batchTransactions(GlobalSelectorEnum.swapLockType); + await validateToast(GlobalSelectorEnum.toastSelector); + await browser.pause(4500); + await validateTransaction(TransactionIndexEnum.swapLock); + }); +}); diff --git a/wdio/test/utils/actions.ts b/wdio/test/utils/actions.ts index 204325b7..ae1b7ac6 100644 --- a/wdio/test/utils/actions.ts +++ b/wdio/test/utils/actions.ts @@ -19,6 +19,7 @@ export async function getSelector(selector: string) { } export async function uploadFile(fileName: string) { + await browser.pause(1000); const file = await $('input[type="file"]'); const filePath = `./wdio/test/utils/${fileName}`; const remoteFilePath = await browser.uploadFile(filePath); @@ -39,7 +40,7 @@ export async function login(payload: { await browser.pause(4500); await browser.switchWindow(GlobalDataEnum.walletWindow); await $(payload.selector).click(); - await browser.pause(2500); + await browser.pause(3500); await uploadFile(payload.file); if (payload.selector === GlobalSelectorEnum.keystoreBtn) { await confirmPass(); From e6f8d92e6c13a7c64a255b7e8df7e71c3acd379e Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Tue, 9 Apr 2024 16:21:31 +0300 Subject: [PATCH 3/3] Upgrade sdk-dapp to latest version --- package.json | 2 +- yarn.lock | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 7d67809f..13ddd642 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@fortawesome/free-solid-svg-icons": "6.5.1", "@fortawesome/react-fontawesome": "0.2.0", "@multiversx/sdk-core": "13.0.0-beta.9", - "@multiversx/sdk-dapp": "2.29.0-beta.23", + "@multiversx/sdk-dapp": "2.29.2", "@multiversx/sdk-network-providers": "2.2.1", "axios": "1.6.5", "classnames": "2.3.2", diff --git a/yarn.lock b/yarn.lock index d3e154fe..d3591aaf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1058,14 +1058,13 @@ json-bigint "1.0.0" keccak "3.0.2" -"@multiversx/sdk-dapp@2.29.0-beta.23": - version "2.29.0-beta.23" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-dapp/-/sdk-dapp-2.29.0-beta.23.tgz#f9be4890562abb356387e94ec0c177955ed6dd44" - integrity sha512-C6EEX27MCGYUrSXZBGWvDAKJ8sTYzhXjDi2PcwQSUJ2IGbVSzgwE6jqzXpHTT1LcYq22CIC2Uc4woJ3l5dcdBQ== +"@multiversx/sdk-dapp@2.29.2": + version "2.29.2" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-dapp/-/sdk-dapp-2.29.2.tgz#617bc681b7e7b719ab03440a4f451fe258f47c7a" + integrity sha512-unZ1Q5uJ9tXWeTf51E5rxXbgEb9tQQSyk93W4z8H5dMwDO7v5Tmilux24tNtPYL9HeW8hCNJebIeAl7a8pK0BA== dependencies: "@lifeomic/axios-fetch" "3.0.1" "@metamask/providers" "16.0.0" - "@multiversx/sdk-core" "13.0.0-beta.9" "@multiversx/sdk-extension-provider" "3.0.0" "@multiversx/sdk-hw-provider" "6.4.0" "@multiversx/sdk-metamask-provider" "0.0.5" @@ -1073,7 +1072,7 @@ "@multiversx/sdk-opera-provider" "1.0.0-alpha.1" "@multiversx/sdk-wallet" "4.2.0" "@multiversx/sdk-wallet-connect-provider" "4.1.1" - "@multiversx/sdk-web-wallet-cross-window-provider" "0.0.31" + "@multiversx/sdk-web-wallet-cross-window-provider" "0.0.33" "@multiversx/sdk-web-wallet-provider" "3.2.1" "@reduxjs/toolkit" "1.8.2" bignumber.js "9.x" @@ -1185,12 +1184,11 @@ tweetnacl "1.0.3" uuid "8.3.2" -"@multiversx/sdk-web-wallet-cross-window-provider@0.0.31": - version "0.0.31" - resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-0.0.31.tgz#653a90f8f6f3b25fa05c2ab96ed3d34880b1f1f7" - integrity sha512-Bxyp9yxd6BWnl6uaJ/kd60T0tWT22X9PfWydhSX6fbkFN8RRGVcnG0QU6RPENp6oi1jqIjd8hOSS5UAvE5oXlA== +"@multiversx/sdk-web-wallet-cross-window-provider@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@multiversx/sdk-web-wallet-cross-window-provider/-/sdk-web-wallet-cross-window-provider-0.0.33.tgz#798fd76050b24fd1ec4c4788da83667420e9f114" + integrity sha512-l2rMzcYji8abySdrrIFkTOPsOYw2UvmlHnJfbU+PpKcwmF0vkwSUIS+XP8FqF00kwDyH2oGHGqZ7aoZRX6wSVw== dependencies: - "@multiversx/sdk-core" "13.0.0-beta.9" "@types/jest" "^29.5.11" "@types/qs" "6.9.10" qs "6.11.2"