Skip to content

Commit

Permalink
Fixed PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ikem-legend committed Oct 31, 2023
1 parent cc45f55 commit 0c34de7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions e2e/features/account/AddAccount.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Feature: AddAccount
And I should see "Enter your secret recovery phrase to manage your account."
And I should see "Secret recovery phrase (12-24 mnemonic phrases supported)"
And custom derivation path input field should be "enabled"
And button with text 'Continue' should be disabled
And button with text 'Continue to set password' should be disabled
Given I click on exact text "Go back"
Then I should be redirected to route: "account/add"
Given I click on a button with text "Secret recovery phrase"
And I fill in mnemonic phrases 'peanut hundred pen hawk invite exclude brain chunk gadget wait wrong ready'
And I click on a button with text "Continue"
And I click on a button with text "Continue to set password"
Then I should see "Set up your account password"
And I should see "I agree to store my encrypted secret recovery phrase on this device."
And I should see "This password will be used for decrypting your account every time you initiate any transaction from your wallet, and also during backup or removal of an account from the wallet."
Expand All @@ -38,7 +38,7 @@ Feature: AddAccount
And I click on text "Enable access to legacy Lisk accounts"
Then custom derivation path input field should be "disabled"
And I fill in mnemonic phrases 'peanut hundred pen hawk invite exclude brain chunk gadget wait wrong ready'
And I click on a button with text "Continue"
And I click on a button with text "Continue to set password"
Then I should see "Set up your account password"
And I should see "I agree to store my encrypted secret recovery phrase on this device."
And I should see "This password will be used for decrypting your account every time you initiate any transaction from your wallet, and also during backup or removal of an account from the wallet."
Expand Down
2 changes: 1 addition & 1 deletion e2e/steps/common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const initAccountSetup = async function (passphrase, browserFixture) {
};

const completeAccountSetup = async function (password, name, browserFixture) {
await browserFixture.page.getByText('Continue', { exact: true }).click();
await browserFixture.page.getByText('Continue to set password', { exact: true }).click();
await browserFixture.page.getByTestId('password').fill(password);
await browserFixture.page.getByTestId('cPassword').fill(password);
await browserFixture.page.getByTestId('accountName').fill(name);
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
"Error": "Error",
"Error loading application data": "Error loading application data",
"Error retrieving conversion rates.": "Error retrieving conversion rates.",
"Estimated reward": "Estimated reward",
"Events": "Events",
"Execution status": "Execution status",
"Existing members": "Existing members",
Expand Down Expand Up @@ -818,7 +819,6 @@
"You received tokens": "You received tokens",
"You will be able to:": "You will be able to:",
"You will be notified when your transaction is confirmed.": "You will be notified when your transaction is confirmed.",
"You will get": "You will get",
"Your LSK tokens could not be reclaimed, you can try again or report to us via email": "Your LSK tokens could not be reclaimed, you can try again or report to us via email",
"Your account just received {{value}}": "Your account just received {{value}}",
"Your commission rate request has been successfully submitted, it will be reflected in your profile shortly.": "Your commission rate request has been successfully submitted, it will be reflected in your profile shortly.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Add account by secret recovery phrase flow', () => {
expect(
screen.getByText('Enter your secret recovery phrase to manage your account.')
).toBeTruthy();
expect(screen.getByText('Continue')).toBeTruthy();
expect(screen.getByText('Continue to set password')).toBeTruthy();
expect(screen.getByText('Go back')).toBeTruthy();

const inputField = screen.getByTestId('recovery-1');
Expand All @@ -54,7 +54,7 @@ describe('Add account by secret recovery phrase flow', () => {
});

fireEvent(inputField, pasteEvent);
fireEvent.click(screen.getByText('Continue'));
fireEvent.click(screen.getByText('Continue to set password'));

const password = screen.getByTestId('password');
const cPassword = screen.getByTestId('cPassword');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const AddAccountFormContainer = ({
type="submit"
disabled={!passphrase.isValid || isSubmitDisabled}
>
{t('Continue')}
{t('Continue to set password')}
</PrimaryButton>
<Link
className={`${styles.backLink} signin-hwWallet-button`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ describe('AddAccountForm', () => {
expect(
screen.getByText('Enter your secret recovery phrase to manage your account.')
).toBeTruthy();
expect(screen.getByText('Continue')).toBeTruthy();
expect(screen.getByText('Continue to set password')).toBeTruthy();
expect(screen.getByText('Go back')).toBeTruthy();

fireEvent.click(screen.getByText('Continue'));
fireEvent.click(screen.getByText('Continue to set password'));
expect(props.onAddAccount).not.toBeCalled();
});

Expand All @@ -43,7 +43,7 @@ describe('AddAccountForm', () => {
});

fireEvent(inputField, pasteEvent);
fireEvent.click(screen.getByText('Continue'));
fireEvent.click(screen.getByText('Continue to set password'));
expect(props.onAddAccount).toBeCalled();
});

Expand Down Expand Up @@ -73,7 +73,7 @@ describe('AddAccountForm', () => {
});

fireEvent(inputField, pasteEvent);
fireEvent.click(screen.getByText('Continue'));
fireEvent.click(screen.getByText('Continue to set password'));
expect(props.onAddAccount).not.toBeCalled();
});

Expand All @@ -92,7 +92,7 @@ describe('AddAccountForm', () => {
},
});
fireEvent(passphraseInput1, pasteEvent);
expect(screen.queryByText('Continue')).toHaveAttribute('disabled');
expect(screen.queryByText('Continue to set password')).toHaveAttribute('disabled');
});

it('should trigger add account if derivation path and passphrase is correct', () => {
Expand All @@ -116,7 +116,7 @@ describe('AddAccountForm', () => {
});
fireEvent(passphraseInput1, pasteEvent);

fireEvent.click(screen.getByText('Continue'));
fireEvent.click(screen.getByText('Continue to set password'));

expect(props.onAddAccount).toHaveBeenCalledWith(
{ value: passphrase, isValid: true },
Expand Down
2 changes: 1 addition & 1 deletion src/modules/pos/validator/components/EditStake/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ const EditStake = ({ history, stakeEdited, network, staking }) => {
)}
<div className={styles.durationSelect}>
<div>
<span>{t('You will get')}</span>
<span>{t('Estimated reward')}</span>
<CategorySwitch
value={selectedDuration}
onChangeCategory={handleSelectDuration}
Expand Down

0 comments on commit 0c34de7

Please sign in to comment.