-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 'ballot', 'compiling' and 'testSignature' browser tests under nig…
…htwatch_local Running `npm rpn nightwatch_local`, a few tests would consistently fail due to the "Account" dropdown in the Run Tab (i.e. 'select#txorigin') being filled-in asynchronously and the tests were running without a valid account value. E.g. contract deployment would fail with: "creation of Ballot errored: Invalid account selected" This patch fixes it by adding a, admittedly weird looking, `waitForValue()` function which checks the `value` attribute for some DOM element is present. Browsing the nightwatch API, I expected: `browser.expect.element(selector).value` to provide equivalent functionality but empirically I couldn't get that to work. Tested with: ``` nightwatch 0.9.21 selenium-server-standalone 3.141.5 ChromeDriver 2.43.600233 Chrome 74.0.3729.169 ``` Error message on test failure: ``` - Ballot (13.92s) Timed out while waiting for element <.instance:nth-of-type(2)> to be present for 10000 milliseconds. - expected "found" but got: "not found" at runTests (/home/scottt/work/remix-0.8/remix-ide/test-browser/tests/ballot.js:40:8) at Object.Ballot (/home/scottt/work/remix-0.8/remix-ide/test-browser/tests/ballot.js:19:5) ✖ compiling - Compiling (13.389s) Timed out while waiting for element <.instance:nth-of-type(2)> to be present for 10000 milliseconds. - expected "found" but got: "not found" at /home/scottt/work/remix-0.8/remix-ide/test-browser/tests/compiling.js:43:8 at getCompiledContracts (/home/scottt/work/remix-0.8/remix-ide/test-browser/helpers/contracts.js:84:5) at Object.<anonymous> (/home/scottt/work/remix-0.8/remix-ide/test-browser/helpers/contracts.js:50:5) ✖ generalTests - Simple Contract (40.954s) Failed [equal]: ('' == '0: address: 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') - expected "0: address: 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c" but got: "" at Object.<anonymous> (/home/scottt/work/remix-0.8/remix-ide/test-browser/helpers/contracts.js:129:22) ```
- Loading branch information
Showing
5 changed files
with
63 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters