This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Move network selection to login module - Closes #89 #102
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
877eb84
move network selection to login module, closes #89
reyraa 80a1a2a
set one if the official nodes by default.
reyraa f2a83cd
move login-related tests to login.spec.js, increase test overage
reyraa 47035c6
fix the warning in e2e tests related to address element
reyraa 0729eda
Merge branch 'development' into 89-move-network-selection-to-login
reyraa 4e5edef
minor fixing in dependency versions
reyraa 83a1afb
Add a hack to fix login [age in safari
reyraa cef335a
Change 'network node' in title to 'peer'
reyraa c8e1571
fix spelling issues in test files
reyraa 00c3b1f
hide the ng interpolation markup before binding the actual data
reyraa c72a85d
Merge branch '89-move-network-selection-to-login' of https://github.c…
reyraa 59fc3d3
remove colon when port is not defined
reyraa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ function checkErrorMessage(message) { | |
|
||
function launchApp() { | ||
browser.ignoreSynchronization = true; | ||
browser.driver.manage().window().setSize(1000, 1000); | ||
browser.get('http://localhost:8080#?peerStack=localhost'); | ||
} | ||
|
||
|
@@ -83,11 +84,15 @@ function testNewAccount() { | |
launchApp(); | ||
|
||
element.all(by.css('.md-button.md-primary')).get(0).click(); | ||
/** | ||
* To generate a random pattern of mousemove events, we're randomizing the x,y pairs that | ||
* based on even/odd valkuds of i will locate right/left halves of screen | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spelling and grammar.
|
||
*/ | ||
for (let i = 0; i < 250; i++) { | ||
browser.actions() | ||
.mouseMove(element(by.css('body')), { | ||
x: Math.floor(Math.random() * 1000), | ||
y: Math.floor(Math.random() * 1000), | ||
x: 500 + (Math.floor((((i % 2) * 2) - 1) * (249 + (Math.random() * 250)))), | ||
y: 500 + (Math.floor((((i % 2) * 2) - 1) * (249 + (Math.random() * 250)))), | ||
}).perform(); | ||
browser.sleep(5); | ||
} | ||
|
@@ -120,22 +125,19 @@ function testAddress() { | |
} | ||
|
||
function testPeer() { | ||
login(masterAccount); | ||
waitForElemAndCheckItsText('.peer md-select-value .md-text', 'localhost:4000'); | ||
expect(element.all(by.css('form md-select md-select-value span:first-child')).get(0).getText()).toEqual('Choose your network node'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test doesn't work if you run only this one because you first need to |
||
} | ||
|
||
function testChangePeer() { | ||
login(masterAccount); | ||
|
||
const peerElem = element(by.css('.peer md-select-value')); | ||
browser.wait(EC.presenceOf(peerElem), waitTime); | ||
const peerElem = element(by.css('form md-select')); | ||
// browser.wait(EC.presenceOf(peerElem), waitTime); | ||
peerElem.click(); | ||
|
||
const optionElem = element.all(by.css('md-select-menu md-optgroup md-option')).get(0); | ||
browser.wait(EC.presenceOf(optionElem), waitTime); | ||
optionElem.click(); | ||
|
||
waitForElemAndCheckItsText('.peer md-select-value .md-text', 'node01.lisk.io'); | ||
waitForElemAndCheckItsText('form md-select-value .md-text', 'node01.lisk.io'); | ||
} | ||
|
||
function testShowBalance() { | ||
|
@@ -177,16 +179,17 @@ function testLoadMoreTransactions() { | |
const moreButton = element(by.css('transactions button.more')); | ||
browser.wait(EC.presenceOf(moreButton), waitTime); | ||
moreButton.click(); | ||
browser.sleep(200); | ||
|
||
expect(element.all(by.css('transactions table tbody tr')).count()).toEqual(20); | ||
} | ||
|
||
describe('Lisk Nano functionality', () => { | ||
it('should allow to login', testLogin); | ||
it('should allow to logout', testLogout); | ||
it('should show address', testAddress); | ||
it('should show peer', testPeer); | ||
it('should allow to change peer', testChangePeer); | ||
it('should show address', testAddress); | ||
it('should show balance', testShowBalance); | ||
it('should allow to send transaction when enough funds and correct address form', testSend); | ||
it('should not allow to send transaction when not enough funds', testSendWithNotEnoughFunds); | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would phrase it as:
Choose a peer
.Also, upon logging in, the selection is referred to as a "Peer", not a node.
I'm happy to see either or, as long as the terminology is consistently applied.