1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Merge pull request #5108 from MetaMask/run-ganache-with-blocktime-flag

Fix e2e tests: adapt ganache flags and remove unnecessary checks
This commit is contained in:
Dan J Miller 2018-08-21 15:26:23 -02:30 committed by GitHub
commit 4704f3598e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 15 deletions

View File

@ -460,8 +460,6 @@ describe('MetaMask', function () {
const transactions = await findElements(driver, By.css('.tx-list-item'))
assert.equal(transactions.length, 2)
await findElement(driver, By.xpath(`//span[contains(text(), 'Submitted')]`))
const txStatuses = await findElements(driver, By.css('.tx-list-status'))
await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed/))
@ -515,8 +513,6 @@ describe('MetaMask', function () {
await confirmButton.click()
await delay(regularDelayMs)
await findElement(driver, By.xpath(`//span[contains(text(), 'Submitted')]`))
const txStatuses = await findElements(driver, By.css('.tx-list-status'))
await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed/))
@ -525,15 +521,6 @@ describe('MetaMask', function () {
await delay(regularDelayMs)
})
it('confirms a deploy contract transaction in the popup', async () => {
const windowHandles = await driver.getAllWindowHandles()
const popup = windowHandles[2]
await driver.switchTo().window(popup)
const confirmButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`))
await confirmButton.click()
await delay(regularDelayMs)
})
it('calls and confirms a contract method where ETH is sent', async () => {
await driver.switchTo().window(dapp)
await delay(regularDelayMs)

View File

@ -6,5 +6,5 @@ set -o pipefail
export PATH="$PATH:./node_modules/.bin"
shell-parallel -s 'npm run ganache:start' -x 'sleep 5 && static-server test/e2e/beta/contract-test/ --port 8080' -x 'sleep 5 && mocha test/e2e/beta/metamask-beta-ui.spec'
shell-parallel -s 'npm run ganache:start -- -d' -x 'sleep 5 && static-server test/e2e/beta/contract-test/ --port 8080' -x 'sleep 5 && mocha test/e2e/beta/from-import-beta-ui.spec'
shell-parallel -s 'npm run ganache:start -- -b 2' -x 'sleep 5 && static-server test/e2e/beta/contract-test/ --port 8080' -x 'sleep 5 && mocha test/e2e/beta/metamask-beta-ui.spec'
shell-parallel -s 'npm run ganache:start -- -d -b 2' -x 'sleep 5 && static-server test/e2e/beta/contract-test/ --port 8080' -x 'sleep 5 && mocha test/e2e/beta/from-import-beta-ui.spec'