diff --git a/Makefile b/Makefile index fad59d4c0d..788f266ca6 100644 --- a/Makefile +++ b/Makefile @@ -294,7 +294,7 @@ lint-python: $(FLAKE8) .PHONY: lint-js lint-js: $(NODE_MODULES) - $(NODE_MODULES)/.bin/eslint --cache --rulesdir eslint-rules/ $(GUISRC) + $(NODE_MODULES)/.bin/eslint --rulesdir eslint-rules/ $(GUISRC) .PHONY: lint-css lint-css: $(NODE_MODULES) diff --git a/jujugui/static/gui/src/app/app.js b/jujugui/static/gui/src/app/app.js index 25dc66cd86..bdd8392374 100644 --- a/jujugui/static/gui/src/app/app.js +++ b/jujugui/static/gui/src/app/app.js @@ -463,7 +463,7 @@ YUI.add('juju-gui', function(Y) { // When the environment name becomes available, display it. this.env.after('environmentNameChange', - this.onEnvironmentNameChange, this); + this.onEnvironmentNameChange, this); this.env.after('defaultSeriesChange', this.onDefaultSeriesChange, this); // Once we know about MAAS server, update the header accordingly. @@ -523,20 +523,20 @@ YUI.add('juju-gui', function(Y) { // up sometimes and this binding creates spooky interaction // at a distance and strange failures. this.db.machines.after( - ['add', 'remove', '*:change'], - this.on_database_changed, this); + ['add', 'remove', '*:change'], + this.on_database_changed, this); this.db.services.after( - ['add', 'remove', '*:change'], - this.on_database_changed, this); + ['add', 'remove', '*:change'], + this.on_database_changed, this); this.db.relations.after( - ['add', 'remove', '*:change'], - this.on_database_changed, this); + ['add', 'remove', '*:change'], + this.on_database_changed, this); this.db.environment.after( - ['add', 'remove', '*:change'], - this.on_database_changed, this); + ['add', 'remove', '*:change'], + this.on_database_changed, this); this.db.units.after( - ['add', 'remove', '*:change'], - this.on_database_changed, this); + ['add', 'remove', '*:change'], + this.on_database_changed, this); this.db.notifications.after('add', this._renderNotifications, this); // When someone wants a charm to be deployed they fire an event and we @@ -730,16 +730,16 @@ YUI.add('juju-gui', function(Y) { if (( !creds.areAvailable && gisf && rootState === 'new' ) || ( - this.anonymousMode && rootState !== 'login' - )) { + this.anonymousMode && rootState !== 'login' + )) { this.anonymousMode = true; console.log('now in anonymous mode'); this.maskVisibility(false); return; } if (!creds.areAvailable || - // When using direct deploy when a user is not logged in it will - // navigate to show the login if we do not have this state check. + // When using direct deploy when a user is not logged in it will + // navigate to show the login if we do not have this state check. (currentState.special && currentState.special.dd)) { this._displayLogin(); return; @@ -856,7 +856,7 @@ YUI.add('juju-gui', function(Y) { this.switchEnv(this.createSocketURL( this.get('socketTemplate'), this.get('modelUUID'), publicHost.value, publicHost.port), null, - null, null, true, false); + null, null, true, false); }); }, @@ -885,7 +885,7 @@ YUI.add('juju-gui', function(Y) { gisf={this.get('gisf')} loginToAPIs={this.loginToAPIs.bind(this)} loginToController={loginToController} />, - document.getElementById('login-container')); + document.getElementById('login-container')); }, /** @@ -951,7 +951,7 @@ YUI.add('juju-gui', function(Y) { navigateUserAccount={navigateUserAccount} navigateUserProfile={navigateUserProfile} USSOLoginLink={USSOLoginLink} - />, linkContainer); + />, linkContainer); }, /** @@ -1222,7 +1222,7 @@ YUI.add('juju-gui', function(Y) { gisf={gisf} homePath={homePath} showProfile={showProfile} - />, + />, document.getElementById('header-logo')); }, @@ -1308,7 +1308,7 @@ YUI.add('juju-gui', function(Y) { createCardElement={ this.stripe && this.stripe.createCardElement.bind(this.stripe)} createUser={ - this.payment && this.payment.createUser.bind(this.payment)} + this.payment && this.payment.createUser.bind(this.payment)} credential={env.get('credential')} changes={currentChangeSet} charmsGetById={db.charms.getById.bind(db.charms)} @@ -1325,7 +1325,7 @@ YUI.add('juju-gui', function(Y) { utils, env.genericConstraints, db.units)} generatePath={this.state.generatePath.bind(this.state)} getAgreementsByTerms={ - this.terms.getAgreementsByTerms.bind(this.terms)} + this.terms.getAgreementsByTerms.bind(this.terms)} isLoggedIn={isLoggedIn} getCloudCredentials={ controllerAPI.getCloudCredentials.bind(controllerAPI)} @@ -1334,7 +1334,7 @@ YUI.add('juju-gui', function(Y) { getCloudProviderDetails={utils.getCloudProviderDetails.bind(utils)} getCurrentChangeSet={ecs.getCurrentChangeSet.bind(ecs)} getCountries={ - this.payment && this.payment.getCountries.bind(this.payment) + this.payment && this.payment.getCountries.bind(this.payment) || null} getDiagramURL={charmstore.getDiagramURL.bind(charmstore)} getEntity={charmstore.getEntity.bind(charmstore)} @@ -1532,7 +1532,7 @@ YUI.add('juju-gui', function(Y) { _renderZoom: function() { ReactDOM.render( , + topo={this.views.environment.instance.topo} />, document.getElementById('zoom-container')); }, @@ -1699,10 +1699,10 @@ YUI.add('juju-gui', function(Y) { series={utils.getSeriesList()} upgradeServiceUsingLocalCharm={ localCharmHelpers.upgradeServiceUsingLocalCharm.bind( - this, model, db)} + this, model, db)} uploadLocalCharm={ localCharmHelpers.uploadLocalCharm.bind( - this, model, db)} + this, model, db)} /> ); } else { @@ -1762,7 +1762,7 @@ YUI.add('juju-gui', function(Y) { deployTarget={this.deployTarget.bind(this, charmstore)} series={utils.getSeriesList()} importBundleYAML={this.bundleImporter.importBundleYAML.bind( - this.bundleImporter)} + this.bundleImporter)} getBundleYAML={charmstore.getBundleYAML.bind(charmstore)} getEntity={getEntity} getFile={charmstore.getFile.bind(charmstore)} @@ -1868,7 +1868,7 @@ YUI.add('juju-gui', function(Y) { - - {credential.name} - - - {title} - - + {credential.name} + + + {title} + + - - + + ); }); if (credentialsList.length > 0) { @@ -322,14 +322,14 @@ YUI.add('account-credentials', function() { content = (
{chooseCloud} - - {addForm} + + {addForm}
); } return ( diff --git a/jujugui/static/gui/src/app/components/account/credentials/test-credentials.js b/jujugui/static/gui/src/app/components/account/credentials/test-credentials.js index 0e3b437df9..92c0c95239 100644 --- a/jujugui/static/gui/src/app/components/account/credentials/test-credentials.js +++ b/jujugui/static/gui/src/app/components/account/credentials/test-credentials.js @@ -238,22 +238,22 @@ describe('AccountCredentials', () => { ,
  • - + test2 - - + + Google - - - - + +
  • ]} ); @@ -511,22 +511,22 @@ describe('AccountCredentials', () => { {[
  • - + test2 - - + + Google - - - - + +
  • ]} ); @@ -595,14 +595,14 @@ describe('AccountCredentials', () => {
    {null} - - {null} + + {null}
    @@ -650,7 +650,7 @@ describe('AccountCredentials', () => { diff --git a/jujugui/static/gui/src/app/components/account/payment/charges/charges.js b/jujugui/static/gui/src/app/components/account/payment/charges/charges.js index 1ed31a8aee..217c36d972 100644 --- a/jujugui/static/gui/src/app/components/account/payment/charges/charges.js +++ b/jujugui/static/gui/src/app/components/account/payment/charges/charges.js @@ -182,11 +182,11 @@ YUI.add('account-payment-charges', function() { {(charge.price + charge.vat) / 100} {charge.currency}
    - +
    diff --git a/jujugui/static/gui/src/app/components/account/payment/charges/receipt-popup/test-receipt-popup.js b/jujugui/static/gui/src/app/components/account/payment/charges/receipt-popup/test-receipt-popup.js index 4093844e4e..1a5ae83221 100644 --- a/jujugui/static/gui/src/app/components/account/payment/charges/receipt-popup/test-receipt-popup.js +++ b/jujugui/static/gui/src/app/components/account/payment/charges/receipt-popup/test-receipt-popup.js @@ -39,7 +39,7 @@ describe('ReceiptPopup', function() { getReceipt={sinon.stub()} />, true); const output = renderer.getRenderOutput(); const expected = ( - ); + ); expect(output.props.children).toEqualJSX(expected); }); diff --git a/jujugui/static/gui/src/app/components/account/payment/charges/test-charges.js b/jujugui/static/gui/src/app/components/account/payment/charges/test-charges.js index dd346697fc..e1c124a03c 100644 --- a/jujugui/static/gui/src/app/components/account/payment/charges/test-charges.js +++ b/jujugui/static/gui/src/app/components/account/payment/charges/test-charges.js @@ -336,11 +336,11 @@ describe('AccountPaymentCharges', function() { .props.children[5].props.children.props.action(); output = renderer.getRenderOutput(); const expected = ( - ); + ); expect(output.props.children.props.children[2]).toEqualJSX(expected); }); diff --git a/jujugui/static/gui/src/app/components/account/payment/details/address/address.js b/jujugui/static/gui/src/app/components/account/payment/details/address/address.js index ba02e14878..c40211c905 100644 --- a/jujugui/static/gui/src/app/components/account/payment/details/address/address.js +++ b/jujugui/static/gui/src/app/components/account/payment/details/address/address.js @@ -94,26 +94,26 @@ YUI.add('account-payment-details-address', function() { address={this.props.address} getCountries={this.props.getCountries} />
    - -
    - - -
    + +
    + + +
    ); diff --git a/jujugui/static/gui/src/app/components/account/payment/details/address/test-address.js b/jujugui/static/gui/src/app/components/account/payment/details/address/test-address.js index 878a3a3486..52b7cfee70 100644 --- a/jujugui/static/gui/src/app/components/account/payment/details/address/test-address.js +++ b/jujugui/static/gui/src/app/components/account/payment/details/address/test-address.js @@ -86,26 +86,26 @@ describe('AccountPaymentDetailsAddress', () => { address={address} getCountries={getCountries} />
    - -
    - - -
    + +
    + + +
    ); expect(output).toEqualJSX(expected); diff --git a/jujugui/static/gui/src/app/components/account/payment/details/details.js b/jujugui/static/gui/src/app/components/account/payment/details/details.js index 38875c6fed..a71efd38d0 100644 --- a/jujugui/static/gui/src/app/components/account/payment/details/details.js +++ b/jujugui/static/gui/src/app/components/account/payment/details/details.js @@ -80,10 +80,10 @@ YUI.add('account-payment-details', function() { disabled={true} label="Name" value={user.name} /> - + {business ? ( ); diff --git a/jujugui/static/gui/src/app/components/account/payment/details/test-details.js b/jujugui/static/gui/src/app/components/account/payment/details/test-details.js index ae28ad236a..1ad2544c18 100644 --- a/jujugui/static/gui/src/app/components/account/payment/details/test-details.js +++ b/jujugui/static/gui/src/app/components/account/payment/details/test-details.js @@ -98,19 +98,19 @@ describe('AccountPaymentDetails', () => { disabled={true} label="Name" value="Geoffrey Spinach" /> - - - -
    + + + +

    Addresses ); + ); }, /** diff --git a/jujugui/static/gui/src/app/components/added-services-list/added-services-list.js b/jujugui/static/gui/src/app/components/added-services-list/added-services-list.js index 14aa597841..f09750b86e 100644 --- a/jujugui/static/gui/src/app/components/added-services-list/added-services-list.js +++ b/jujugui/static/gui/src/app/components/added-services-list/added-services-list.js @@ -41,20 +41,20 @@ YUI.add('added-services-list', function() { var items = []; services.each((service) => { items.push( - ); + ); }); return items; }, diff --git a/jujugui/static/gui/src/app/components/added-services-list/item/item.js b/jujugui/static/gui/src/app/components/added-services-list/item/item.js index 0e64e9d5c2..41c4b928bb 100644 --- a/jujugui/static/gui/src/app/components/added-services-list/item/item.js +++ b/jujugui/static/gui/src/app/components/added-services-list/item/item.js @@ -135,12 +135,12 @@ YUI.add('added-services-list-item', function() { var statusIndicator = this._renderStatusIndicator(statusData); return (
  • + data-serviceid={service.id} + onClick={this._onClickHandler} + onMouseEnter={this._onMouseEnter} + onMouseLeave={this._onMouseLeave} + tabIndex="0" + role="button"> {service.unit_count} diff --git a/jujugui/static/gui/src/app/components/added-services-list/item/test-item.js b/jujugui/static/gui/src/app/components/added-services-list/item/test-item.js index 259420738b..99ccaba896 100644 --- a/jujugui/static/gui/src/app/components/added-services-list/item/test-item.js +++ b/jujugui/static/gui/src/app/components/added-services-list/item/test-item.js @@ -50,25 +50,25 @@ describe('AddedServicesListItem', function() { mockService.set('fade', false); var renderer = jsTestUtils.shallowRender( - , true); + , true); var output = renderer.getRenderOutput(); var expected = (
  • + data-serviceid="wordpress" + onClick={output.props.onClick} + onMouseEnter={output.props.onMouseEnter} + onMouseLeave={output.props.onMouseLeave} + tabIndex="0" + role="button"> 2 {' '} @@ -121,25 +121,25 @@ describe('AddedServicesListItem', function() { return false; }}; var renderer = jsTestUtils.shallowRender( - , true); + , true); var output = renderer.getRenderOutput(); assert.deepEqual(output,
  • + data-serviceid="demo" + onClick={output.props.onClick} + onMouseEnter={output.props.onMouseEnter} + onMouseLeave={output.props.onMouseLeave} + tabIndex="0" + role="button"> 1 {' '} @@ -180,23 +180,23 @@ describe('AddedServicesListItem', function() { var output = renderer.getRenderOutput(); assert.deepEqual(output, -
  • - - 5 - {' '} - +
  • + + 5 + {' '} + demo - - - {undefined} - -
  • ); + + + {undefined} + + ); }); it('prioiritizes error, over pending status icon', function() { @@ -225,23 +225,23 @@ describe('AddedServicesListItem', function() { var output = renderer.getRenderOutput(); assert.deepEqual(output, -
  • - - 2 - {' '} - +
  • + + 2 + {' '} + demo - - - 1 - -
  • ); + + + 1 + + ); }); it('prioritizes pending over uncommitted status icon', function() { @@ -270,23 +270,23 @@ describe('AddedServicesListItem', function() { var output = renderer.getRenderOutput(); assert.deepEqual(output, -
  • - - 2 - {' '} - +
  • + + 2 + {' '} + demo - - - 1 - -
  • ); + + + 1 + + ); }); it('calls the changeState callable on click', function() { @@ -306,14 +306,14 @@ describe('AddedServicesListItem', function() { var panToService = sinon.stub(); var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); output.props.onClick({ currentTarget: { @@ -345,14 +345,14 @@ describe('AddedServicesListItem', function() { var changeStub = sinon.stub(); var hoverService = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.onMouseEnter(); assert.equal(hoverService.callCount, 1); assert.equal(hoverService.args[0][0], 'apache2'); @@ -373,14 +373,14 @@ describe('AddedServicesListItem', function() { var changeStub = sinon.stub(); var hoverService = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.onMouseLeave(); assert.equal(hoverService.callCount, 1); assert.equal(hoverService.args[0][0], 'apache2'); diff --git a/jujugui/static/gui/src/app/components/added-services-list/test-added-services-list.js b/jujugui/static/gui/src/app/components/added-services-list/test-added-services-list.js index 754db914b8..85d1380ac1 100644 --- a/jujugui/static/gui/src/app/components/added-services-list/test-added-services-list.js +++ b/jujugui/static/gui/src/app/components/added-services-list/test-added-services-list.js @@ -40,16 +40,16 @@ describe('AddedServicesList', () => { var hoverService = sinon.stub(); var panToService = sinon.stub(); var renderer = jsTestUtils.shallowRender( - , true); + , true); var output = renderer.getRenderOutput(); diff --git a/jujugui/static/gui/src/app/components/address-form/test-address-form.js b/jujugui/static/gui/src/app/components/address-form/test-address-form.js index 443af34b8c..c8ca2b32ea 100644 --- a/jujugui/static/gui/src/app/components/address-form/test-address-form.js +++ b/jujugui/static/gui/src/app/components/address-form/test-address-form.js @@ -252,7 +252,7 @@ describe('AddressForm', function() { }]} value={undefined}/> - {null} + {null} ); diff --git a/jujugui/static/gui/src/app/components/budget-table/test-budget-table.js b/jujugui/static/gui/src/app/components/budget-table/test-budget-table.js index dd45d6b5d4..e3588430b1 100644 --- a/jujugui/static/gui/src/app/components/budget-table/test-budget-table.js +++ b/jujugui/static/gui/src/app/components/budget-table/test-budget-table.js @@ -73,31 +73,31 @@ describe('BudgetTable', function() { {[, - ]} + acl={acl} + allocationEditable={false} + charmsGetById={undefined} + extraInfo={undefined} + key={0} + listPlansForCharm={listPlansForCharm} + parseTermId={undefined} + plansEditable={false} + service={{}} + showExtra={undefined} + showTerms={showTerms} + withPlans={true} />, + ]} ); assert.deepEqual(output, expected); }); @@ -127,31 +127,31 @@ describe('BudgetTable', function() { {undefined} {[, - ]} + acl={acl} + allocationEditable={false} + charmsGetById={undefined} + extraInfo={undefined} + key={0} + listPlansForCharm={listPlansForCharm} + parseTermId={undefined} + plansEditable={false} + service={{}} + showExtra={undefined} + showTerms={showTerms} + withPlans={false} />, + ]} ); assert.deepEqual(output, expected); }); @@ -194,31 +194,31 @@ describe('BudgetTable', function() { {[, - ]} + acl={acl} + allocationEditable={false} + charmsGetById={undefined} + extraInfo={undefined} + key={0} + listPlansForCharm={listPlansForCharm} + parseTermId={undefined} + plansEditable={true} + service={{}} + showExtra={undefined} + showTerms={showTerms} + withPlans={true} />, + ]} ); assert.deepEqual(output, expected); }); diff --git a/jujugui/static/gui/src/app/components/charmbrowser/charmbrowser.js b/jujugui/static/gui/src/app/components/charmbrowser/charmbrowser.js index 7fa1198d8d..2e5521826f 100644 --- a/jujugui/static/gui/src/app/components/charmbrowser/charmbrowser.js +++ b/jujugui/static/gui/src/app/components/charmbrowser/charmbrowser.js @@ -160,70 +160,70 @@ YUI.add('charmbrowser-component', function() { switch (this.state.activeComponent) { case 'store': activeChild = ( - + ); break; case 'search-results': const search = currentState.search; activeChild = ( - + ); break; case 'entity-details': // TODO frankban: do we still really need this? const id = currentState.store || `~${currentState.user}`; activeChild = ( - + key={id} + pluralize={utils.pluralize} + listPlansForCharm={this.props.listPlansForCharm} + makeEntityModel={this.props.makeEntityModel} + scrollCharmbrowser={this._scrollCharmbrowser} + setPageTitle={this.props.setPageTitle} + showTerms={this.props.showTerms} + urllib={this.props.urllib} + /> ); break; } diff --git a/jujugui/static/gui/src/app/components/charmbrowser/test-charmbrowser.js b/jujugui/static/gui/src/app/components/charmbrowser/test-charmbrowser.js index fad2a4590f..ea67ef2482 100644 --- a/jujugui/static/gui/src/app/components/charmbrowser/test-charmbrowser.js +++ b/jujugui/static/gui/src/app/components/charmbrowser/test-charmbrowser.js @@ -85,33 +85,33 @@ describe('Charmbrowser', function() { var output = renderer.getRenderOutput(); const searchResults = output.props.children.props.children.props; var expected = ( - -
    - -
    -
    ); + +
    + +
    +
    ); expect(output).toEqualJSX(expected); }); @@ -151,23 +151,23 @@ describe('Charmbrowser', function() { var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var expected = ( - -
    - -
    -
    ); + +
    + +
    +
    ); expect(output).toEqualJSX(expected); }); @@ -224,40 +224,40 @@ describe('Charmbrowser', function() { const instance = renderer.getMountedInstance(); const output = renderer.getRenderOutput(); const expectedOutput = ( - -
    - -
    -
    ); + +
    + +
    +
    ); expect(output).toEqualJSX(expectedOutput); }); diff --git a/jujugui/static/gui/src/app/components/check-list-item/test-check-list-item.js b/jujugui/static/gui/src/app/components/check-list-item/test-check-list-item.js index bdf546ee37..4872de5661 100644 --- a/jujugui/static/gui/src/app/components/check-list-item/test-check-list-item.js +++ b/jujugui/static/gui/src/app/components/check-list-item/test-check-list-item.js @@ -30,112 +30,112 @@ describe('CheckListItem', () => { it('renders ui based on props', () => { const renderer = jsTestUtils.shallowRender( - , true); + , true); const instance = renderer.getMountedInstance(); const output = renderer.getRenderOutput(); expect(output).toEqualJSX( -
  • -
  • + -
  • ); + + + ); }); it('displays extraInfo when provided', () => { const renderer = jsTestUtils.shallowRender( - , true); + , true); const instance = renderer.getMountedInstance(); const output = renderer.getRenderOutput(); expect(output).toEqualJSX( -
  • -
  • + -
  • ); + + + ); }); it('does not set a "for" id on the label if it is a nav element', () => { const output = jsTestUtils.shallowRender( - ); + ); assert.equal(output.props.children.props.htmlFor, ''); }); it('has a nav class if it is a nav element', () => { const output = jsTestUtils.shallowRender( - ); + ); assert.isTrue(output.props.className.indexOf( - 'check-list-item--nav') > -1); + 'check-list-item--nav') > -1); }); it('calls the supplied whenChanged if supplied', () => { @@ -165,15 +165,15 @@ describe('CheckListItem', () => { // Need to render the full component here as shallowRenderer does not yet // support simulating click events. const output = testUtils.renderIntoDocument( - ); + ); const checkbox = testUtils.findRenderedDOMComponentWithTag(output, 'input'); testUtils.Simulate.click(checkbox); assert.equal(actionStub.callCount, 0); @@ -181,15 +181,15 @@ describe('CheckListItem', () => { it('can have a disabled checkbox', () => { const renderer = jsTestUtils.shallowRender( - , true); + , true); const instance = renderer.getMountedInstance(); const output = renderer.getRenderOutput(); const expected = ( @@ -208,12 +208,12 @@ describe('CheckListItem', () => { it('can toggle the checkbox from the hit area', () => { const renderer = jsTestUtils.shallowRender( - , true); + , true); const instance = renderer.getMountedInstance(); let output = renderer.getRenderOutput(); // Simulate clicking on the hit area. diff --git a/jujugui/static/gui/src/app/components/copy-to-clipboard/test-copy-to-clipboard.js b/jujugui/static/gui/src/app/components/copy-to-clipboard/test-copy-to-clipboard.js index 7c451f4eec..690c55331f 100644 --- a/jujugui/static/gui/src/app/components/copy-to-clipboard/test-copy-to-clipboard.js +++ b/jujugui/static/gui/src/app/components/copy-to-clipboard/test-copy-to-clipboard.js @@ -18,7 +18,7 @@ with this program. If not, see . 'use strict'; -var juju = {components: {}}; // eslint-disable-line no-unused-vars +var juju = {components: {}}; // eslint-disable-line no-unused-vars var testUtils = React.addons.TestUtils; var realClipboard; @@ -42,15 +42,15 @@ describe('CopyToClipboard', function() { it('renders with a default value', function() { var output = jsTestUtils.shallowRender( - ); + ); var className = output.props.className; var expected = (
    + ref="input" + readOnly="true" + type="text" + value=""/>
    -
    +
    +
    -
    + diff --git a/jujugui/static/gui/src/app/components/deployment-flow/budget/test-budget.js b/jujugui/static/gui/src/app/components/deployment-flow/budget/test-budget.js index 170f185076..b4cdf65989 100644 --- a/jujugui/static/gui/src/app/components/deployment-flow/budget/test-budget.js +++ b/jujugui/static/gui/src/app/components/deployment-flow/budget/test-budget.js @@ -132,14 +132,14 @@ describe('DeploymentBudget', function() { disabled={false} type="base" title="Cancel" /> - -
    +
    +
    -
    + @@ -226,14 +226,14 @@ describe('DeploymentBudget', function() { disabled={true} type="base" title="Cancel" /> - -
    +
    +
    -
    + diff --git a/jujugui/static/gui/src/app/components/deployment-flow/changes/test-changes.js b/jujugui/static/gui/src/app/components/deployment-flow/changes/test-changes.js index b1f56b7a82..d52f4d5b71 100644 --- a/jujugui/static/gui/src/app/components/deployment-flow/changes/test-changes.js +++ b/jujugui/static/gui/src/app/components/deployment-flow/changes/test-changes.js @@ -53,10 +53,10 @@ describe('DeploymentChanges', function() { change={changes[0]} key={changes[0].id} showTime={false} />, - ]} + ]} ); assert.deepEqual(output, expected); diff --git a/jujugui/static/gui/src/app/components/deployment-flow/cloud/cloud.js b/jujugui/static/gui/src/app/components/deployment-flow/cloud/cloud.js index d3ab241db9..24f67b5696 100644 --- a/jujugui/static/gui/src/app/components/deployment-flow/cloud/cloud.js +++ b/jujugui/static/gui/src/app/components/deployment-flow/cloud/cloud.js @@ -143,9 +143,9 @@ YUI.add('deployment-cloud', function() { } return info.showLogo ? ( ) : info.title; + height={info.svgHeight} + name={info.id} + width={info.svgWidth} />) : info.title; }, render: function() { diff --git a/jujugui/static/gui/src/app/components/deployment-flow/credential/add/test-add.js b/jujugui/static/gui/src/app/components/deployment-flow/credential/add/test-add.js index d2a0c4e25a..5e383e2a5d 100644 --- a/jujugui/static/gui/src/app/components/deployment-flow/credential/add/test-add.js +++ b/jujugui/static/gui/src/app/components/deployment-flow/credential/add/test-add.js @@ -99,19 +99,19 @@ describe('DeploymentCredentialAdd', function() { var cloud = getCloudProviderDetails('gce'); var renderer = jsTestUtils.shallowRender( , true); + acl={acl} + addNotification={sinon.stub()} + updateCloudCredential={sinon.stub()} + close={sinon.stub()} + cloud={null} + credentials={[]} + getCloudProviderDetails={getCloudProviderDetails} + generateCloudCredentialName={sinon.stub()} + getCredentials={sinon.stub()} + sendAnalytics={sendAnalytics} + setCredential={sinon.stub()} + user="user-admin" + validateForm={sinon.stub()} />, true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); const buttons = output.props.children[3].props.children.props.buttons; @@ -249,20 +249,20 @@ describe('DeploymentCredentialAdd', function() { it('can render without a cancel button', function() { var renderer = jsTestUtils.shallowRender( , true); + acl={acl} + addNotification={sinon.stub()} + updateCloudCredential={sinon.stub()} + close={sinon.stub()} + cloud={null} + credentials={[]} + getCloudProviderDetails={getCloudProviderDetails} + generateCloudCredentialName={sinon.stub()} + getCredentials={sinon.stub()} + hideCancel={true} + sendAnalytics={sendAnalytics} + setCredential={sinon.stub()} + user="user-admin" + validateForm={sinon.stub()} />, true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); const buttons = output.props.children[3].props.children.props.buttons; @@ -277,35 +277,35 @@ describe('DeploymentCredentialAdd', function() { it('can update to a new cloud', function() { const renderer = jsTestUtils.shallowRender( , true); + acl={acl} + addNotification={sinon.stub()} + updateCloudCredential={sinon.stub()} + close={sinon.stub()} + cloud={null} + credentials={[]} + getCloudProviderDetails={getCloudProviderDetails} + generateCloudCredentialName={sinon.stub()} + getCredentials={sinon.stub()} + sendAnalytics={sendAnalytics} + setCredential={sinon.stub()} + user="user-admin" + validateForm={sinon.stub()} />, true); let output = renderer.getRenderOutput(); renderer.render( ); + acl={acl} + addNotification={sinon.stub()} + updateCloudCredential={sinon.stub()} + close={close} + cloud={{name: 'aws', cloudType: 'ec2'}} + credentials={[]} + getCloudProviderDetails={getCloudProviderDetails} + generateCloudCredentialName={sinon.stub()} + getCredentials={sinon.stub()} + sendAnalytics={sendAnalytics} + setCredential={sinon.stub()} + user="user-admin" + validateForm={sinon.stub()} />); const cloud = getCloudProviderDetails('ec2'); output = renderer.getRenderOutput(); const buttons = output.props.children[3].props.children.props.buttons; @@ -400,7 +400,7 @@ describe('DeploymentCredentialAdd', function() { it('can render credential fields for a cloud', function() { var cloud = getCloudProviderDetails('gce'); var renderer = jsTestUtils.shallowRender( - , - , - , - , - + , + , + , + ]}
    @@ -554,7 +554,7 @@ describe('DeploymentCredentialAdd', function() { it('can render a cloud with a json field', function() { var cloud = getCloudProviderDetails('gce'); var renderer = jsTestUtils.shallowRender( - - {[ -
    - -
    - ]} + {[ +
    + +
    + ]}

    @@ -657,7 +657,7 @@ describe('DeploymentCredentialAdd', function() { acl.isReadOnly = sinon.stub().returns(true); var cloud = getCloudProviderDetails('gce'); var renderer = jsTestUtils.shallowRender( - , true); + acl={acl} + addNotification={sinon.stub()} + updateCloudCredential={updateCloudCredential} + close={sinon.stub()} + cloud={{name: 'google', cloudType: 'gce'}} + credentials={[]} + getCloudProviderDetails={getCloudProviderDetails} + generateCloudCredentialName={sinon.stub().returns('new@test')} + getCredentials={getCredentials} + sendAnalytics={sendAnalytics} + setCredential={sinon.stub()} + user="user-admin" + validateForm={sinon.stub().returns(true)} />, true); var instance = renderer.getMountedInstance(); instance.refs = { 'credentialName': { @@ -870,7 +870,7 @@ describe('DeploymentCredentialAdd', function() { it('properly unescapes necessary fields', function() { const updateCloudCredential = sinon.stub(); const renderer = jsTestUtils.shallowRender( - , true); + acl={acl} + addNotification={sinon.stub()} + updateCloudCredential={updateCloudCredential} + close={sinon.stub()} + cloud={{name: 'google', cloudType: 'gce'}} + credentials={[]} + getCloudProviderDetails={getCloudProviderDetails} + generateCloudCredentialName={sinon.stub()} + getCredentials={sinon.stub()} + sendAnalytics={sendAnalytics} + setCredential={sinon.stub()} + user="user-admin" + validateForm={sinon.stub().returns(false)} />, true); var instance = renderer.getMountedInstance(); instance._handleAddCredentials(); assert.equal(updateCloudCredential.callCount, 0); @@ -945,19 +945,19 @@ describe('DeploymentCredentialAdd', function() { const addNotification = sinon.stub(); var renderer = jsTestUtils.shallowRender( , true); + acl={acl} + addNotification={addNotification} + updateCloudCredential={updateCloudCredential} + close={sinon.stub()} + cloud={{name: 'google', cloudType: 'gce'}} + credentials={[]} + getCloudProviderDetails={getCloudProviderDetails} + generateCloudCredentialName={sinon.stub().returns('new@test')} + getCredentials={sinon.stub()} + sendAnalytics={sendAnalytics} + setCredential={sinon.stub()} + user="user-admin" + validateForm={sinon.stub().returns(true)} />, true); var instance = renderer.getMountedInstance(); instance.refs = { 'credentialName': { diff --git a/jujugui/static/gui/src/app/components/deployment-flow/credential/credential.js b/jujugui/static/gui/src/app/components/deployment-flow/credential/credential.js index e35c086905..5cb322b469 100644 --- a/jujugui/static/gui/src/app/components/deployment-flow/credential/credential.js +++ b/jujugui/static/gui/src/app/components/deployment-flow/credential/credential.js @@ -260,13 +260,13 @@ YUI.add('deployment-credential', function() { return (

    - +
    - -
    ); + +
    ); } if (this.state.entityModel) { @@ -73,8 +73,8 @@ YUI.add('deployment-direct-deploy', function() { renderMarkdown={this.props.renderMarkdown} />; const title = (

    - {entity.displayName} -

    ); + {entity.displayName} +

    ); let url; let link; @@ -89,9 +89,9 @@ YUI.add('deployment-direct-deploy', function() { if (url) { link = ( + className="link" target="_blank"> Learn more about this {this.state.isBundle ? 'bundle' : 'charm'}. - ); + ); } const wrapperClasses = classNames( @@ -104,10 +104,10 @@ YUI.add('deployment-direct-deploy', function() { titleAndDescription = (
    - {title} - {description} - {link} -
    ); + {title} + {description} + {link} + ); } return ( diff --git a/jujugui/static/gui/src/app/components/deployment-flow/signup/signup.js b/jujugui/static/gui/src/app/components/deployment-flow/signup/signup.js index 6465edabfd..c2ea7f8f9f 100644 --- a/jujugui/static/gui/src/app/components/deployment-flow/signup/signup.js +++ b/jujugui/static/gui/src/app/components/deployment-flow/signup/signup.js @@ -173,7 +173,7 @@ YUI.add('deployment-signup', function() { - + ); } diff --git a/jujugui/static/gui/src/app/components/deployment-flow/test-deployment-flow.js b/jujugui/static/gui/src/app/components/deployment-flow/test-deployment-flow.js index caa79d5f4a..516378065e 100644 --- a/jujugui/static/gui/src/app/components/deployment-flow/test-deployment-flow.js +++ b/jujugui/static/gui/src/app/components/deployment-flow/test-deployment-flow.js @@ -905,7 +905,7 @@ describe('DeploymentFlow', function() { charmsGetById: charmsGetById, cloud: {name: 'cloud'}, credential: 'cred', - deploy: sinon.stub(), // Don't trigger a re-render by calling callback. + deploy: sinon.stub(), // Don't trigger a re-render by calling callback. modelCommitted: true, region: 'north' }); diff --git a/jujugui/static/gui/src/app/components/entity-details/content/config-option/config-option.js b/jujugui/static/gui/src/app/components/entity-details/content/config-option/config-option.js index 40581c18fc..a2e821303f 100644 --- a/jujugui/static/gui/src/app/components/entity-details/content/config-option/config-option.js +++ b/jujugui/static/gui/src/app/components/entity-details/content/config-option/config-option.js @@ -37,8 +37,8 @@ YUI.add('entity-content-config-option', function() { _generateDefault: function(defaultValue) { if (defaultValue) { return
    - {defaultValue} -
    ; + {defaultValue} + ; } return; }, @@ -48,7 +48,7 @@ YUI.add('entity-content-config-option', function() { return (
    + className="entity-content__config-name"> {option.name}
    diff --git a/jujugui/static/gui/src/app/components/entity-details/content/config-option/test-config-option.js b/jujugui/static/gui/src/app/components/entity-details/content/config-option/test-config-option.js index 96cf3e624a..b11ec0e5a4 100644 --- a/jujugui/static/gui/src/app/components/entity-details/content/config-option/test-config-option.js +++ b/jujugui/static/gui/src/app/components/entity-details/content/config-option/test-config-option.js @@ -38,24 +38,24 @@ describe('EntityContentConfigOption', function() { ); assert.deepEqual(output, -
    -
    +
    +
    password -
    -
    -

    - + +

    +

    + ({'string'}) - - {' '} + + {' '} Required password -

    -
    -
    +

    +
    +
    abc123 -
    -
    ); + + ); }); it('can render without a default value', function() { @@ -68,21 +68,21 @@ describe('EntityContentConfigOption', function() { ); assert.deepEqual(output, -
    -
    +
    +
    password -
    -
    -

    - + +

    +

    + ({'string'}) - - {' '} + + {' '} Required password -

    -
    - {undefined} -
    ); +

    + + {undefined} + ); }); }); diff --git a/jujugui/static/gui/src/app/components/entity-details/content/content.js b/jujugui/static/gui/src/app/components/entity-details/content/content.js index 0015b8f7c1..9417c6603f 100644 --- a/jujugui/static/gui/src/app/components/entity-details/content/content.js +++ b/jujugui/static/gui/src/app/components/entity-details/content/content.js @@ -489,9 +489,9 @@ YUI.add('entity-content', function() { var quantityItem; if (quantity) { quantityItem = ( - + / {quantity} - ); + ); } priceList.push(
  • { childItems.push(buildList.call(this, `${path}/${child}`, - children[child])); + children[child])); }); return (
  • - , true); + , true); var output = renderer.getRenderOutput(); var instance = renderer.getMountedInstance(); var archiveUrl = `${apiUrl}/django/archive`; diff --git a/jujugui/static/gui/src/app/components/entity-details/content/readme/readme.js b/jujugui/static/gui/src/app/components/entity-details/content/readme/readme.js index 0119230c90..c247f4b205 100644 --- a/jujugui/static/gui/src/app/components/entity-details/content/readme/readme.js +++ b/jujugui/static/gui/src/app/components/entity-details/content/readme/readme.js @@ -86,7 +86,7 @@ YUI.add('entity-content-readme', function() { } else { var id = entityModel.get('id'); this.readmeXhr = this.props.getFile( - id, readmeFile, this._getReadmeCallback); + id, readmeFile, this._getReadmeCallback); } }, diff --git a/jujugui/static/gui/src/app/components/entity-details/content/test-content.js b/jujugui/static/gui/src/app/components/entity-details/content/test-content.js index 37c7706f6c..089b138948 100644 --- a/jujugui/static/gui/src/app/components/entity-details/content/test-content.js +++ b/jujugui/static/gui/src/app/components/entity-details/content/test-content.js @@ -69,19 +69,19 @@ describe('EntityContent', function() { const scrollCharmbrowser = sinon.stub(); mockEntity.set('resources', [{resource: 'one'}]); const renderer = jsTestUtils.shallowRender( - , true); + , true); const option1 = { description: 'Your username', type: 'string', @@ -207,18 +207,18 @@ describe('EntityContent', function() { revision: 10 }); const renderer = jsTestUtils.shallowRender( - , true); + , true); const output = renderer.getRenderOutput(); const terms = output.props.children[0].props.children.props.children[1]; const links = terms.props.children[1].props.children; @@ -227,15 +227,15 @@ describe('EntityContent', function() {

    Terms

      {[
    • + key="terms1" + onClick={links[0].props.onClick}> terms1 -
    • , -
    • +
    • , +
    • terms2 -
    • ]} + ]}
    ); expect(terms).toEqualJSX(expected); @@ -253,18 +253,18 @@ describe('EntityContent', function() { revision: 10 }); const renderer = jsTestUtils.shallowRender( - , true); + , true); const instance = renderer.getMountedInstance(); let output = renderer.getRenderOutput(); const terms = output.props.children[0].props.children.props.children[1]; @@ -285,18 +285,18 @@ describe('EntityContent', function() { const showTerms = sinon.stub(); showTerms.onFirstCall(); const renderer = jsTestUtils.shallowRender( - , true); + , true); const output = renderer.getRenderOutput(); const expected = (
    @@ -312,18 +312,18 @@ describe('EntityContent', function() { const showTerms = sinon.stub().onFirstCall().callsArgWith(2, 'Uh oh', null); const addNotification = sinon.stub(); const renderer = jsTestUtils.shallowRender( - , true); + , true); renderer.getRenderOutput(); assert.equal(addNotification.callCount, 1); assert.deepEqual(addNotification.args[0][0], { @@ -338,18 +338,18 @@ describe('EntityContent', function() { const abort = sinon.stub(); const showTerms = sinon.stub().returns({abort: abort}); const renderer = jsTestUtils.shallowRender( - , true); + , true); renderer.unmount(); assert.equal(abort.callCount, 2); }); @@ -358,18 +358,18 @@ describe('EntityContent', function() { mockEntity.set('bugUrl', 'http://example.com/bugs'); mockEntity.set('homepage', 'http://example.com/'); const renderer = jsTestUtils.shallowRender( - , true); + , true); const output = renderer.getRenderOutput(); const expected = (
    @@ -517,19 +517,19 @@ describe('EntityContent', function() { const script = generateScript(true); const scrollCharmbrowser = sinon.stub(); const output = jsTestUtils.shallowRender( - ); + ); const expected = (
    {undefined} @@ -558,8 +558,8 @@ describe('EntityContent', function() {
  • + className="link" + target="_blank"> Project homepage
  • @@ -686,18 +686,18 @@ describe('EntityContent', function() { mockEntity.set('bugUrl', 'http://example.com/bugs'); mockEntity.set('homepage', 'http://example.com/'); const renderer = jsTestUtils.shallowRender( - , true); + , true); const output = renderer.getRenderOutput(); const expected = (
    @@ -733,18 +733,18 @@ describe('EntityContent', function() { const pluralize = sinon.spy(); mockEntity.set('relations', {requires: {}, provides: {}}); const renderer = jsTestUtils.shallowRender( - , true); + , true); const output = renderer.getRenderOutput(); const parent = output.props.children[2].props.children.props.children[1]; const relationsComponent = parent.props.children[2]; diff --git a/jujugui/static/gui/src/app/components/entity-details/entity-details.js b/jujugui/static/gui/src/app/components/entity-details/entity-details.js index 50f9c384b2..5eb016253b 100644 --- a/jujugui/static/gui/src/app/components/entity-details/entity-details.js +++ b/jujugui/static/gui/src/app/components/entity-details/entity-details.js @@ -73,58 +73,58 @@ YUI.add('entity-details', function() { switch (this.state.activeComponent) { case 'loading': activeChild = ( -
    - -
    +
    + +
    ); break; case 'entity-details': var entityModel = this.state.entityModel; activeChild = ( -
    - - {this._generateDiagram(entityModel)} - -
    +
    + + {this._generateDiagram(entityModel)} + +
    ); break; case 'error': activeChild = ( -

    +

    There was a problem while loading the entity details. You could try searching for another charm or bundle or go{' '} - + back - . -

    + . +

    ); break; } diff --git a/jujugui/static/gui/src/app/components/entity-details/header/header.js b/jujugui/static/gui/src/app/components/entity-details/header/header.js index 49275565e2..628bc63114 100644 --- a/jujugui/static/gui/src/app/components/entity-details/header/header.js +++ b/jujugui/static/gui/src/app/components/entity-details/header/header.js @@ -252,14 +252,14 @@ YUI.add('entity-header', function() { var unitCount = entity.unitCount; var machineCount = entity.machineCount; return (
      -
    • - {serviceCount} {this.props.pluralize('application', serviceCount)}, +
    • + {serviceCount} {this.props.pluralize('application', serviceCount)},   - {machineCount} {this.props.pluralize('machine', machineCount)}, + {machineCount} {this.props.pluralize('machine', machineCount)},   - {unitCount} {this.props.pluralize('unit', unitCount)} -
    • -
    ); + {unitCount} {this.props.pluralize('unit', unitCount)} + + ); }, /** @@ -278,7 +278,7 @@ YUI.add('entity-header', function() { + target="_blank"> @@ -310,9 +310,9 @@ YUI.add('entity-header', function() { const url = props.urllib.fromLegacyString(lastRevision); return (
  • - + Latest revision ({url.revision}) - +
  • ); }, @@ -420,7 +420,7 @@ YUI.add('entity-header', function() { if (entity.type !== 'bundle') { icon = ({entity.displayName}); + width="96" className="entity-header__icon"/>); } return (
  • + target="_blank" + href={googlePlusUrl}> diff --git a/jujugui/static/gui/src/app/components/entity-details/header/test-header.js b/jujugui/static/gui/src/app/components/entity-details/header/test-header.js index 7913ab56e3..44d18fd71d 100644 --- a/jujugui/static/gui/src/app/components/entity-details/header/test-header.js +++ b/jujugui/static/gui/src/app/components/entity-details/header/test-header.js @@ -48,20 +48,20 @@ describe('EntityHeader', function() { it('renders the latest entity properly', function() { const renderer = jsTestUtils.shallowRender( - , true); + , true); const instance = renderer.getMountedInstance(); const output = renderer.getRenderOutput(); const expectedOutput = ( @@ -72,7 +72,7 @@ describe('EntityHeader', function() {
    django + width="96" className="entity-header__icon"/>

    , true); + , true); const output = renderer.getRenderOutput(); assert.deepEqual( output.props.children.props.children.props.children[0]. - props.children[1].props.children[2].props.children[1], + props.children[1].props.children[2].props.children[1], 122 ); }); @@ -174,21 +174,21 @@ describe('EntityHeader', function() { it('can display plans', function() { const plans = [{url: 'test'}]; const renderer = jsTestUtils.shallowRender( - , true); + , true); const output = renderer.getRenderOutput(); const expectedOutput = ( , true); + , true); const output = renderer.getRenderOutput(); assert.deepEqual( output.props.children.props.children.props.children[1].props.children[0], @@ -264,20 +264,20 @@ describe('EntityHeader', function() { pluralize.withArgs('unit').returns('units'); const entity = jsTestUtils.makeEntity(true); const renderer = jsTestUtils.shallowRender( - , true); + , true); const output = renderer.getRenderOutput(); const expectedOutput = (
      @@ -291,26 +291,26 @@ describe('EntityHeader', function() {
    ); expect( output.props.children.props.children.props.children[0]. - props.children[3]).toEqualJSX(expectedOutput); + props.children[3]).toEqualJSX(expectedOutput); }); it('can mark charms as subordinates', function() { const entity = jsTestUtils.makeEntity(false, {is_subordinate: true}); const renderer = jsTestUtils.shallowRender( - , true); + , true); const output = renderer.getRenderOutput(); const expected = (
  • @@ -318,7 +318,7 @@ describe('EntityHeader', function() { + target="_blank"> @@ -326,7 +326,7 @@ describe('EntityHeader', function() {
  • ); expect( output.props.children.props.children.props.children[0]. - props.children[2].props.children[1]).toEqualJSX(expected); + props.children[2].props.children[1]).toEqualJSX(expected); }); it('displays an add to model button', function() { @@ -655,20 +655,20 @@ describe('EntityHeader', function() { it('can disable the deploy button when read only', function() { acl.isReadOnly = sinon.stub().returns(true); const renderer = jsTestUtils.shallowRender( - , true); + , true); const instance = renderer.getMountedInstance(); const output = renderer.getRenderOutput(); const expectedOutput = ( diff --git a/jujugui/static/gui/src/app/components/entity-details/test-entity-details.js b/jujugui/static/gui/src/app/components/entity-details/test-entity-details.js index 958bbe968c..0d22070282 100644 --- a/jujugui/static/gui/src/app/components/entity-details/test-entity-details.js +++ b/jujugui/static/gui/src/app/components/entity-details/test-entity-details.js @@ -59,39 +59,39 @@ describe('EntityDetails', function() { const showTerms = sinon.stub(); const scrollCharmbrowser = sinon.stub(); const shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); const instance = shallowRenderer.getMountedInstance(); instance.refs = {content: {focus: sinon.stub()}}; instance.componentDidMount(); const output = shallowRenderer.getRenderOutput(); assert.isTrue(getEntity.calledOnce, - 'getEntity function not called'); + 'getEntity function not called'); assert.equal(getEntity.args[0][0], id, - 'getEntity not called with the entity ID'); + 'getEntity not called with the entity ID'); const expectedOutput = (
    -
    +

    ); expect(output).toEqualJSX(expectedOutput); @@ -144,30 +144,30 @@ describe('EntityDetails', function() { const getFile = sinon.spy(); const renderMarkdown = sinon.spy(); const shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); const instance = shallowRenderer.getMountedInstance(); instance.refs = {content: {focus: sinon.stub()}}; instance.componentDidMount(); @@ -207,39 +207,39 @@ describe('EntityDetails', function() { const showTerms = sinon.stub(); const scrollCharmbrowser = sinon.stub(); const shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); const instance = shallowRenderer.getMountedInstance(); instance.refs = {content: {focus: sinon.stub()}}; instance.componentDidMount(); const output = shallowRenderer.getRenderOutput(); assert.isTrue(getEntity.calledOnce, - 'getEntity function not called'); + 'getEntity function not called'); assert.equal(getEntity.args[0][0], id, - 'getEntity not called with the entity ID'); + 'getEntity not called with the entity ID'); const expectedOutput = (
    -
    +
  • ); expect(output).toEqualJSX(expectedOutput); }); @@ -296,30 +296,30 @@ describe('EntityDetails', function() { const getFile = sinon.spy(); const renderMarkdown = sinon.spy(); const shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); const instance = shallowRenderer.getMountedInstance(); instance.refs = {content: {focus: sinon.stub()}}; instance.componentDidMount(); @@ -410,9 +410,9 @@ describe('EntityDetails', function() { instance.componentDidMount(); const output = shallowRenderer.getRenderOutput(); assert.isTrue(getEntity.calledOnce, - 'getEntity function not called'); + 'getEntity function not called'); assert.equal(getEntity.args[0][0], id, - 'getEntity not called with the entity ID'); + 'getEntity not called with the entity ID'); const expectedOutput = (
    -
    + ); expect(output).toEqualJSX(expectedOutput); assert.equal(listPlansForCharm.callCount, 1); @@ -504,9 +504,9 @@ describe('EntityDetails', function() { instance.componentDidMount(); const output = shallowRenderer.getRenderOutput(); assert.isTrue(getEntity.calledOnce, - 'getEntity function not called'); + 'getEntity function not called'); assert.equal(getEntity.args[0][0], id, - 'getEntity not called with the entity ID'); + 'getEntity not called with the entity ID'); const expectedOutput = (
    -
    + ); expect(output).toEqualJSX(expectedOutput); assert.equal(listPlansForCharm.callCount, 1); diff --git a/jujugui/static/gui/src/app/components/env-size-display/env-size-display.js b/jujugui/static/gui/src/app/components/env-size-display/env-size-display.js index d69ccf9015..65ea519980 100644 --- a/jujugui/static/gui/src/app/components/env-size-display/env-size-display.js +++ b/jujugui/static/gui/src/app/components/env-size-display/env-size-display.js @@ -74,25 +74,25 @@ YUI.add('env-size-display', function() { return (
    ); diff --git a/jujugui/static/gui/src/app/components/env-size-display/test-env-size-display.js b/jujugui/static/gui/src/app/components/env-size-display/test-env-size-display.js index 7c93de7764..0d1bed47ab 100644 --- a/jujugui/static/gui/src/app/components/env-size-display/test-env-size-display.js +++ b/jujugui/static/gui/src/app/components/env-size-display/test-env-size-display.js @@ -51,40 +51,40 @@ describe('EnvSizeDisplay', function() { pluralize.withArgs('application').returns('applications'); pluralize.withArgs('machine').returns('machines'); var component = renderIntoDocument( - ); + ); assert.equal( - queryComponentSelector( - component, 'a[data-view=application]').innerText, '3 applications'); + queryComponentSelector( + component, 'a[data-view=application]').innerText, '3 applications'); assert.equal( - queryComponentSelector( - component, 'a[data-view=machine]').innerText, '4 machines'); + queryComponentSelector( + component, 'a[data-view=machine]').innerText, '4 machines'); }); it('highlights active tab on initial render', function() { var component = renderIntoDocument( - ); + ); assert.notEqual( - queryComponentSelector( - component, - '.env-size-display__list-item.is-active a[data-view=machine]'), - null); + queryComponentSelector( + component, + '.env-size-display__list-item.is-active a[data-view=machine]'), + null); }); it('calls to change state when list item is clicked', function() { var component = renderIntoDocument( - ); + ); var serviceLink = queryComponentSelector(component, 'a[data-view=application]'); var machineLink = queryComponentSelector(component, @@ -103,11 +103,11 @@ describe('EnvSizeDisplay', function() { it('highlights the tab which was clicked on', function() { var component = renderIntoDocument( - ); + ); var serviceLink = queryComponentSelector(component, 'a[data-view=application]'); var machineLink = queryComponentSelector(component, @@ -115,10 +115,10 @@ describe('EnvSizeDisplay', function() { testUtils.Simulate.click(machineLink); assert.notEqual( - queryComponentSelector( - component, - '.env-size-display__list-item.is-active a[data-view=machine]'), - null); + queryComponentSelector( + component, + '.env-size-display__list-item.is-active a[data-view=machine]'), + null); assert.equal(appState.changeState.callCount, 1); assert.deepEqual(appState.changeState.args[0][0], { gui: { @@ -129,10 +129,10 @@ describe('EnvSizeDisplay', function() { appState.current.gui.application = true; testUtils.Simulate.click(serviceLink); assert.notEqual( - queryComponentSelector( - component, - '.env-size-display__list-item.is-active a[data-view=application]'), - null); + queryComponentSelector( + component, + '.env-size-display__list-item.is-active a[data-view=application]'), + null); assert.equal(appState.changeState.callCount, 2); assert.deepEqual(appState.changeState.args[0][0], { diff --git a/jujugui/static/gui/src/app/components/env-switcher/list/test-list.js b/jujugui/static/gui/src/app/components/env-switcher/list/test-list.js index 89b59855ac..b11a638cb1 100644 --- a/jujugui/static/gui/src/app/components/env-switcher/list/test-list.js +++ b/jujugui/static/gui/src/app/components/env-switcher/list/test-list.js @@ -258,8 +258,8 @@ describe('EnvList', function() { switchModel={switchModel} user={{username: 'who@local', displayName: 'who'}} />); testUtils.Simulate.click( - ReactDOM.findDOMNode(component) - .querySelector('.button--neutral')); + ReactDOM.findDOMNode(component) + .querySelector('.button--neutral')); assert.equal(switchModel.callCount, 1); }); @@ -277,8 +277,8 @@ describe('EnvList', function() { switchModel={switchModel} user={{username: 'who@local', displayName: 'who'}} />); testUtils.Simulate.click( - ReactDOM.findDOMNode(component) - .querySelector('.button--neutral')); + ReactDOM.findDOMNode(component) + .querySelector('.button--neutral')); assert.equal(switchModel.callCount, 0); }); }); diff --git a/jujugui/static/gui/src/app/components/env-switcher/test-env-switcher.js b/jujugui/static/gui/src/app/components/env-switcher/test-env-switcher.js index 0cd4a43f7f..7a3d28bb94 100644 --- a/jujugui/static/gui/src/app/components/env-switcher/test-env-switcher.js +++ b/jujugui/static/gui/src/app/components/env-switcher/test-env-switcher.js @@ -47,28 +47,28 @@ describe('EnvSwitcher', function() { var output = renderer.getRenderOutput(); var expected =
    - ; + + +
    + {undefined} + ; assert.deepEqual(output, expected); }); diff --git a/jujugui/static/gui/src/app/components/environment/environment.js b/jujugui/static/gui/src/app/components/environment/environment.js index 552fd77fb7..d0e3c0ee99 100644 --- a/jujugui/static/gui/src/app/components/environment/environment.js +++ b/jujugui/static/gui/src/app/components/environment/environment.js @@ -30,9 +30,9 @@ YUI.add('environment', function() { Add a charm or bundle to get started

    -

    +

    Drop file to add to model -

    +

    - + ); }; diff --git a/jujugui/static/gui/src/app/components/expanding-row/test-expanding-row.js b/jujugui/static/gui/src/app/components/expanding-row/test-expanding-row.js index 5c550ae4c0..10859c3bdb 100644 --- a/jujugui/static/gui/src/app/components/expanding-row/test-expanding-row.js +++ b/jujugui/static/gui/src/app/components/expanding-row/test-expanding-row.js @@ -39,7 +39,7 @@ describe('ExpandingRow', () => { var expected = (
  • + onClick={instance._toggle}>
    closed
    @@ -68,9 +68,9 @@ describe('ExpandingRow', () => { output = renderer.getRenderOutput(); const expected = (
  • + onClick={instance._toggle}>
    closed
    @@ -103,7 +103,7 @@ describe('ExpandingRow', () => {
  • + onClick={instance._toggle}> {output.props.children}
  • ); assert.deepEqual(output, expected); @@ -133,7 +133,7 @@ describe('ExpandingRow', () => {
  • + onClick={instance._toggle}> {output.props.children}
  • ); assert.deepEqual(output, expected); diff --git a/jujugui/static/gui/src/app/components/generic-button/test-generic-button.js b/jujugui/static/gui/src/app/components/generic-button/test-generic-button.js index ed9eb2e520..8d2ca7d0ee 100644 --- a/jujugui/static/gui/src/app/components/generic-button/test-generic-button.js +++ b/jujugui/static/gui/src/app/components/generic-button/test-generic-button.js @@ -33,8 +33,8 @@ describe('GenericButton', function() { it('calls the callable provided when clicked', function() { var callbackStub = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.onClick({ stopPropagation: sinon.stub() }); @@ -44,9 +44,9 @@ describe('GenericButton', function() { it('does not call the callable if clicked when disabled', function() { var callbackStub = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.onClick({ stopPropagation: sinon.stub() }); @@ -56,9 +56,9 @@ describe('GenericButton', function() { it('does not submit when disabled', function() { var preventDefault = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.onClick({ preventDefault: preventDefault, stopPropagation: sinon.stub() @@ -70,7 +70,7 @@ describe('GenericButton', function() { // This is checking that code is not executed and so there are no side // effects to check. No syntax error is considered a success. var output = jsTestUtils.shallowRender( - ); + ); output.props.onClick({ stopPropagation: sinon.stub() }); @@ -80,8 +80,8 @@ describe('GenericButton', function() { var callbackStub = sinon.stub(); var stopPropagation = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.onClick({ stopPropagation: stopPropagation }); @@ -90,9 +90,9 @@ describe('GenericButton', function() { it('displays the provided title and tooltip', function() { var output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output, ); }); it('sets the disabled class if disabled', function() { var output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output, ); }); it('sets the extra classes if provided', function() { var output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output, ); }); diff --git a/jujugui/static/gui/src/app/components/generic-input/generic-input.js b/jujugui/static/gui/src/app/components/generic-input/generic-input.js index dd5c1d16a1..f3c4597e27 100644 --- a/jujugui/static/gui/src/app/components/generic-input/generic-input.js +++ b/jujugui/static/gui/src/app/components/generic-input/generic-input.js @@ -278,10 +278,10 @@ YUI.add('generic-input', function() { ); // If there's an error and an inline icon has been explicitly asked for. const errorIcon = showErrors && this.props.inlineErrorIcon ? - () : undefined; + () : undefined; return (
    {labelElement} diff --git a/jujugui/static/gui/src/app/components/generic-input/test-generic-input.js b/jujugui/static/gui/src/app/components/generic-input/test-generic-input.js index 5df5b1b20b..2a0351eeff 100644 --- a/jujugui/static/gui/src/app/components/generic-input/test-generic-input.js +++ b/jujugui/static/gui/src/app/components/generic-input/test-generic-input.js @@ -51,7 +51,7 @@ describe('GenericInput', function() { + htmlFor="Region"> Region
    + htmlFor="Region"> Region { it('can render', () => { const renderer = jsTestUtils.shallowRender( - , true); + , true); const instance = renderer.getMountedInstance(); const output = renderer.getRenderOutput(); const expected = ( @@ -46,9 +46,9 @@ describe('HashLink', () => { it('can change the has state', () => { const changeState = sinon.stub(); const renderer = jsTestUtils.shallowRender( - , true); + , true); const output = renderer.getRenderOutput(); output.props.onClick(); assert.equal(changeState.callCount, 1); diff --git a/jujugui/static/gui/src/app/components/header-breadcrumb/header-breadcrumb.js b/jujugui/static/gui/src/app/components/header-breadcrumb/header-breadcrumb.js index fd5158496b..ebbd7a8951 100644 --- a/jujugui/static/gui/src/app/components/header-breadcrumb/header-breadcrumb.js +++ b/jujugui/static/gui/src/app/components/header-breadcrumb/header-breadcrumb.js @@ -178,8 +178,8 @@ YUI.add('header-breadcrumb', function() {
    Loading model
      + // This attribute is required by uitests. + data-username={user && user.displayName}> {userItem} {this._renderEnvSwitcher()}
    diff --git a/jujugui/static/gui/src/app/components/header-breadcrumb/test-header-breadcrumb.js b/jujugui/static/gui/src/app/components/header-breadcrumb/test-header-breadcrumb.js index 0b6311ce90..13ca7db0c0 100644 --- a/jujugui/static/gui/src/app/components/header-breadcrumb/test-header-breadcrumb.js +++ b/jujugui/static/gui/src/app/components/header-breadcrumb/test-header-breadcrumb.js @@ -90,9 +90,9 @@ describe('HeaderBreadcrumb', () => {
    • + onClick={comp.clickUser} + title="who" + href="/u/who"> who
    • @@ -125,9 +125,9 @@ describe('HeaderBreadcrumb', () => {
      • + onClick={comp.clickUser} + title="rose" + href="/u/rose"> rose
      • @@ -161,9 +161,9 @@ describe('HeaderBreadcrumb', () => {
        • + onClick={comp.clickUser} + title="cyberman" + href="/u/cyberman"> cyberman
        • diff --git a/jujugui/static/gui/src/app/components/header-help/header-help.js b/jujugui/static/gui/src/app/components/header-help/header-help.js index 132bc899cd..c8d580d377 100644 --- a/jujugui/static/gui/src/app/components/header-help/header-help.js +++ b/jujugui/static/gui/src/app/components/header-help/header-help.js @@ -117,22 +117,22 @@ YUI.add('header-help', function() { -
            - {this._generateDocsLink()} - {this._generateIssuesLink()} -
          • + {this._generateDocsLink()} + {this._generateIssuesLink()} +
          • - + role="menuItem" + tabIndex="0" onClick={this._handleShortcutsLink}> + Keyboard shortcuts - + Shift + ? - -
          • -
          -
          ); + + +
        + ); } return ''; }, diff --git a/jujugui/static/gui/src/app/components/header-help/test-header-help.js b/jujugui/static/gui/src/app/components/header-help/test-header-help.js index 7f4b52625f..4ae468f1cb 100644 --- a/jujugui/static/gui/src/app/components/header-help/test-header-help.js +++ b/jujugui/static/gui/src/app/components/header-help/test-header-help.js @@ -48,25 +48,25 @@ describe('HeaderHelp', function() { const instance = renderer.getMountedInstance(); const expected =
        -
        ; + + {''} +
    ; assert.deepEqual(output, expected); }); @@ -93,26 +93,26 @@ describe('HeaderHelp', function() { const expected = ( -
      -
    • +
    • - File Issue -
    • -
    • + File Issue +
    • +
    • - + role="menuItem" tabIndex="0" + onClick={instance._handleShortcutsLink}> + Keyboard shortcuts - + Shift + ? - -
    • -
    -
    ); + + + + ); expect(output.props.children[1]).toEqualJSX(expected); }); @@ -133,34 +133,34 @@ describe('HeaderHelp', function() { const expected = ( - - ); + + + + ); expect(output.props.children[1]).toEqualJSX(expected); }); @@ -183,34 +183,34 @@ describe('HeaderHelp', function() { const expected = ( - - ); + + + + ); expect(output.props.children[1]).toEqualJSX(expected); } ); diff --git a/jujugui/static/gui/src/app/components/header-logo/header-logo.js b/jujugui/static/gui/src/app/components/header-logo/header-logo.js index d90e09789f..0860a71594 100644 --- a/jujugui/static/gui/src/app/components/header-logo/header-logo.js +++ b/jujugui/static/gui/src/app/components/header-logo/header-logo.js @@ -59,9 +59,9 @@ YUI.add('header-logo', function() { render: function() { return ( + onClick={this._showProfile} + role="button" + title="Home"> {this._svg()} ); } diff --git a/jujugui/static/gui/src/app/components/header-search/test-header-search.js b/jujugui/static/gui/src/app/components/header-search/test-header-search.js index a72a0f4e32..6929562e02 100644 --- a/jujugui/static/gui/src/app/components/header-search/test-header-search.js +++ b/jujugui/static/gui/src/app/components/header-search/test-header-search.js @@ -148,8 +148,8 @@ describe('HeaderSearch', function() { const input = output.refs.searchInput; testUtils.Simulate.focus(input); assert.isTrue( - output.refs.headerSearchContainer - .classList.contains('header-search--active')); + output.refs.headerSearchContainer + .classList.contains('header-search--active')); assert.equal(appState.changeState.callCount, 1); assert.deepEqual(appState.changeState.args[0][0], { root: 'store', diff --git a/jujugui/static/gui/src/app/components/inset-select/test-inset-select.js b/jujugui/static/gui/src/app/components/inset-select/test-inset-select.js index 909678b0a6..35d16c8c6f 100644 --- a/jujugui/static/gui/src/app/components/inset-select/test-inset-select.js +++ b/jujugui/static/gui/src/app/components/inset-select/test-inset-select.js @@ -54,8 +54,8 @@ describe('InsetSelect', function() { required={undefined} ref="field"> {[]} @@ -128,8 +128,8 @@ describe('InsetSelect', function() { required={undefined} ref="field"> {[]} diff --git a/jujugui/static/gui/src/app/components/inspector/change-version/change-version.js b/jujugui/static/gui/src/app/components/inspector/change-version/change-version.js index 0da9b9e8e5..10107d70d8 100644 --- a/jujugui/static/gui/src/app/components/inspector/change-version/change-version.js +++ b/jujugui/static/gui/src/app/components/inspector/change-version/change-version.js @@ -101,7 +101,7 @@ YUI.add('inspector-change-version', function() { return; } this.props.setCharm(this.props.service.get('id'), charmId, false, false, - this._setCharmCallback.bind(this, charmId)); + this._setCharmCallback.bind(this, charmId)); }, /** @@ -154,7 +154,7 @@ YUI.add('inspector-change-version', function() { _getVersions: function(charmId) { this.setState({loading: true}); this.versionsXhr = this.props.getAvailableVersions( - charmId, this._getVersionsCallback); + charmId, this._getVersionsCallback); }, /** @@ -173,7 +173,7 @@ YUI.add('inspector-change-version', function() { if (!versions || versions.length === 1) { components =
  • No other versions found. -
  • ; + ; } else { const url = window.jujulib.URL.fromLegacyString(this.props.charmId); versions.forEach(function(version) { @@ -233,7 +233,7 @@ YUI.add('inspector-change-version', function() {
    {this._displayVersionsList(this.state.loading, - this.state.versionsList)} + this.state.versionsList)} ); } diff --git a/jujugui/static/gui/src/app/components/inspector/change-version/test-change-version.js b/jujugui/static/gui/src/app/components/inspector/change-version/test-change-version.js index 9b13343502..1e7c19b5ef 100644 --- a/jujugui/static/gui/src/app/components/inspector/change-version/test-change-version.js +++ b/jujugui/static/gui/src/app/components/inspector/change-version/test-change-version.js @@ -42,17 +42,17 @@ describe('InspectorChangeVersion', function() { var getCharm = sinon.stub(); var getAvailableVersions = sinon.stub(); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); var output = shallowRenderer.getRenderOutput(); assert.deepEqual(output, @@ -78,17 +78,17 @@ describe('InspectorChangeVersion', function() { var getCharm = sinon.stub(); var getAvailableVersions = sinon.stub(); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); getAvailableVersions.callsArgWith(1, null, ['cs:django']); shallowRenderer.getMountedInstance().componentDidMount(); var output = shallowRenderer.getRenderOutput(); @@ -119,17 +119,17 @@ describe('InspectorChangeVersion', function() { 'cs:django-4', 'cs:django-5', 'cs:django-6' ]); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); var output = shallowRenderer.getRenderOutput(); var list = output.props.children[1]; @@ -171,17 +171,17 @@ describe('InspectorChangeVersion', function() { var getCharm = sinon.stub(); var getAvailableVersions = sinon.stub().callsArg(1, 'bad wolf', []); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); var output = shallowRenderer.getRenderOutput(); assert.deepEqual(output, @@ -211,17 +211,17 @@ describe('InspectorChangeVersion', function() { 'cs:django-4', 'cs:django-5', 'cs:django-6' ]); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); var output = shallowRenderer.getRenderOutput(); output.props.children[0].props.children[1].props.onClick(); @@ -240,17 +240,17 @@ describe('InspectorChangeVersion', function() { 'cs:django-4', 'cs:django-5', 'cs:django-6' ]); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); var output = shallowRenderer.getRenderOutput(); output.props.children[1].props.children[0].props.itemAction(); @@ -275,17 +275,17 @@ describe('InspectorChangeVersion', function() { 'cs:django-4', 'cs:django-5', 'cs:django-6' ]); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); var output = shallowRenderer.getRenderOutput(); output.props.children[1].props.children[0].props.buttonAction(); @@ -314,17 +314,17 @@ describe('InspectorChangeVersion', function() { 'cs:django-4', 'cs:django-5', 'cs:django-6' ]); const shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); const output = shallowRenderer.getRenderOutput(); output.props.children[1].props.children[0].props.buttonAction(); @@ -347,17 +347,17 @@ describe('InspectorChangeVersion', function() { 'cs:django-4', 'cs:django-5', 'cs:django-6' ]); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); var output = shallowRenderer.getRenderOutput(); output.props.children[1].props.children[0].props.buttonAction(); @@ -382,17 +382,17 @@ describe('InspectorChangeVersion', function() { 'cs:django-4', 'cs:django-5', 'cs:django-6' ]); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); var output = shallowRenderer.getRenderOutput(); output.props.children[1].props.children[0].props.buttonAction(); @@ -413,17 +413,17 @@ describe('InspectorChangeVersion', function() { var getCharm = sinon.stub(); var getAvailableVersions = sinon.stub().returns({abort: abort}); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); shallowRenderer.unmount(); assert.equal(abort.callCount, 1); diff --git a/jujugui/static/gui/src/app/components/inspector/config/config.js b/jujugui/static/gui/src/app/components/inspector/config/config.js index 287e565cf8..4028d2c15c 100644 --- a/jujugui/static/gui/src/app/components/inspector/config/config.js +++ b/jujugui/static/gui/src/app/components/inspector/config/config.js @@ -267,23 +267,23 @@ YUI.add('inspector-config', function() { if (option.type === 'boolean') { const label = option.key + ':'; configElements.push( - ); + ); } else { configElements.push( - ); + ); } }); return configElements; diff --git a/jujugui/static/gui/src/app/components/inspector/config/test-config.js b/jujugui/static/gui/src/app/components/inspector/config/test-config.js index 2fed1356d0..ceb7146034 100644 --- a/jujugui/static/gui/src/app/components/inspector/config/test-config.js +++ b/jujugui/static/gui/src/app/components/inspector/config/test-config.js @@ -1003,16 +1003,16 @@ describe('Configuration', function() { var expected = (
    - + {undefined} ); + ); assert.deepEqual(output,

    My message

    + buttons={buttons} />
    ); }); it('generates the correct classes if it is open', function() { const output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output,

    My message

    + buttons={buttons} />
    ); }); it('displays the provided message', function() { const output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output.props.children[0],

    My message @@ -90,8 +90,8 @@ describe('InspectorConfirm', function() { it('hides the message if one is not provided', function() { const output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output.props.children[0],

    {undefined} @@ -101,8 +101,8 @@ describe('InspectorConfirm', function() { it('leaves out the button row if there are no buttons', function() { buttons = []; const output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output.props.children[1], undefined); }); }); diff --git a/jujugui/static/gui/src/app/components/inspector/expose/expose.js b/jujugui/static/gui/src/app/components/inspector/expose/expose.js index 87499b9b0d..59330341da 100644 --- a/jujugui/static/gui/src/app/components/inspector/expose/expose.js +++ b/jujugui/static/gui/src/app/components/inspector/expose/expose.js @@ -81,8 +81,8 @@ YUI.add('inspector-expose', function() { return; } return

      - {this._generateUnits()} -
    ; + {this._generateUnits()} + ; }, /** @@ -95,10 +95,10 @@ YUI.add('inspector-expose', function() { var serviceId = service.get('id'); if (service.get('exposed')) { this.props.unexposeService(serviceId, - this._exposeServiceCallback, {}); + this._exposeServiceCallback, {}); } else { this.props.exposeService(serviceId, - this._exposeServiceCallback, {}); + this._exposeServiceCallback, {}); } }, @@ -126,21 +126,21 @@ YUI.add('inspector-expose', function() { }; return (
    -
    - -
    -

    +

    + +
    +

    Exposing this application may make it publicly accessible from the web -

    - {this._displayUnitList()} +

    + {this._displayUnitList()}
    ); } diff --git a/jujugui/static/gui/src/app/components/inspector/expose/test-expose.js b/jujugui/static/gui/src/app/components/inspector/expose/test-expose.js index 2385ac9a75..dc0ef7cb2d 100644 --- a/jujugui/static/gui/src/app/components/inspector/expose/test-expose.js +++ b/jujugui/static/gui/src/app/components/inspector/expose/test-expose.js @@ -42,33 +42,33 @@ describe('InspectorExpose', function() { var service = {get: getStub}; var toggle = {key: 'expose-toggle'}; var output = jsTestUtils.shallowRender( - ); + ); var toggleItem = output.props.children[0].props.children; assert.deepEqual(output, -
    -
    - -
    -

    +

    +
    + +
    +

    Exposing this application may make it publicly accessible from the web -

    - {undefined} -
    ); +

    + {undefined} +
    ); }); it('can render correctly if exposed', function() { @@ -83,42 +83,42 @@ describe('InspectorExpose', function() { ]; var units = {toArray: sinon.stub().returns(unitList)}; var output = jsTestUtils.shallowRender( - ); + ); var toggleItem = output.props.children[0].props.children; assert.deepEqual(output, -
    -
    - -
    -

    +

    +
    + +
    +

    Exposing this application may make it publicly accessible from the web -

    -
      - - -
    -
    ); +

    +
      + + +
    +
    ); }); it('can navigate to a unit', function() { @@ -130,14 +130,14 @@ describe('InspectorExpose', function() { var unitList = [{id: 'django/1'}]; var units = {toArray: sinon.stub().returns(unitList)}; var output = jsTestUtils.shallowRender( - ); + ); output.props.children[2].props.children[0].props.action({ currentTarget: { getAttribute: sinon.stub().returns('django/1') @@ -163,14 +163,14 @@ describe('InspectorExpose', function() { getStub.withArgs('exposed').returns(false); var service = {get: getStub}; var output = jsTestUtils.shallowRender( - ); + ); output.props.children[0].props.children.props.onChange(); assert.equal(exposeService.callCount, 1); assert.deepEqual(exposeService.args[0][0], 'demo'); @@ -186,14 +186,14 @@ describe('InspectorExpose', function() { var unitList = [{id: 'django/1'}]; var units = {toArray: sinon.stub().returns(unitList)}; var output = jsTestUtils.shallowRender( - ); + ); output.props.children[0].props.children.props.onChange(); assert.equal(unexposeService.callCount, 1); assert.deepEqual(unexposeService.args[0][0], 'demo'); @@ -208,14 +208,14 @@ describe('InspectorExpose', function() { getStub.withArgs('exposed').returns(false); var service = {get: getStub}; var output = jsTestUtils.shallowRender( - ); + ); output.props.children[0].props.children.props.onChange(); assert.equal(addNotification.callCount, 1); assert.equal(addNotification.args[0][0].title, 'Exposing charm failed'); @@ -229,14 +229,14 @@ describe('InspectorExpose', function() { var service = {get: getStub}; var toggle = {key: 'expose-toggle'}; var output = jsTestUtils.shallowRender( - ); + ); var toggleItem = output.props.children[0].props.children; var expected = ( , true); + , true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var expected = (
  • -
    +
    django/1 -
    - +
    +
  • ); assert.deepEqual(output, expected); }); @@ -90,21 +90,21 @@ describe('InspectorExposeUnit', function() { }; var action = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); var expected = (
  • -
    +
    django/1 -
    -
    +
    +
    No public address -
    +
  • ); assert.deepEqual(output, expected); }); diff --git a/jujugui/static/gui/src/app/components/inspector/expose/unit/unit.js b/jujugui/static/gui/src/app/components/inspector/expose/unit/unit.js index b156f5c018..f46694cdd9 100644 --- a/jujugui/static/gui/src/app/components/inspector/expose/unit/unit.js +++ b/jujugui/static/gui/src/app/components/inspector/expose/unit/unit.js @@ -85,10 +85,10 @@ YUI.add('inspector-expose-unit', function() {
  • -
    - {unit.displayName} -
    - {publicList} +
    + {unit.displayName} +
    + {publicList}
  • ); } diff --git a/jujugui/static/gui/src/app/components/inspector/header/header.js b/jujugui/static/gui/src/app/components/inspector/header/header.js index 6fd0b8e25d..d378867ba5 100644 --- a/jujugui/static/gui/src/app/components/inspector/header/header.js +++ b/jujugui/static/gui/src/app/components/inspector/header/header.js @@ -63,8 +63,8 @@ YUI.add('inspector-header', function() { }, render: function() { - var backIconGrey = ''; // eslint-disable-line max-len - var backIconWhite = ''; // eslint-disable-line max-len + var backIconGrey = ''; // eslint-disable-line max-len + var backIconWhite = ''; // eslint-disable-line max-len var type = this.props.type; var backIcon = type && type !== 'started' ? backIconWhite : backIconGrey; diff --git a/jujugui/static/gui/src/app/components/inspector/header/test-header.js b/jujugui/static/gui/src/app/components/inspector/header/test-header.js index 218d85d306..d0390e3218 100644 --- a/jujugui/static/gui/src/app/components/inspector/header/test-header.js +++ b/jujugui/static/gui/src/app/components/inspector/header/test-header.js @@ -34,9 +34,9 @@ describe('InspectorHeader', function() { it('displays the provided title', function() { var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.equal(output.props.children[1].props.children, 'Juju GUI'); }); @@ -44,10 +44,10 @@ describe('InspectorHeader', function() { it('adds a class based on the provided type', function() { var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.equal(output.props.className, @@ -57,9 +57,9 @@ describe('InspectorHeader', function() { it('does not add a type class if it is not provided', function() { var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.equal(output.props.className, 'inspector-header'); @@ -68,10 +68,10 @@ describe('InspectorHeader', function() { it('displays the provided icon', function() { var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.equal(output.props.children[2].props.children.props.src, 'icon.svg'); }); @@ -80,9 +80,9 @@ describe('InspectorHeader', function() { var callbackStub = sinon.stub(); var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); output.props.onClick(); assert.equal(callbackStub.callCount, 1); diff --git a/jujugui/static/gui/src/app/components/inspector/inspector.js b/jujugui/static/gui/src/app/components/inspector/inspector.js index 7e658be88b..0b5ac9ba33 100644 --- a/jujugui/static/gui/src/app/components/inspector/inspector.js +++ b/jujugui/static/gui/src/app/components/inspector/inspector.js @@ -179,7 +179,7 @@ YUI.add('inspector-component', function() { case 'unit': var unitId = appState.current.gui.inspector.unit; var unit = service.get('units').getById( - serviceId + '/' + unitId); + serviceId + '/' + unitId); var unitStatus = null; var previousComponent; var id; @@ -351,9 +351,9 @@ YUI.add('inspector-component', function() { icon: service.get('icon'), component: , + changeState={changeState} + application={service} + relatableApplications={this.props.relatableApplications}/>, backState: { gui: { inspector: { diff --git a/jujugui/static/gui/src/app/components/inspector/overview-action/overview-action.js b/jujugui/static/gui/src/app/components/inspector/overview-action/overview-action.js index de2a0fbcff..4e6d328f5f 100644 --- a/jujugui/static/gui/src/app/components/inspector/overview-action/overview-action.js +++ b/jujugui/static/gui/src/app/components/inspector/overview-action/overview-action.js @@ -47,7 +47,7 @@ YUI.add('overview-action', function() { return classNames( this.baseClass + '__value', this.props.valueType ? - this.baseClass + '__value--type-' + this.props.valueType : '', + this.baseClass + '__value--type-' + this.props.valueType : '', { hidden: !this.props.value } @@ -103,8 +103,8 @@ YUI.add('overview-action', function() { var titleClass = this.baseClass + '__title'; return (
  • + onClick={this.props.action} + title={this.props.title} tabIndex="0" role="button"> {this._generateIcon()} {this.props.title} diff --git a/jujugui/static/gui/src/app/components/inspector/overview-action/test-overview-action.js b/jujugui/static/gui/src/app/components/inspector/overview-action/test-overview-action.js index b94f705c72..bb7529217b 100644 --- a/jujugui/static/gui/src/app/components/inspector/overview-action/test-overview-action.js +++ b/jujugui/static/gui/src/app/components/inspector/overview-action/test-overview-action.js @@ -35,9 +35,9 @@ describe('OverviewAction', function() { var callbackStub = sinon.stub(); var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); output.props.onClick(); assert.equal(callbackStub.callCount, 1); @@ -46,51 +46,51 @@ describe('OverviewAction', function() { it('displays the provided title', function() { var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.equal(output.props.children[1].props.children, 'My action'); }); it('sets the provided icon', function() { var output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output.props.children[0], - - - ); + + + ); }); it('sets the link', function() { var linkAction = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); var link = output.props.children[2]; assert.deepEqual(link, - + Juju Charms - ); + ); }); it('calls the supplied action when the link is clicked', function() { var linkAction = sinon.stub(); var stopPropagation = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.children[2].props.onClick({ stopPropagation: stopPropagation }); @@ -101,21 +101,21 @@ describe('OverviewAction', function() { it('hides the link if it is not provided', function() { var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.isTrue(output.props.children[2].props.className.indexOf( - 'hidden') > -1); + 'hidden') > -1); }); it('sets the value', function() { var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.equal(output.props.children[3].props.children, '5'); }); @@ -123,24 +123,24 @@ describe('OverviewAction', function() { it('sets the value type class', function() { var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.isTrue(output.props.children[3].props.className.indexOf( - 'overview-action__value--type-pending') > -1); + 'overview-action__value--type-pending') > -1); }); it('hides the value if it is not provided', function() { var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.isTrue(output.props.children[3].props.className.indexOf( - 'hidden') > -1); + 'hidden') > -1); }); }); diff --git a/jujugui/static/gui/src/app/components/inspector/relate-to/test-relate-to.js b/jujugui/static/gui/src/app/components/inspector/relate-to/test-relate-to.js index 5733c4eddb..f1bd36b228 100644 --- a/jujugui/static/gui/src/app/components/inspector/relate-to/test-relate-to.js +++ b/jujugui/static/gui/src/app/components/inspector/relate-to/test-relate-to.js @@ -48,7 +48,7 @@ describe('InspectorRelateTo', function() { onClick={output.props.children.props.children[0].props.onClick} tabIndex="0" role="button"> - + name
  • ]} diff --git a/jujugui/static/gui/src/app/components/inspector/relations/relations.js b/jujugui/static/gui/src/app/components/inspector/relations/relations.js index 5f2112d61e..8be6e16932 100644 --- a/jujugui/static/gui/src/app/components/inspector/relations/relations.js +++ b/jujugui/static/gui/src/app/components/inspector/relations/relations.js @@ -123,13 +123,13 @@ YUI.add('inspector-relations', function() { relations.forEach(function(relation, index) { var ref = 'CheckListItem-' + relation.id; components.push( - ); + ); }, this); return components; }, diff --git a/jujugui/static/gui/src/app/components/inspector/relations/test-relations.js b/jujugui/static/gui/src/app/components/inspector/relations/test-relations.js index 6134b33656..35d1cf70a3 100644 --- a/jujugui/static/gui/src/app/components/inspector/relations/test-relations.js +++ b/jujugui/static/gui/src/app/components/inspector/relations/test-relations.js @@ -73,12 +73,12 @@ describe('InspectorRelations', function() { scope: 'global' }]; var renderer = jsTestUtils.shallowRender( - , true); + , true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var buttons = []; @@ -94,7 +94,7 @@ describe('InspectorRelations', function() { action={output.props.children[0].props.children.props.action} icon="plus_box_16" title="Build a relation" /> -
    +
      , true); + , true); var output = renderer.getRenderOutput(); output.props.children[1].props.children[1].props.action(); assert.deepEqual(changeState.args[0][0].gui.inspector, { @@ -185,12 +185,12 @@ describe('InspectorRelations', function() { scope: 'global'} ]; var renderer = jsTestUtils.shallowRender( - , true); + , true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var buttons = []; @@ -206,49 +206,49 @@ describe('InspectorRelations', function() { action={output.props.children[0].props.children.props.action} icon="plus_box_16" title="Build a relation" /> - -
        - - - -
      - + +
        + + + +
      + ); expect(output).toEqualJSX(expected); }); it('renders if there are no relations', () => { var output = jsTestUtils.shallowRender( - ); + ); var expected = (
    • No active relations for this application. -
    • ); + ); assert.deepEqual(output.props.children[1].props.children, expected); }); @@ -318,12 +318,12 @@ describe('InspectorRelations', function() { } ]; var output = jsTestUtils.shallowRender( - ); + ); var buttonItems = output.props.children[2].props.buttons; var buttons = [{ title: 'Remove', @@ -380,12 +380,12 @@ describe('InspectorRelations', function() { // Have to use renderIntoDocument here as shallowRenderer does not support // refs. var output = testUtils.renderIntoDocument( - ); + ); var checkboxes = testUtils.scryRenderedDOMComponentsWithTag( output, 'input'); checkboxes[1].checked = true; @@ -393,7 +393,7 @@ describe('InspectorRelations', function() { checkboxes[3].checked = true; testUtils.Simulate.change(checkboxes[3]); var button = testUtils.findRenderedDOMComponentWithClass( - output, 'button--neutral'); + output, 'button--neutral'); testUtils.Simulate.click(button); assert.equal(destroyRelations.callCount, 1); assert.deepEqual(destroyRelations.args[0][0], @@ -431,7 +431,7 @@ describe('InspectorRelations', function() { checkboxes[1].checked = true; testUtils.Simulate.change(checkboxes[1]); var button = testUtils.findRenderedDOMComponentWithClass( - output, 'button--neutral'); + output, 'button--neutral'); testUtils.Simulate.click(button); assert.isFalse( output.refs['CheckListItem-' + relations[0].id].state.checked @@ -441,12 +441,12 @@ describe('InspectorRelations', function() { it('navigates to show build relation on build-relation click', function() { var changeState = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); // Call the action for the create realtion button. output.props.children[0].props.children.props.action(); assert.deepEqual(changeState.args[0][0], { diff --git a/jujugui/static/gui/src/app/components/inspector/resources/list/list.js b/jujugui/static/gui/src/app/components/inspector/resources/list/list.js index 8c1f355d6b..2d04a6883b 100644 --- a/jujugui/static/gui/src/app/components/inspector/resources/list/list.js +++ b/jujugui/static/gui/src/app/components/inspector/resources/list/list.js @@ -37,20 +37,20 @@ YUI.add('inspector-resources-list', function() { return (
    • -

      {resource.Name}

      -

      {resource.Description}

      +

      {resource.Name}

      +

      {resource.Description}

    • ); }); return (
        - {resourceList} + {resourceList}
      ); }, render: function() { return (
      - {this._generateResources()} + {this._generateResources()}
      ); } diff --git a/jujugui/static/gui/src/app/components/inspector/resources/list/test-list.js b/jujugui/static/gui/src/app/components/inspector/resources/list/test-list.js index 05b07e5b27..dcc3589ad3 100644 --- a/jujugui/static/gui/src/app/components/inspector/resources/list/test-list.js +++ b/jujugui/static/gui/src/app/components/inspector/resources/list/test-list.js @@ -57,13 +57,13 @@ describe('InspectorResourcesList', function() {
      • -

        file1

        -

        file1 desc

        +

        file1

        +

        file1 desc

      • -

        file2

        -

        file2 desc

        +

        file2

        +

        file2 desc

      ); diff --git a/jujugui/static/gui/src/app/components/inspector/scale-service/test-scale-service.js b/jujugui/static/gui/src/app/components/inspector/scale-service/test-scale-service.js index 6c6704b159..c3d6d7d7f5 100644 --- a/jujugui/static/gui/src/app/components/inspector/scale-service/test-scale-service.js +++ b/jujugui/static/gui/src/app/components/inspector/scale-service/test-scale-service.js @@ -229,7 +229,7 @@ describe('ScaleService', function() {
      + ref="constraintsContainer"> ); + ); }); return items; }, diff --git a/jujugui/static/gui/src/app/components/inspector/service-overview/test-service-overview.js b/jujugui/static/gui/src/app/components/inspector/service-overview/test-service-overview.js index dda0e2d927..944d0e432d 100644 --- a/jujugui/static/gui/src/app/components/inspector/service-overview/test-service-overview.js +++ b/jujugui/static/gui/src/app/components/inspector/service-overview/test-service-overview.js @@ -224,19 +224,19 @@ describe('ServiceOverview', function() { it('shows the all units action even if there are no units', function() { const output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output.props.children[1].props.children[0], ); + ); // call the action method which is passed to the child to make sure it // is hooked up to the changeState method. output.props.children[1].props.children[0].props.action({ @@ -300,19 +300,19 @@ describe('ServiceOverview', function() { {} ]}); const output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output.props.children[1].props.children[1], ); + ); assert.deepEqual(output.props.children[1].props.children[1], ); + ); assert.deepEqual(output.props.children[1].props.children[1], ); + ); assert.deepEqual(output.props.children[1].props.children[1], ); + ); assert.deepEqual(output.props.children[1].props.children[2], ); + ); assert.deepEqual(output.props.children[1].props.children[3], ); + ); assert.deepEqual(output.props.children[1].props.children[4], ); + ); assert.equal(output.props.children[1].props.children.length, 5); }); @@ -573,19 +573,19 @@ describe('ServiceOverview', function() { get: getStub }; const output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output.props.children[1].props.children[5], ); + ); output.props.children[1].props.children[5].props.linkAction(); assert.equal(changeState.callCount, 1); assert.deepEqual(changeState.args[0][0], { @@ -645,19 +645,19 @@ describe('ServiceOverview', function() { get: getStub }; const output = jsTestUtils.shallowRender( - ); + ); assert.equal(output.props.children[1].props.children.length, 5); }); @@ -684,19 +684,19 @@ describe('ServiceOverview', function() { }; const showActivePlan = sinon.stub(); const output = jsTestUtils.shallowRender( - ); + ); assert.equal( showActivePlan.callCount, 0, 'we are defining plans in the service, it should not call to fetch more'); diff --git a/jujugui/static/gui/src/app/components/inspector/test-inspector.js b/jujugui/static/gui/src/app/components/inspector/test-inspector.js index 6e378aaa2e..ed8c553fb2 100644 --- a/jujugui/static/gui/src/app/components/inspector/test-inspector.js +++ b/jujugui/static/gui/src/app/components/inspector/test-inspector.js @@ -69,42 +69,42 @@ describe('Inspector', function() { var showActivePlan = sinon.stub(); var serviceRelations = ['relations']; var component = jsTestUtils.shallowRender( - , true); + , true); var instance = component.getMountedInstance(); var output = component.getRenderOutput(); var header = output.props.children[0]; @@ -119,19 +119,19 @@ describe('Inspector', function() { expect(header).toEqualJSX(expectedHeader); const overview = output.props.children[1].props.children; var expectedOverview = ( - ); + ); expect(overview).toEqualJSX(expectedOverview); }); @@ -154,43 +154,43 @@ describe('Inspector', function() { units: unitStatus }; var component = jsTestUtils.shallowRender( - - , true); + + , true); var instance = component.getMountedInstance(); var output = component.getRenderOutput(); var header = output.props.children[0]; @@ -206,14 +206,14 @@ describe('Inspector', function() { var children = output.props.children[1].props.children; assert.deepEqual(children, - ); + ); }); it('displays the configuration when the app state calls for it', function() { @@ -235,43 +235,43 @@ describe('Inspector', function() { }; var charm = {}; var component = jsTestUtils.shallowRender( - , - true); + , + true); var instance = component.getMountedInstance(); var output = component.getRenderOutput(); var header = output.props.children[0]; @@ -287,19 +287,19 @@ describe('Inspector', function() { var children = output.props.children[1].props.children; assert.deepEqual(children, - ); + ); }); it('displays the unit details when the app state calls for it', function() { @@ -325,43 +325,43 @@ describe('Inspector', function() { unit: '5' }; var component = jsTestUtils.shallowRender( - - , true); + + , true); var instance = component.getMountedInstance(); var output = component.getRenderOutput(); var header = output.props.children[0]; @@ -387,7 +387,7 @@ describe('Inspector', function() { unit={unit} /> ); assert.deepEqual(children, expectedChildren, - 'Unit details not rendered as expected'); + 'Unit details not rendered as expected'); }); it('handles the unit being removed while viewing the unit', function() { @@ -522,43 +522,43 @@ describe('Inspector', function() { unit: '5' }; var output = jsTestUtils.shallowRender( - - ); + + ); output.props.children[0].props.backCallback(); assert.equal(appState.changeState.callCount, 1); assert.deepEqual(appState.changeState.args[0][0], { @@ -586,43 +586,43 @@ describe('Inspector', function() { unit: '5' }; var output = jsTestUtils.shallowRender( - - ); + + ); output.props.children[0].props.backCallback(); assert.equal(appState.changeState.callCount, 1); assert.deepEqual(appState.changeState.args[0][0], { @@ -658,43 +658,43 @@ describe('Inspector', function() { unit: '5' }; var output = jsTestUtils.shallowRender( - - ); + + ); output.props.children[0].props.backCallback(); assert.equal(appState.changeState.callCount, 1); assert.deepEqual(appState.changeState.args[0][0], { @@ -771,14 +771,14 @@ describe('Inspector', function() { expect(header).toEqualJSX(expectedHeader); var children = output.props.children[1].props.children; assert.deepEqual(children, - ); + ); }); it('displays Expose when the app state calls for it', function() { @@ -849,14 +849,14 @@ describe('Inspector', function() { expect(header).toEqualJSX(expectedHeader); var children = output.props.children[1].props.children; assert.deepEqual(children, - ); + ); }); it('displays Relations when the app state calls for it', function() { @@ -924,12 +924,12 @@ describe('Inspector', function() { expect(header).toEqualJSX(expectedHeader); var children = output.props.children[1].props.children; assert.deepEqual(children, - ); + ); }); it('displays the relate-to when the app state calls for it', function() { @@ -1149,9 +1149,9 @@ describe('Inspector', function() { expect(header).toEqualJSX(expectedHeader); var children = output.props.children[1].props.children; assert.deepEqual(children, - ); + ); }); it('displays Change versions when the app state calls for it', function() { @@ -1322,42 +1322,42 @@ describe('Inspector', function() { }}; var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); output.props.children[0].props.backCallback(); assert.equal(appState.changeState.callCount, 1); @@ -1386,42 +1386,42 @@ describe('Inspector', function() { }}; var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); output.props.children[0].props.backCallback(); assert.equal(appState.changeState.callCount, 1); @@ -1442,42 +1442,42 @@ describe('Inspector', function() { var service = {get: getStub}; var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); output.props.children[0].props.backCallback(); assert.equal(appState.changeState.callCount, 1); @@ -1495,42 +1495,42 @@ describe('Inspector', function() { }}; var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.equal(output.props.children[0].props.title, 'demo'); }); @@ -1551,42 +1551,42 @@ describe('Inspector', function() { }; var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); var output = shallowRenderer.getRenderOutput(); assert.deepEqual(output.props.children[0].props.type, 'error'); }); @@ -1611,42 +1611,42 @@ describe('Inspector', function() { }}; var shallowRenderer = testUtils.createRenderer(); shallowRenderer.render( - ); + ); shallowRenderer.getRenderOutput(); assert.equal(appState.changeState.callCount, 0); service = { @@ -1657,42 +1657,42 @@ describe('Inspector', function() { return {name: 'demo'}; }}; shallowRenderer.render( - ); + ); shallowRenderer.getRenderOutput(); assert.equal(appState.changeState.callCount, 1); assert.deepEqual(appState.changeState.args[0][0], { diff --git a/jujugui/static/gui/src/app/components/inspector/unit-list/test-unit-list.js b/jujugui/static/gui/src/app/components/inspector/unit-list/test-unit-list.js index c9dd254441..e455fcc210 100644 --- a/jujugui/static/gui/src/app/components/inspector/unit-list/test-unit-list.js +++ b/jujugui/static/gui/src/app/components/inspector/unit-list/test-unit-list.js @@ -43,14 +43,14 @@ describe('UnitList', () => { it('renders if there are no units', () => { var renderer = jsTestUtils.shallowRender( - , true); + , true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var expected = ( @@ -78,14 +78,14 @@ describe('UnitList', () => { id: 'mysql/1' }]; var renderer = jsTestUtils.shallowRender( - , true); + , true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var children = output.props.children[1].props.children; @@ -134,15 +134,15 @@ describe('UnitList', () => { agent_state_info: 'hook failed: config-changed' }]; var renderer = jsTestUtils.shallowRender( - , true); + , true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var children = output.props.children[1].props.children; @@ -205,14 +205,14 @@ describe('UnitList', () => { }]; var output = jsTestUtils.shallowRender( - ); + ); var child = output.props.children[0].props.children; assert.deepEqual(child, { displayName: 'mysql/0' }]; var output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output,
      {undefined} @@ -256,14 +256,14 @@ describe('UnitList', () => { } }; var output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output,
      {undefined} @@ -308,15 +308,15 @@ describe('UnitList', () => { }]; var changeState = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.children[1].props.children[1].props.action({ currentTarget: { getAttribute: function() { @@ -344,15 +344,15 @@ describe('UnitList', () => { }]; var changeState = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.children[1].props.children[1].props.action({ currentTarget: { getAttribute: function() { @@ -377,14 +377,14 @@ describe('UnitList', () => { displayName: 'mysql/0' }]; var output = jsTestUtils.shallowRender( - ); + ); var buttonItems = output.props.children[2].props.buttons; var buttons = [{ title: 'Remove', @@ -403,15 +403,15 @@ describe('UnitList', () => { displayName: 'mysql/0' }]; var output = jsTestUtils.shallowRender( - ); + ); var buttonItems = output.props.children[2].props.buttons; var buttons = [{ title: 'Resolve', @@ -455,14 +455,14 @@ describe('UnitList', () => { // Have to use renderIntoDocument here as shallowRenderer does not support // refs. var output = testUtils.renderIntoDocument( - ); + ); var checkboxes = testUtils.scryRenderedDOMComponentsWithTag( output, 'input'); checkboxes[1].checked = true; @@ -470,7 +470,7 @@ describe('UnitList', () => { checkboxes[3].checked = true; testUtils.Simulate.change(checkboxes[3]); var button = testUtils.findRenderedDOMComponentWithClass( - output, 'button--neutral'); + output, 'button--neutral'); testUtils.Simulate.click(button); assert.equal(destroyUnits.callCount, 1); assert.deepEqual(destroyUnits.args[0][0], [units[0].id, units[2].id]); @@ -495,14 +495,14 @@ describe('UnitList', () => { // Have to use renderIntoDocument here as shallowRenderer does not support // refs. var output = testUtils.renderIntoDocument( - ); + ); const checkboxes = testUtils.scryRenderedDOMComponentsWithTag( output, 'input'); checkboxes[1].checked = true; @@ -510,7 +510,7 @@ describe('UnitList', () => { checkboxes[3].checked = true; testUtils.Simulate.change(checkboxes[3]); const button = testUtils.findRenderedDOMComponentWithClass( - output, 'button--neutral'); + output, 'button--neutral'); testUtils.Simulate.click(button); // Remove is still called to remove from ECS. assert.equal(destroyUnits.callCount, 1); @@ -529,20 +529,20 @@ describe('UnitList', () => { // Have to use renderIntoDocument here as shallowRenderer does not support // refs. var output = testUtils.renderIntoDocument( - ); + ); var checkboxes = testUtils.scryRenderedDOMComponentsWithTag( output, 'input'); checkboxes[1].checked = true; testUtils.Simulate.change(checkboxes[1]); var button = testUtils.findRenderedDOMComponentWithClass( - output, 'button--neutral'); + output, 'button--neutral'); testUtils.Simulate.click(button); assert.isFalse(output.refs['CheckListItem-' + units[0].id].state.checked); }); @@ -557,21 +557,21 @@ describe('UnitList', () => { // Have to use renderIntoDocument here as shallowRenderer does not support // refs. var output = testUtils.renderIntoDocument( - ); + ); var checkboxes = testUtils.scryRenderedDOMComponentsWithTag( output, 'input'); checkboxes[0].checked = true; testUtils.Simulate.change(checkboxes[0]); assert.isTrue(output.refs['select-all'].state.checked); var button = testUtils.findRenderedDOMComponentWithClass( - output, 'button--neutral'); + output, 'button--neutral'); testUtils.Simulate.click(button); assert.isFalse(output.refs['CheckListItem-' + units[0].id].state.checked); assert.isFalse(output.refs['select-all'].state.checked); @@ -596,15 +596,15 @@ describe('UnitList', () => { // Have to use renderIntoDocument here as shallowRenderer does not support // refs. var output = testUtils.renderIntoDocument( - ); + ); var checkboxes = testUtils.scryRenderedDOMComponentsWithTag( output, 'input'); checkboxes[1].checked = true; @@ -612,7 +612,7 @@ describe('UnitList', () => { checkboxes[2].checked = true; testUtils.Simulate.change(checkboxes[2]); var button = testUtils.scryRenderedDOMComponentsWithClass( - output, 'button--neutral')[0]; + output, 'button--neutral')[0]; testUtils.Simulate.click(button); assert.equal(envResolved.callCount, 2); assert.deepEqual(envResolved.args[0][0], units[0].id); @@ -637,15 +637,15 @@ describe('UnitList', () => { // Have to use renderIntoDocument here as shallowRenderer does not support // refs. const output = testUtils.renderIntoDocument( - ); + ); const checkboxes = testUtils.scryRenderedDOMComponentsWithTag( output, 'input'); checkboxes[1].checked = true; @@ -653,7 +653,7 @@ describe('UnitList', () => { checkboxes[2].checked = true; testUtils.Simulate.change(checkboxes[2]); const button = testUtils.scryRenderedDOMComponentsWithClass( - output, 'button--neutral')[0]; + output, 'button--neutral')[0]; testUtils.Simulate.click(button); assert.equal(envResolved.callCount, 0); }); @@ -677,15 +677,15 @@ describe('UnitList', () => { // Have to use renderIntoDocument here as shallowRenderer does not support // refs. var output = testUtils.renderIntoDocument( - ); + ); var checkboxes = testUtils.scryRenderedDOMComponentsWithTag( output, 'input'); checkboxes[1].checked = true; @@ -693,7 +693,7 @@ describe('UnitList', () => { checkboxes[2].checked = true; testUtils.Simulate.change(checkboxes[2]); var button = testUtils.scryRenderedDOMComponentsWithClass( - output, 'button--neutral')[1]; + output, 'button--neutral')[1]; testUtils.Simulate.click(button); assert.equal(envResolved.callCount, 2); assert.deepEqual(envResolved.args[0][0], units[0].id); @@ -719,15 +719,15 @@ describe('UnitList', () => { // Have to use renderIntoDocument here as shallowRenderer does not support // refs. var output = testUtils.renderIntoDocument( - ); + ); var checkboxes = testUtils.scryRenderedDOMComponentsWithTag( output, 'input'); checkboxes[1].checked = true; @@ -735,7 +735,7 @@ describe('UnitList', () => { checkboxes[2].checked = true; testUtils.Simulate.change(checkboxes[2]); var button = testUtils.scryRenderedDOMComponentsWithClass( - output, 'button--neutral')[1]; + output, 'button--neutral')[1]; testUtils.Simulate.click(button); assert.equal(envResolved.callCount, 0); }); @@ -750,14 +750,14 @@ describe('UnitList', () => { id: 'mysql/1' }]; var renderer = jsTestUtils.shallowRender( - , true); + , true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var children = output.props.children[1].props.children; diff --git a/jujugui/static/gui/src/app/components/isv-profile/test-isv-profile.js b/jujugui/static/gui/src/app/components/isv-profile/test-isv-profile.js index 8f7e41d88e..aeb8685a21 100644 --- a/jujugui/static/gui/src/app/components/isv-profile/test-isv-profile.js +++ b/jujugui/static/gui/src/app/components/isv-profile/test-isv-profile.js @@ -34,21 +34,21 @@ describe('ISVProfile', () => { var output = component.getRenderOutput(); var content = output.props.children.props.children.props.children[0]; var expected = (); + + ); assert.deepEqual(content, expected); }); diff --git a/jujugui/static/gui/src/app/components/local-inspector/local-charm-import-helpers.js b/jujugui/static/gui/src/app/components/local-inspector/local-charm-import-helpers.js index 730e3c1343..65aace2694 100644 --- a/jujugui/static/gui/src/app/components/local-inspector/local-charm-import-helpers.js +++ b/jujugui/static/gui/src/app/components/local-inspector/local-charm-import-helpers.js @@ -55,10 +55,10 @@ YUI.add('local-charm-import-helpers', function(Y) { var helper = ns.localCharmHelpers; series = series || env.get('defaultSeries'); env.uploadLocalCharm( - file, - series, - helper._uploadLocalCharmProgress, - helper._uploadLocalCharmLoad.bind(null, file, env, db, options)); + file, + series, + helper._uploadLocalCharmProgress, + helper._uploadLocalCharmLoad.bind(null, file, env, db, options)); }, /** @@ -147,7 +147,7 @@ YUI.add('local-charm-import-helpers', function(Y) { var callback; if (options && options.services) { callback = helper._upgradeServices.bind( - null, options.services, env, db); + null, options.services, env, db); } else { callback = helper._loadCharmDetailsCallback; } @@ -169,10 +169,10 @@ YUI.add('local-charm-import-helpers', function(Y) { var helper = ns.localCharmHelpers; services.forEach(function(service) { env.setCharm( - service.get('id'), - charmUrl, - false, - helper._showServiceUpgradedNotification.bind(null, db)); + service.get('id'), + charmUrl, + false, + helper._showServiceUpgradedNotification.bind(null, db)); }); }, diff --git a/jujugui/static/gui/src/app/components/logout/test-logout.js b/jujugui/static/gui/src/app/components/logout/test-logout.js index 32d8c63808..2ec08df4bf 100644 --- a/jujugui/static/gui/src/app/components/logout/test-logout.js +++ b/jujugui/static/gui/src/app/components/logout/test-logout.js @@ -46,7 +46,7 @@ describe('Logout', () => { href={logoutUrl} onClick={output.props.onClick} target="_self">Logout - ); + ); assert.deepEqual(output, expected); }); diff --git a/jujugui/static/gui/src/app/components/machine-view/column/test-column.js b/jujugui/static/gui/src/app/components/machine-view/column/test-column.js index 1fe7790842..82918b78ca 100644 --- a/jujugui/static/gui/src/app/components/machine-view/column/test-column.js +++ b/jujugui/static/gui/src/app/components/machine-view/column/test-column.js @@ -86,9 +86,9 @@ describe('MachineViewColumn', function() { title="Sandbox" type="machine" />); var expected = ( -
      - {output.props.children} -
      ); +
      + {output.props.children} +
      ); assert.deepEqual(output, expected); }); @@ -103,9 +103,9 @@ describe('MachineViewColumn', function() { title="Sandbox" type="machine" />); var expected = ( -
      - {output.props.children} -
      ); +
      + {output.props.children} +
      ); assert.deepEqual(output, expected); }); }); diff --git a/jujugui/static/gui/src/app/components/machine-view/header/test-header.js b/jujugui/static/gui/src/app/components/machine-view/header/test-header.js index ca2211e123..ccd9753278 100644 --- a/jujugui/static/gui/src/app/components/machine-view/header/test-header.js +++ b/jujugui/static/gui/src/app/components/machine-view/header/test-header.js @@ -45,15 +45,15 @@ describe('MachineViewHeader', function() { title="Sandbox" type="machine" />); var expected = ( -
      +
      Sandbox - {undefined} -
      -
      + {undefined} +
      +
      Create new {'machine'} -
      -
      ); +
      +
      ); assert.deepEqual(output, expected); }); @@ -68,9 +68,9 @@ describe('MachineViewHeader', function() { title="Sandbox" type="machine" />); var expected = ( -
      - {output.props.children} -
      ); +
      + {output.props.children} +
      ); assert.deepEqual(output, expected); }); @@ -85,9 +85,9 @@ describe('MachineViewHeader', function() { title="Sandbox" type="machine" />); var expected = ( -
      - {output.props.children} -
      ); +
      + {output.props.children} +
      ); assert.deepEqual(output, expected); }); @@ -105,17 +105,17 @@ describe('MachineViewHeader', function() { title="Sandbox" type="machine" />); var expected = ( -
      +
      Sandbox - -
      -
      + +
      +
      Create new {'machine'} -
      -
      ); +
      +
      ); assert.deepEqual(output, expected); }); @@ -136,19 +136,19 @@ describe('MachineViewHeader', function() { title="Sandbox" type="machine" />); var expected = ( -
      +
      Sandbox - -
      -
      + +
      +
      Create new {'machine'} -
      -
      ); +
      +
      ); assert.deepEqual(output, expected); }); }); diff --git a/jujugui/static/gui/src/app/components/machine-view/machine-view.js b/jujugui/static/gui/src/app/components/machine-view/machine-view.js index 31de4b9aa7..c736fa920e 100644 --- a/jujugui/static/gui/src/app/components/machine-view/machine-view.js +++ b/jujugui/static/gui/src/app/components/machine-view/machine-view.js @@ -171,7 +171,7 @@ YUI.add('machine-view', function() { Add applications to get started
      - ); + ); } else { icon = 'task-done_16'; content = 'You have placed all of your units'; diff --git a/jujugui/static/gui/src/app/components/machine-view/machine/test-machine.js b/jujugui/static/gui/src/app/components/machine-view/machine/test-machine.js index 03b5025a7a..456cac9b8e 100644 --- a/jujugui/static/gui/src/app/components/machine-view/machine/test-machine.js +++ b/jujugui/static/gui/src/app/components/machine-view/machine/test-machine.js @@ -193,9 +193,9 @@ describe('MachineViewMachine', function() { var expected = (
      + onClick={instance._handleSelectMachine} + role="button" + tabIndex="0"> {output.props.children}
      ); expect(output).toEqualJSX(expected); @@ -230,9 +230,9 @@ describe('MachineViewMachine', function() { var expected = (
      + onClick={instance._handleSelectMachine} + role="button" + tabIndex="0"> {output.props.children}
      ); expect(output).toEqualJSX(expected); @@ -267,9 +267,9 @@ describe('MachineViewMachine', function() { var expected = (
      + onClick={instance._handleSelectMachine} + role="button" + tabIndex="0"> {output.props.children}
      ); expect(output).toEqualJSX(expected); diff --git a/jujugui/static/gui/src/app/components/machine-view/scale-up/scale-up.js b/jujugui/static/gui/src/app/components/machine-view/scale-up/scale-up.js index f518fc8ccc..d6eb3231e2 100644 --- a/jujugui/static/gui/src/app/components/machine-view/scale-up/scale-up.js +++ b/jujugui/static/gui/src/app/components/machine-view/scale-up/scale-up.js @@ -101,7 +101,7 @@ YUI.add('machine-view-scale-up', function() { }]; return ( + onSubmit={this._handleAddUnits}> {this._generateServices()} diff --git a/jujugui/static/gui/src/app/components/machine-view/test-machine-view.js b/jujugui/static/gui/src/app/components/machine-view/test-machine-view.js index c2fa9649b8..860e3089b0 100644 --- a/jujugui/static/gui/src/app/components/machine-view/test-machine-view.js +++ b/jujugui/static/gui/src/app/components/machine-view/test-machine-view.js @@ -321,7 +321,7 @@ describe('MachineView', function() {
      ); expect( output.props.children.props.children[0].props.children[1]).toEqualJSX( - expected); + expected); }); it('can display a service scale up form', function() { @@ -363,7 +363,7 @@ describe('MachineView', function() { toggleScaleUp={instance._toggleScaleUp} />); expect( output.props.children.props.children[0].props.children[0]).toEqualJSX( - expected); + expected); }); it('can display a list of unplaced units', function() { @@ -443,7 +443,7 @@ describe('MachineView', function() {
    ); expect( output.props.children.props.children[0].props.children[1] - .props.children[1]).toEqualJSX(expected); + .props.children[1]).toEqualJSX(expected); }); it('does not display unplaced subordinate units', function() { @@ -512,7 +512,7 @@ describe('MachineView', function() { ); expect( output.props.children.props.children[0].props.children[1] - .props.children[1]).toEqualJSX(expected); + .props.children[1]).toEqualJSX(expected); }); it('displays onboarding if there are only subordinate units', function() { @@ -563,7 +563,7 @@ describe('MachineView', function() { ); expect( output.props.children.props.children[0].props.children[1]).toEqualJSX( - expected); + expected); }); it('can auto place units', function() { @@ -715,7 +715,7 @@ describe('MachineView', function() { ); expect( output.props.children.props.children[1].props.children[1]).toEqualJSX( - expected); + expected); }); it('can display onboarding if there is one machine', function() { @@ -766,7 +766,7 @@ describe('MachineView', function() { ); expect( output.props.children.props.children[1].props.children[1] - .props.children[0]).toEqualJSX(expected); + .props.children[0]).toEqualJSX(expected); }); it('can display a list of machines', function() { @@ -861,7 +861,7 @@ describe('MachineView', function() { ); expect( output.props.children.props.children[1].props.children[1] - .props.children[1]).toEqualJSX(expected); + .props.children[1]).toEqualJSX(expected); }); it('can order a list of machines', function() { @@ -960,7 +960,7 @@ describe('MachineView', function() { ); expect( output.props.children.props.children[1].props.children[1] - .props.children[1]).toEqualJSX(expected); + .props.children[1]).toEqualJSX(expected); }); it('can toggle constraints on machines', function() { @@ -1056,7 +1056,7 @@ describe('MachineView', function() { ); expect( output.props.children.props.children[1].props.children[1] - .props.children[1]).toEqualJSX(expected); + .props.children[1]).toEqualJSX(expected); }); it('can display a form for adding a machine', function() { @@ -1109,7 +1109,7 @@ describe('MachineView', function() { unit={null} />); expect( output.props.children.props.children[1].props.children[0]).toEqualJSX( - expected); + expected); }); it('can select a machine', function() { @@ -1239,7 +1239,7 @@ describe('MachineView', function() { ); expect( output.props.children.props.children[2].props.children[1]).toEqualJSX( - expected); + expected); }); it('can order a list of containers', function() { @@ -1342,7 +1342,7 @@ describe('MachineView', function() { ); expect( output.props.children.props.children[2].props.children[1]).toEqualJSX( - expected); + expected); }); it('can display a form for adding a container', function() { @@ -1406,7 +1406,7 @@ describe('MachineView', function() { unit={null} />); expect( output.props.children.props.children[2].props.children[0]).toEqualJSX( - expected); + expected); }); it('does not show an add container form for deleted machines', function() { @@ -1487,7 +1487,7 @@ describe('MachineView', function() { ); expect( output.props.children.props.children[2].props.children[1]).toEqualJSX( - expected); + expected); }); it('can remove a unit', function() { diff --git a/jujugui/static/gui/src/app/components/machine-view/unplaced-unit/test-unplaced-unit.js b/jujugui/static/gui/src/app/components/machine-view/unplaced-unit/test-unplaced-unit.js index 57b1795403..9715686c4b 100644 --- a/jujugui/static/gui/src/app/components/machine-view/unplaced-unit/test-unplaced-unit.js +++ b/jujugui/static/gui/src/app/components/machine-view/unplaced-unit/test-unplaced-unit.js @@ -64,8 +64,8 @@ describe('MachineViewUnplacedUnit', function() { label: 'Destroy', action: output.props.children[2].props.items[1].action }]} /> - {undefined} -
    + {undefined} +
    ); assert.deepEqual(output, expected); }); diff --git a/jujugui/static/gui/src/app/components/more-menu/test-more-menu.js b/jujugui/static/gui/src/app/components/more-menu/test-more-menu.js index 9a238fbc2e..1a272bb8da 100644 --- a/jujugui/static/gui/src/app/components/more-menu/test-more-menu.js +++ b/jujugui/static/gui/src/app/components/more-menu/test-more-menu.js @@ -43,17 +43,17 @@ describe('MoreMenu', function() { var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var expected = ( -
    - - - - {undefined} -
    ); +
    + + + + {undefined} +
    ); assert.deepEqual(output, expected); }); @@ -72,32 +72,32 @@ describe('MoreMenu', function() { instance._handleToggleMenu(); var output = renderer.getRenderOutput(); var expected = ( -
    - + + + +
      +
    • - - -
        -
      • Add machine -
      • -
      • +
      • +
      • Add container -
      • -
      -
    ); + + + ); assert.deepEqual(output, expected); }); diff --git a/jujugui/static/gui/src/app/components/notification-list/notification-list.js b/jujugui/static/gui/src/app/components/notification-list/notification-list.js index c32af13ef9..402cd45b6b 100644 --- a/jujugui/static/gui/src/app/components/notification-list/notification-list.js +++ b/jujugui/static/gui/src/app/components/notification-list/notification-list.js @@ -142,8 +142,8 @@ YUI.add('notification-list', function() { render: function() { return (
      + onMouseOut={this._restartTimeouts} + className="notification-list"> {this._generateNotifications()}
    ); } diff --git a/jujugui/static/gui/src/app/components/notification-list/test-notification-list.js b/jujugui/static/gui/src/app/components/notification-list/test-notification-list.js index 00f3408651..5b9271d2af 100644 --- a/jujugui/static/gui/src/app/components/notification-list/test-notification-list.js +++ b/jujugui/static/gui/src/app/components/notification-list/test-notification-list.js @@ -63,8 +63,8 @@ describe('NotificationList', function() { type={notification.level} />]; const expected = (
      + onMouseOver={instance._clearTimeouts} + onMouseOut={instance._restartTimeouts}> {items}
    ); @@ -166,13 +166,13 @@ describe('NotificationList', function() { const instance = renderer.getMountedInstance(); renderer.getRenderOutput(); assert.equal(instance.timeouts.length, 1, - 'notification timeouts were not populated'); + 'notification timeouts were not populated'); instance._clearTimeouts(); assert.equal(instance.timeouts.length, 0, - 'notification timeouts did not clear'); + 'notification timeouts did not clear'); instance._restartTimeouts(); assert.equal(instance.timeouts.length, 1, - 'notification timeouts were not restarted'); + 'notification timeouts were not restarted'); // Let everything clear out. clock.tick(longTimeout + 10); }); diff --git a/jujugui/static/gui/src/app/components/notification/notification.js b/jujugui/static/gui/src/app/components/notification/notification.js index d531aeb5de..00b0d9e571 100644 --- a/jujugui/static/gui/src/app/components/notification/notification.js +++ b/jujugui/static/gui/src/app/components/notification/notification.js @@ -80,18 +80,18 @@ YUI.add('notification', function() { ); }, render: function() { const content = (
    -

    - {this.props.content} - {this._generateDismiss()} -

    -
    ); +

    + {this.props.content} + {this._generateDismiss()} +

    + ); if (this.props.isBlocking && this.props.dismiss) { return (
    diff --git a/jujugui/static/gui/src/app/components/notification/test-notification.js b/jujugui/static/gui/src/app/components/notification/test-notification.js index 07c4c7e055..d7ddfc058c 100644 --- a/jujugui/static/gui/src/app/components/notification/test-notification.js +++ b/jujugui/static/gui/src/app/components/notification/test-notification.js @@ -31,7 +31,7 @@ describe('Notification', function() { const renderer = jsTestUtils.shallowRender( Hello} - />, true); + />, true); const output = renderer.getRenderOutput(); const expected = (
    @@ -48,7 +48,7 @@ describe('Notification', function() { } type="positive" - />, true); + />, true); const output = renderer.getRenderOutput(); const expected = (
    @@ -65,7 +65,7 @@ describe('Notification', function() { } type="caution" - />, true); + />, true); const output = renderer.getRenderOutput(); const expected = (
    @@ -82,7 +82,7 @@ describe('Notification', function() { } type="negative" - />, true); + />, true); const output = renderer.getRenderOutput(); const expected = (
    @@ -99,7 +99,7 @@ describe('Notification', function() { } extraClasses="test" - />, true); + />, true); const output = renderer.getRenderOutput(); const expected = (
    @@ -117,7 +117,7 @@ describe('Notification', function() { } dismiss={dismiss} - />, true); + />, true); const output = renderer.getRenderOutput(); const expected = (
    @@ -141,7 +141,7 @@ describe('Notification', function() { } dismiss={dismiss} - />, true); + />, true); const output = renderer.getRenderOutput(); output.props.children.props.children[1].props.onClick({ stopPropagation: stopPropagation @@ -155,7 +155,7 @@ describe('Notification', function() { } isBlocking={true} - />, true); + />, true); const output = renderer.getRenderOutput(); const expected = (
    @@ -176,7 +176,7 @@ describe('Notification', function() { content={} dismiss={dismiss} isBlocking={true} - />, true); + />, true); const output = renderer.getRenderOutput(); const expected = (
    , true); + , true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var expected = ( @@ -54,9 +54,9 @@ describe('PanelComponent', function() { it('generates a hidden panel if visible flag is falsey', function() { var instanceName = 'custom-instance-name'; var renderer = jsTestUtils.shallowRender( - , true); + , true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); var expected = ( @@ -75,11 +75,11 @@ describe('PanelComponent', function() { it('renders provided children components', function() { var instanceName = 'custom-instance-name'; var renderer = jsTestUtils.shallowRender( - -
    child
    -
    , true); + +
    child
    +
    , true); var instance = renderer.getMountedInstance(); var output = renderer.getRenderOutput(); assert.deepEqual(output, @@ -98,10 +98,10 @@ describe('PanelComponent', function() { var instanceName = 'custom-instance-name'; var clickAction = sinon.stub(); var renderer = jsTestUtils.shallowRender( - , true); + , true); var instance = renderer.getMountedInstance(); instance._handleClick(); assert.equal(clickAction.callCount, 1); @@ -112,10 +112,10 @@ describe('PanelComponent', function() { var clickAction = sinon.stub(); var stopPropagation = sinon.stub(); var renderer = jsTestUtils.shallowRender( - , true); + , true); var output = renderer.getRenderOutput(); output.props.children.props.onClick({stopPropagation: stopPropagation}); assert.equal(stopPropagation.callCount, 1); @@ -125,9 +125,9 @@ describe('PanelComponent', function() { it('sets the keyboard focus when it loads', function() { var focus = sinon.stub(); var renderer = jsTestUtils.shallowRender( - , true); + , true); var instance = renderer.getMountedInstance(); instance.refs = {content: {focus: focus}}; instance.componentDidMount(); @@ -137,10 +137,10 @@ describe('PanelComponent', function() { it('can not set the keyboard focus on load', function() { var focus = sinon.stub(); var renderer = jsTestUtils.shallowRender( - , true); + , true); var instance = renderer.getMountedInstance(); instance.refs = {content: {focus: focus}}; instance.componentDidMount(); diff --git a/jujugui/static/gui/src/app/components/popup/popup.js b/jujugui/static/gui/src/app/components/popup/popup.js index 2e5c8fb96b..20ffa0e142 100644 --- a/jujugui/static/gui/src/app/components/popup/popup.js +++ b/jujugui/static/gui/src/app/components/popup/popup.js @@ -71,10 +71,10 @@ YUI.add('popup', function() { return (
    -
    ); + action={close} + type="base" + icon="close_16" /> +
    ); } }, diff --git a/jujugui/static/gui/src/app/components/popup/test-popup.js b/jujugui/static/gui/src/app/components/popup/test-popup.js index 4e69e6a9c3..93f6a15a1b 100644 --- a/jujugui/static/gui/src/app/components/popup/test-popup.js +++ b/jujugui/static/gui/src/app/components/popup/test-popup.js @@ -44,9 +44,9 @@ describe('Popup', () => {
    + action={close} + type="base" + icon="close_16" />

    A title diff --git a/jujugui/static/gui/src/app/components/relation-menu/ambiguous-relation-menu.js b/jujugui/static/gui/src/app/components/relation-menu/ambiguous-relation-menu.js index 68283ff915..920a65e551 100644 --- a/jujugui/static/gui/src/app/components/relation-menu/ambiguous-relation-menu.js +++ b/jujugui/static/gui/src/app/components/relation-menu/ambiguous-relation-menu.js @@ -34,12 +34,12 @@ YUI.add('ambiguous-relation-menu', function() { var end = endpoint[1]; components.push(
  • - {start.displayName}:{start.name} → {end.displayName}:{end.name} + data-startservice={start.service} + data-startname={start.name} + data-endservice={end.service} + data-endname={end.name} + key={start.name + end.name + i}> + {start.displayName}:{start.name} → {end.displayName}:{end.name}
  • ); }); return components; diff --git a/jujugui/static/gui/src/app/components/relation-menu/relation-menu.js b/jujugui/static/gui/src/app/components/relation-menu/relation-menu.js index 9a8cc09916..38d7abd59c 100644 --- a/jujugui/static/gui/src/app/components/relation-menu/relation-menu.js +++ b/jujugui/static/gui/src/app/components/relation-menu/relation-menu.js @@ -41,8 +41,8 @@ YUI.add('relation-menu', function() { } var type = id.split(':')[1]; return endpoint.displayName - .replace(/^\(/, '') - .replace(/\)$/, '') + ':' + type; + .replace(/^\(/, '') + .replace(/\)$/, '') + ':' + type; } /** @@ -90,7 +90,7 @@ YUI.add('relation-menu', function() { {_generateIcon(relation)} - {_getRealServiceName(relation.sourceId, relation)} + {_getRealServiceName(relation.sourceId, relation)} {' '}-{' '} + ); }, diff --git a/jujugui/static/gui/src/app/components/search-results/item/test-item.js b/jujugui/static/gui/src/app/components/search-results/item/test-item.js index 74a29b32bf..309545d7e6 100644 --- a/jujugui/static/gui/src/app/components/search-results/item/test-item.js +++ b/jujugui/static/gui/src/app/components/search-results/item/test-item.js @@ -56,12 +56,12 @@ describe('SearchResultsItem', function() { it('can render an item', function() { var changeState = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); const tags = output.props.children[1].props.children[1].props.children; const series = output.props.children[2].props.children.props.children; const icons = output.props.children[3].props.children.props.children; @@ -84,7 +84,7 @@ describe('SearchResultsItem', function() { onClick={tags[0].props.children.props.onClick}> tag1 - +
  • + className="list-icons__image" + alt="mysql" /> mysql @@ -165,12 +165,12 @@ describe('SearchResultsItem', function() { item.series = []; item.tags = null; var output = jsTestUtils.shallowRender( - ); + ); const icons = output.props.children[3].props.children.props.children; const owner = output.props.children[4].props.children.props.children[1]; const deploy = output.props.children[5].props.children; @@ -204,8 +204,8 @@ describe('SearchResultsItem', function() { mysql + className="list-icons__image" + alt="mysql" /> mysql @@ -256,20 +256,20 @@ describe('SearchResultsItem', function() { iconPath: 'apache2.svg' }]; var output = jsTestUtils.shallowRender( - ); + ); const icons = output.props.children[3].props.children.props.children; const owner = output.props.children[4].props.children.props.children[1]; const deploy = output.props.children[5].props.children; var expected = (
  • - +

    mysql @@ -348,12 +348,12 @@ describe('SearchResultsItem', function() { var changeState = sinon.stub(); var preventDefault = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.children[0].props.onClick({preventDefault: preventDefault}); assert.equal(changeState.callCount, 1); assert.equal(preventDefault.callCount, 1); @@ -368,12 +368,12 @@ describe('SearchResultsItem', function() { var changeState = sinon.stub(); var preventDefault = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); const series = output.props.children[2].props.children.props.children; series[0].props.children.props.onClick({preventDefault: preventDefault}); assert.equal(changeState.callCount, 1); @@ -397,14 +397,14 @@ describe('SearchResultsItem', function() { var changeState = sinon.stub(); var preventDefault = sinon.stub(); var output = jsTestUtils.shallowRender( - ); + ); output.props.children[1].props.children[1].props.children[0].props.children - .props.onClick({preventDefault: preventDefault}); + .props.onClick({preventDefault: preventDefault}); assert.equal(changeState.callCount, 1); assert.equal(preventDefault.callCount, 1); assert.deepEqual(changeState.args[0][0], { @@ -424,14 +424,14 @@ describe('SearchResultsItem', function() { const changeState = sinon.stub(); const preventDefault = sinon.stub(); const output = jsTestUtils.shallowRender( - ); + ); output.props.children[4].props.children.props.children[1] - .props.onClick({preventDefault: preventDefault}); + .props.onClick({preventDefault: preventDefault}); assert.equal(changeState.callCount, 1); assert.equal(preventDefault.callCount, 1); assert.deepEqual(changeState.args[0][0], { @@ -442,12 +442,12 @@ describe('SearchResultsItem', function() { it('gives the correct class names for charm list item', function() { const output = jsTestUtils.shallowRender( - ); + ); const seriesClass = output.props.children[2].props.className; const iconsClass = output.props.children[3].props.className; @@ -459,12 +459,12 @@ describe('SearchResultsItem', function() { it('gives the correct class names for bundle list item', function() { item.type = 'bundle'; var output = jsTestUtils.shallowRender( - ); + ); const seriesClass = output.props.children[2].props.className; const iconsClass = output.props.children[3].props.className; @@ -477,12 +477,12 @@ describe('SearchResultsItem', function() { const changeState = sinon.stub(); const deployTarget = sinon.stub(); const output = jsTestUtils.shallowRender( - ); + ); output.props.children[5].props.children.props.action(); assert.equal(changeState.callCount, 1); assert.equal(deployTarget.callCount, 1); diff --git a/jujugui/static/gui/src/app/components/search-results/search-results.js b/jujugui/static/gui/src/app/components/search-results/search-results.js index 064e26e8c0..b3d2f66275 100644 --- a/jujugui/static/gui/src/app/components/search-results/search-results.js +++ b/jujugui/static/gui/src/app/components/search-results/search-results.js @@ -43,7 +43,7 @@ YUI.add('search-results', function(Y) { type: React.PropTypes.string }, - /** + /** If it's the same charm but for different series, collapse into one entity. We do this by converting the list to an OrderedDict, keyed on the match criteria (name, owner, type). When there is a key collision, @@ -210,7 +210,7 @@ YUI.add('search-results', function(Y) { @param {String} series The series to filter by. */ searchRequest: function(query, tags, type, sort, series, provides, - requires, owner) { + requires, owner) { var filters = {text: query, tags: tags}; // Don't add the type property unless required otherwise the API will // filter by charm. @@ -277,9 +277,9 @@ YUI.add('search-results', function(Y) { const query = this.props.query ? ` for: ${this.props.query}` : ''; this.props.setPageTitle(`Search results${query}`); this.searchRequest( - this.props.query, this.props.tags, this.props.type, - this.props.sort, this.props.series, this.props.provides, - this.props.requires, this.props.owner); + this.props.query, this.props.tags, this.props.type, + this.props.sort, this.props.series, this.props.provides, + this.props.requires, this.props.owner); }, componentWillUnmount: function() { @@ -312,7 +312,7 @@ YUI.add('search-results', function(Y) { showCommunity: nextProps.showCommunity || false }; var currentType = nextProps.type !== undefined ? - nextProps.type : this.props.type; + nextProps.type : this.props.type; switch (state.activeComponent) { case 'loading': state.activeChild = { @@ -382,7 +382,7 @@ YUI.add('search-results', function(Y) { filter='series' items={seriesItems} currentValue={ - nextProps.series || this.props.series} /> + nextProps.series || this.props.series} />

  • @@ -536,7 +536,7 @@ YUI.add('search-results', function(Y) { type="inline-neutral" extraClasses="show-community-button" title={buttonTitle} /> -
    ) : null; +
    ) : null; return (
    {button}
    diff --git a/jujugui/static/gui/src/app/components/search-results/select-filter/test-select-filter.js b/jujugui/static/gui/src/app/components/search-results/select-filter/test-select-filter.js index 7c611038e7..5880de2a2b 100644 --- a/jujugui/static/gui/src/app/components/search-results/select-filter/test-select-filter.js +++ b/jujugui/static/gui/src/app/components/search-results/select-filter/test-select-filter.js @@ -51,8 +51,8 @@ describe('SearchResultsSelectFilter', function() { {'Sort by'}:
    ); }); @@ -78,8 +78,8 @@ describe('SearchResultsSelectFilter', function() { {'Sort by'}:
    ); }); diff --git a/jujugui/static/gui/src/app/components/search-results/test-search-results.js b/jujugui/static/gui/src/app/components/search-results/test-search-results.js index 1a2ede8307..7fc2ae85d7 100644 --- a/jujugui/static/gui/src/app/components/search-results/test-search-results.js +++ b/jujugui/static/gui/src/app/components/search-results/test-search-results.js @@ -45,17 +45,17 @@ describe('SearchResults', function() { it('can initially show the spinner', function() { var query = 'spinach'; var output = jsTestUtils.shallowRender( - ); + ); assert.deepEqual(output,
    @@ -67,17 +67,17 @@ describe('SearchResults', function() { it('can display a message if there are no results', function() { var charmstoreSearch = sinon.stub().callsArgWith(1, null, []); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); var output = shallowRenderer.getRenderOutput(); assert.deepEqual(output, @@ -103,17 +103,17 @@ describe('SearchResults', function() { it('can display a message if there is a loading error', function() { var charmstoreSearch = sinon.stub().callsArgWith(1, 'bad wolf', []); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); var instance = shallowRenderer.getMountedInstance(); instance.componentDidMount(); var output = shallowRenderer.getRenderOutput(); @@ -158,30 +158,30 @@ describe('SearchResults', function() { var charmstoreSearch = sinon.stub().callsArgWith(1, null, mockData); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); var instance = shallowRenderer.getMountedInstance(); instance.componentDidMount(); shallowRenderer.getRenderOutput(); assert.isTrue(charmstoreSearch.calledOnce, - 'search function not called'); + 'search function not called'); assert.isTrue(mockModel.toEntity.callCount == mockData.length, - 'all models not converted to plain old objects'); + 'all models not converted to plain old objects'); var data = instance.state.data; assert.equal(data.text, query, - 'search text not set to the query'); + 'search text not set to the query'); assert.equal(data.solutionsCount, mockData.length, - 'total results returned is incorrect'); + 'total results returned is incorrect'); }); const changeState = sinon.spy(); @@ -372,20 +372,20 @@ describe('SearchResults', function() { it('can render the promulgated search results', function() { const shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); const instance = shallowRenderer.getMountedInstance(); instance.componentDidMount(); const output = shallowRenderer.getRenderOutput(); @@ -396,20 +396,20 @@ describe('SearchResults', function() { it('will show community results', function() { const shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); const instance = shallowRenderer.getMountedInstance(); instance.componentDidMount(); instance._toggleCommunityResults(); @@ -423,17 +423,17 @@ describe('SearchResults', function() { const abort = sinon.stub(); const charmstoreSearch = sinon.stub().returns({abort: abort}); const renderer = jsTestUtils.shallowRender( - , true); + , true); const instance = renderer.getMountedInstance(); instance.componentDidMount(); assert.equal(abort.callCount, 0); @@ -552,17 +552,17 @@ describe('SearchResults', function() { ]; var actual = searchResults.collapseSeries(entities, getName); assert.equal(actual[0].name, 'foo1', - 'foo1 did not maintain sort position'); + 'foo1 did not maintain sort position'); assert.equal(actual[0].downloads, 10, - 'foo1 downloads not aggregated'); + 'foo1 downloads not aggregated'); assert.equal(actual[1].name, 'foo2', - 'foo2 did not maintain sort position'); + 'foo2 did not maintain sort position'); assert.equal(actual[1].downloads, 8, - 'foo2 downloads not aggregated'); + 'foo2 downloads not aggregated'); assert.equal(actual[2].name, 'foo3', - 'foo3 did not maintain sort position'); + 'foo3 did not maintain sort position'); assert.equal(actual[2].downloads, 13, - 'foo3 downloads not aggregated'); + 'foo3 downloads not aggregated'); }); it('sorts the series within collapsed results', function() { @@ -640,9 +640,9 @@ describe('SearchResults', function() { searchResults.searchCallback(null, rawResults); var spy = searchResults.setState; assert.deepEqual(spy.getCall(0).args[0], {waitingForSearch: false}, - 'waitingForSearch flag still set'); + 'waitingForSearch flag still set'); assert.deepEqual(spy.getCall(1).args[0], {data: expected}, - 'search data returned is incorrect'); + 'search data returned is incorrect'); searchResults._changeActiveComponent = _changeActiveComponent; }); @@ -654,10 +654,10 @@ describe('SearchResults', function() { searchResults.props = {charmstoreSearch: searchSpy}; searchResults.searchRequest(query, 'ops'); assert.deepEqual(stateSpy.getCall(1).args[0], {waitingForSearch: true}, - 'waitingForSearch flag is not set'); + 'waitingForSearch flag is not set'); assert.deepEqual(searchSpy.getCall(0).args[0], - {text: query, tags: 'ops'}, - 'query not passed in correctly'); + {text: query, tags: 'ops'}, + 'query not passed in correctly'); }); it('passes the optional parameters to the search', function() { @@ -668,20 +668,20 @@ describe('SearchResults', function() { searchResults.props = {charmstoreSearch: searchSpy}; searchResults.searchRequest(query, 'ops', 'bundle', '-name'); assert.deepEqual(stateSpy.getCall(1).args[0], {waitingForSearch: true}, - 'waitingForSearch flag is not set'); + 'waitingForSearch flag is not set'); assert.deepEqual( - searchSpy.getCall(0).args[0], - {text: query, tags: 'ops', type: 'bundle', sort: '-name'}, - 'query not passed in correctly'); + searchSpy.getCall(0).args[0], + {text: query, tags: 'ops', type: 'bundle', sort: '-name'}, + 'query not passed in correctly'); }); it('decides to search when the query changes', function() { var query = 'spinach'; searchResults.state = {data: {text: query}}; assert.isFalse(searchResults.shouldSearch({query: query}), - 'Unchanged query should not trigger search'); + 'Unchanged query should not trigger search'); assert.isTrue(searchResults.shouldSearch({query: 'foo'}), - 'Changed query should trigger search'); + 'Changed query should trigger search'); }); it('triggers a search request upon component mount', function() { @@ -707,21 +707,21 @@ describe('SearchResults', function() { searchResults.shouldSearch = sinon.stub().returns(true); searchResults.state = {waitingForSearch: false}; assert.isTrue(searchResults.shouldComponentUpdate(), - 'Should re-render after new search finished'); + 'Should re-render after new search finished'); searchResults.shouldSearch = sinon.stub().returns(false); searchResults.state = { waitingForSearch: false, activeComponent: 'loading' }; assert.isFalse(searchResults.shouldComponentUpdate(), - 'Should not re-render without a new search'); + 'Should not re-render without a new search'); searchResults.shouldSearch = sinon.stub().returns(true); searchResults.state = { waitingForSearch: true, activeComponent: 'loading' }; assert.isFalse(searchResults.shouldComponentUpdate(), - 'Should not re-render when waiting for a search'); + 'Should not re-render when waiting for a search'); }); it('will abort the request when unmounting', function() { @@ -742,17 +742,17 @@ describe('SearchResults', function() { mockModel.toEntity = sinon.stub().returns(result); var charmstoreSearch = sinon.stub().returns({abort: abort}); var shallowRenderer = jsTestUtils.shallowRender( - , true); + , true); shallowRenderer.getMountedInstance().componentDidMount(); shallowRenderer.unmount(); assert.equal(abort.callCount, 1); @@ -815,13 +815,13 @@ describe('SearchResults', function() { searchResults.searchCallback(null, rawResults); var actualResults = setState.getCall(1).args[0].data.promulgatedResults; assert.deepEqual(actualResults[0].storeId, - 'cs:~charmers/trusty/mysql-38'); + 'cs:~charmers/trusty/mysql-38'); assert.deepEqual(actualResults[1].storeId, - 'cs:~stub/precise/postgresql-psql-9'); + 'cs:~stub/precise/postgresql-psql-9'); assert.deepEqual(actualResults[2].storeId, - 'cs:~charmers/precise/nova-volume-6'); + 'cs:~charmers/precise/nova-volume-6'); assert.deepEqual(actualResults[3].storeId, - 'cs:~cloudbaseit/win2012r2/mssql-express-1'); + 'cs:~cloudbaseit/win2012r2/mssql-express-1'); searchResults._changeActiveComponent = _changeActiveComponent; }); }); diff --git a/jujugui/static/gui/src/app/components/search-results/type-filter/test-type-filter.js b/jujugui/static/gui/src/app/components/search-results/type-filter/test-type-filter.js index d5dd3d3e44..5eec99f221 100644 --- a/jujugui/static/gui/src/app/components/search-results/type-filter/test-type-filter.js +++ b/jujugui/static/gui/src/app/components/search-results/type-filter/test-type-filter.js @@ -40,21 +40,21 @@ describe('SearchResultsTypeFilter', function() {