diff --git a/app/persistence/fabric/MetricService.js b/app/persistence/fabric/MetricService.js index 26633fb03..6664fc02c 100644 --- a/app/persistence/fabric/MetricService.js +++ b/app/persistence/fabric/MetricService.js @@ -133,6 +133,7 @@ class MetricService { c.forEach((item, index) => { txArray.push({ chaincodename: item.chaincodename, + channelName: item.channelname, path: item.path, version: item.version, txCount: item.c, diff --git a/client/test/specs/chaincode_view.js b/client/test/specs/chaincode_view.js new file mode 100644 index 000000000..7a5321317 --- /dev/null +++ b/client/test/specs/chaincode_view.js @@ -0,0 +1,49 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +/* eslint-disable no-unused-expressions */ + +require('chai').should(); + +describe('Explorer chaincode 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('chaincode list', () => { + it('should have an entry: BE-688', () => { + // Num. of blocks + var ccLink = browser.$( + '#root > div > div:nth-child(1) > div:nth-child(2) > nav > div > ul > li:nth-child(5)' + ); + ccLink.click(); + browser.pause(5000); + + var ccName = browser.$( + '#root > div > div > div > div > div > div > div > div.rt-table > div.rt-tbody > div > div > div:nth-child(1)' + ); + ccName.getText().should.be.equal('mycc'); + + var ccTxCount = browser.$( + '#root > div > div > div > div > div > div > div > div.rt-table > div.rt-tbody > div > div > div:nth-child(4)' + ); + ccTxCount.getText().should.be.equal('5'); + + var ccChName = browser.$( + '#root > div > div > div > div > div > div > div > div.rt-table > div.rt-tbody > div > div > div:nth-child(2)' + ); + ccChName.getText().should.be.equal('mychannel'); + }); + }); +}); diff --git a/client/test/wdio.conf.js b/client/test/wdio.conf.js index c235826d4..450226bbc 100644 --- a/client/test/wdio.conf.js +++ b/client/test/wdio.conf.js @@ -59,7 +59,6 @@ exports.config = { // to run chrome headless the following flags are required // (see https://developers.google.com/web/updates/2017/04/headless-chrome) args: [ - '--headless', '--disable-gpu', '--whitelisted-ips', '--no-sandbox',