-
Notifications
You must be signed in to change notification settings - Fork 953
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BE-695 Add orderer to node list and network view
Change-Id: Ie2bfc923efd3385e014d3b0994c8955115c0cf35 Signed-off-by: Atsushi Neki <atsushin@fast.au.fujitsu.com>
- Loading branch information
Showing
4 changed files
with
65 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* eslint-disable no-unused-expressions */ | ||
|
||
require('chai').should(); | ||
var expect = require('chai').expect; | ||
|
||
describe('Explorer network view', () => { | ||
before(function() { | ||
// runs before all tests in this block | ||
browser.url('http://explorer.mynetwork.com:8080'); | ||
// Login | ||
var userInput = browser.$('#user'); | ||
var passInput = browser.$('#password'); | ||
userInput.setValue('test'); | ||
passInput.setValue('test'); | ||
var signinBtn = browser.$('#root > div > div > div > form > button > span'); | ||
|
||
signinBtn.click(); | ||
browser.pause(1000); | ||
}); | ||
|
||
describe('node list', () => { | ||
it('should have 4 peers and 1 orderer: BE-695', () => { | ||
// Validate each node name retrieved form the table | ||
var networkLink = browser.$( | ||
'#root > div > div:nth-child(1) > div:nth-child(2) > nav > div > ul > li:nth-child(2)' | ||
); | ||
networkLink.click(); | ||
browser.pause(5000); | ||
|
||
var nodeLists = browser.$$( | ||
'#root > div > div > div > div > div > div > div > div.rt-table > div.rt-tbody > div > div > div:nth-child(1)' | ||
); | ||
let nodeStrList = nodeLists.map((elm, idx, array) => { | ||
return elm.getText(); | ||
}); | ||
expect(nodeStrList).to.include('peer0.org1.example.com'); | ||
expect(nodeStrList).to.include('peer1.org1.example.com'); | ||
expect(nodeStrList).to.include('peer0.org2.example.com'); | ||
expect(nodeStrList).to.include('peer1.org2.example.com'); | ||
expect(nodeStrList).to.include('orderer.example.com'); | ||
}); | ||
}); | ||
}); |