Skip to content

Commit

Permalink
TW-460: Import an account by private key (#855)
Browse files Browse the repository at this point in the history
* merging TW-409-e2e-reveal-seed-phrase-and-private-key into development

* [e2e] Import an account by private key
  • Loading branch information
tttt24 committed Feb 7, 2023
1 parent bad238f commit 667b0d0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/src/features/import-account-by-mnemonic.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Feature: Import Account by Mnemonic
@dev

Scenario: As a user, I'd like to import account by mnemonic
Given I have imported an existing account

Expand Down
18 changes: 18 additions & 0 deletions e2e/src/features/import-account-by-private-key.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Feature: Import Account by Private Key
@dev
Scenario: As a user, I'd like to import account by private key
Given I have imported an existing account

And I press AccountIcon on the Header page
And I am on the AccountsDropdown page

And I press ImportAccountButton on the AccountsDropdown page
And I am on the ImportAccountTab page

And I select Private Key tab
And I am on the ImportAccountPrivateKey page

And I enter second private key into Private Key Input on the Import Account(Private Key) page
And I press Private Key Import Button on the Import Account(Private Key) page

Then I reveal a private key and compare with private key of second seed phrase
2 changes: 1 addition & 1 deletion e2e/src/step-definitions/common.steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Given(/I press (.*) on the (.*) page/, async (elementName: string, pageName: str
});

Given(
/I enter (seed|password) into (.*) on the (.*) page/,
/I enter (seed|password|second private key) into (.*) on the (.*) page/,
async (inputType: string, elementName: string, pageName: string) => {
const inputText = getInputText(inputType);

Expand Down
3 changes: 3 additions & 0 deletions e2e/src/utils/input.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export const getInputText = (inputType: string) => {
case 'password':
inputText = BrowserContext.password;
break;
case 'second private key':
inputText = BrowserContext.privateKeyOfSecondSeedPhrase;
break;
}

return inputText;
Expand Down

0 comments on commit 667b0d0

Please sign in to comment.