diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-03-30 04:57:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 04:57:43 +0800 |
commit | 971204eb06a80f3e4dfea9dcc4f34faf06de8923 (patch) | |
tree | 7c99679f2df4fb6cedf1ec9ad0fa21dae705a3d0 /test | |
parent | 552fb1fabecd2f2de0c500aeee2fe633e69e7f5a (diff) | |
parent | 9ec42a87b3d7cf669082c046c5acbd1bc0f5f747 (diff) | |
download | tangerine-wallet-browser-971204eb06a80f3e4dfea9dcc4f34faf06de8923.tar.gz tangerine-wallet-browser-971204eb06a80f3e4dfea9dcc4f34faf06de8923.tar.zst tangerine-wallet-browser-971204eb06a80f3e4dfea9dcc4f34faf06de8923.zip |
Merge branch 'master' into e2e-selector
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/metamask.spec.js | 7 | ||||
-rw-r--r-- | test/unit/nonce-tracker-test.js | 36 |
2 files changed, 41 insertions, 2 deletions
diff --git a/test/e2e/metamask.spec.js b/test/e2e/metamask.spec.js index 1ea8ffdf3..ff5bdb51b 100644 --- a/test/e2e/metamask.spec.js +++ b/test/e2e/metamask.spec.js @@ -49,12 +49,14 @@ describe('Metamask popup page', function () { const privacy = await driver.findElement(By.css('.terms-header')).getText() assert.equal(privacy, 'PRIVACY NOTICE', 'shows privacy notice') driver.findElement(By.css('button')).click() + await delay(300) }) it('should show terms of use', async () => { await delay(300) const terms = await driver.findElement(By.css('.terms-header')).getText() assert.equal(terms, 'TERMS OF USE', 'shows terms of use') + await delay(300) }) it('should be unable to continue without scolling throught the terms of use', async () => { @@ -64,6 +66,7 @@ describe('Metamask popup page', function () { 'Attributions' )) await driver.executeScript('arguments[0].scrollIntoView(true)', element) + await delay(300) }) it('should be able to continue when scrolled to the bottom of terms of use', async () => { @@ -72,10 +75,10 @@ describe('Metamask popup page', function () { await delay(500) assert.equal(buttonEnabled, true, 'enabled continue button') await button.click() + await delay(300) }) it('should accept password with length of eight', async () => { - await delay(300) const passwordBox = await driver.findElement(By.id('password-box')) const passwordBoxConfirm = await driver.findElement(By.id('password-box-confirm')) const button = driver.findElement(By.css('button')) @@ -91,10 +94,10 @@ describe('Metamask popup page', function () { this.seedPhase = await driver.findElement(By.css('.twelve-word-phrase')).getText() const continueAfterSeedPhrase = await driver.findElement(By.css('button')) await continueAfterSeedPhrase.click() + await delay(300) }) it('should show lock account', async () => { - await delay(300) await driver.findElement(By.css('.sandwich-expando')).click() await delay(500) await driver.findElement(By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)')).click() diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 8970cf84d..5a27882ef 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -33,6 +33,42 @@ describe('Nonce Tracker', function () { }) }) + describe('sentry issue 476304902', function () { + beforeEach(function () { + const txGen = new MockTxGen() + pendingTxs = txGen.generate({ status: 'submitted' }, { + fromNonce: 3, + count: 29, + }) + nonceTracker = generateNonceTrackerWith(pendingTxs, [], '0x3') + }) + + it('should return 9', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '32', `nonce should be 32 got ${nonceLock.nextNonce}`) + await nonceLock.releaseLock() + }) + }) + + describe('issue 3670', function () { + beforeEach(function () { + const txGen = new MockTxGen() + pendingTxs = txGen.generate({ status: 'submitted' }, { + fromNonce: 6, + count: 3, + }) + nonceTracker = generateNonceTrackerWith(pendingTxs, [], '0x6') + }) + + it('should return 9', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '9', `nonce should be 9 got ${nonceLock.nextNonce}`) + await nonceLock.releaseLock() + }) + }) + describe('with no previous txs', function () { beforeEach(function () { nonceTracker = generateNonceTrackerWith([], []) |