Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #47 from PureStake/tdb/checkbox-addition
Browse files Browse the repository at this point in the history
fix tests, add id to checkbox
  • Loading branch information
purestaketdb committed Aug 10, 2020
2 parents f100eb1 + 6577c8d commit 9046165
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions packages/test-project/tests/basic-ui-e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,24 @@ describe('Create Account', () => {
for(let i=1; i<=25; i++) {
mnemonicArray[i] = await extensionPage.$eval('#div_'+i, e => e.innerText)
}

await extensionPage.waitForSelector('#recordCheckbox')
await extensionPage.click('#recordCheckbox')
await extensionPage.click('#nextStep')
})

test('Create An Account, Step 3 - Use Mnemonic', async () => {
await extensionPage.waitForSelector('#enterMnemonic')
await extensionPage.waitForSelector('#'+mnemonicArray[1])

for(let i=1; i<=25; i++) {
await extensionPage.click('#'+mnemonicArray[i])

// ugly but works
if(mnemonicArray[i].search('\n') != -1) {
let actualWord = mnemonicArray[i].split('\n');
mnemonicArray[i] = actualWord[1];
}
await extensionPage.waitForSelector('#'+mnemonicArray[i])
await extensionPage.click('#'+mnemonicArray[i])
}

await extensionPage.click('#nextStep')

})
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/CreateAccount/AccountKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ const AccountKeys: FunctionalComponent = (props: any) => {
<div style="padding: 1em;">
<label class="checkbox mb-4">
<input type="checkbox"
class="mr-2"
class="mr-2" id="recordCheckbox" name="recordCheckbox"
value=${recorded}
onClick=${() => setRecorded(!recorded)} />
I’ve securely recorded my & mnemonic
I’ve securely recorded my mnemonic
</label>
<button class="button is-primary is-fullwidth"
Expand Down

0 comments on commit 9046165

Please sign in to comment.