Skip to content

Commit

Permalink
add another describe block (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
tudorgabriel authored Apr 9, 2024
1 parent 94c37cf commit c4e36a3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
33 changes: 20 additions & 13 deletions wdio/test/specs/KeystoreScreen/Keystore.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
});
});
3 changes: 2 additions & 1 deletion wdio/test/utils/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand Down

0 comments on commit c4e36a3

Please sign in to comment.