Skip to content

Commit

Permalink
test(extension): update tests for unlocking wallet - part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
wklos-iohk committed May 25, 2023
1 parent 94eec13 commit 1bba8c3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/e2e-tests/src/steps/lockWalletSteps.ts
Expand Up @@ -31,3 +31,22 @@ When(/^I fill password input with (correct|incorrect) password$/, async (type: '
const password = type === 'correct' ? process.env.WALLET_1_PASSWORD : 'wrongPassword';
await WalletUnlockPage.passwordInput.setValue(password);
});

Then(/^"Unlock" button is (enabled|disabled) on unlock screen$/, async (state: 'enabled' | 'disabled') => {
await walletUnlockScreenAssert.assertSeeUnlockButtonEnabled(state === 'enabled');
});

When(/^I click "(Unlock|Help and support)" button on unlock screen$/, async (button: 'Unlock' | 'Help and support') => {
switch (button) {
case 'Unlock':
await WalletUnlockPage.unlockButton.waitForClickable();
await WalletUnlockPage.unlockButton.click();
break;
case 'Help and support':
await WalletUnlockPage.helpAndSupportButton.waitForClickable();
await WalletUnlockPage.helpAndSupportButton.click();
break;
default:
throw new Error(`Unsupported button name: ${button}`);
}
});

0 comments on commit 1bba8c3

Please sign in to comment.