diff --git a/src/components/forging/forging.pug b/src/components/forging/forging.pug index b62bab4a6..8d8c27218 100644 --- a/src/components/forging/forging.pug +++ b/src/components/forging/forging.pug @@ -1,9 +1,10 @@ md-card.offline-hide div - md-content - div(layout='row', ng-if='$ctrl.delegate && !$ctrl.delegate.username') + md-content(ng-if='!$ctrl.account.get().isDelegate') + div(layout='row') md-card(flex-100, flex-gt-xs=100, layout-align='center center', layout-padding) span.title You need to become a delegate to start forging. If you already registered to become a delegate, your registration hasn't been processed, yet. + md-content(ng-if='$ctrl.account.get().isDelegate') div(layout='column', layout-gt-xs='row') md-card(flex-gt-xs=100, layout-padding) md-card-title diff --git a/test/components/forging/forging.spec.js b/test/components/forging/forging.spec.js index 10a74c9fd..3ad84db93 100644 --- a/test/components/forging/forging.spec.js +++ b/test/components/forging/forging.spec.js @@ -58,6 +58,7 @@ describe('Forging component', () => { balance: lsk.from(100), network, delegate, + isDelegate: true, }; account.set(testAcount); @@ -91,7 +92,7 @@ describe('Forging component', () => { }); it('should contain a card with delegate name', () => { - expect(element.find('md-card').text()).to.contain(delegate.username); + expect(element.find('.delegate-name').text()).to.contain(delegate.username); }); it('should contain a card with rank ', () => {