<commit_before><!DOCTYPE html>
<html>
<!--
This file is part of the Juju GUI, which lets users view and manage Juju
environments within a graphical interface (https://launchpad.net/juju-gui).
Copyright (C) 2012-2013 Canonical Ltd.

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License version 3, as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero
General Public License for more details.

You should have received a copy of the GNU Affero General Public License along
with this program.  If not, see <http://www.gnu.org/licenses/>.
-->

<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="assets/mocha.css">

  <!-- Load test runner/environment -->
  <script src="assets/chai.js"></script>
  <script src="assets/mocha.js"></script>
  <script>
    // Default window.flags to an empty object.
    window.flags = {};
    var juju = {
      components: {},
      utils: {}
    };
    // This is only the Mocha timeout. There's a selenium timeout in
    //  test_mocha_selenium as well that can effect CI test runs.
    var TIMEOUT = 50000;
    var assert = chai.assert,
        expect = chai.expect,
        should = chai.should();
    // Since we now no rely on locally installed mocha and phantomjs,
    // it is possible that mocha.useColors is not defined and should be
    // stubbed - Makyo 2015-08-07
    if (!mocha.useColors) {
        mocha.useColors = function() { return null; }
    }
    mocha.reporter('html');
    mocha.ui('bdd');
    mocha.setup({ignoreLeaks: false, timeout: TIMEOUT});

    var origBeforeEach = Mocha.Suite.prototype.beforeEach;
    var origAfterEach = Mocha.Suite.prototype.afterEach;
    Mocha.Suite.prototype.beforeEach = function(title, fn) {
      this.ctx._cleanups = [];
      origBeforeEach.call(this, title, fn);
    };

    Mocha.Suite.prototype.afterEach = function(func) {
      var newAfterEach = function(done) {
        func.apply(this, arguments);
        if (this._cleanups && this._cleanups.length) {
          while (this._cleanups.length > 0) {
            // Run the clean up method after popping it off the stack.
            this._cleanups.pop()();
          }
          this._cleanups = [];
        }
        done();
      }

      origAfterEach.call(this, newAfterEach);
    };
  </script>

  <!-- Load up YUI base, app modules, and test utils -->
  <!-- Since only the tests depend on these files and the prod tests disable
       the YUI loader, we have to include them manually here. -->
  <script src="/combo?app/assets/javascripts/bind-function-pollyfill.js&app/assets/javascripts/react-with-addons.js&app/assets/javascripts/classnames.js&app/assets/javascripts/react-onclickoutside.js"></script>
  <script src="/combo?app/assets/javascripts/handlebars.runtime.js&app/components/templates.js&app/components/helpers.js"></script>
  <script src="/combo?app/assets/javascripts/yui/yui/yui.js&app/assets/javascripts/yui/loader/loader.js&app/assets/javascripts/d3.js"></script>
  <script src="/combo?modules.js"></script>
  <script>
    var GlobalConfig = {
      combine: true,
      base: '/combo?/app/assets/javascripts/yui/',
      comboBase: '/combo?',
      maxURLLenght: 1300,
      root: 'app/assets/javascripts/yui/',
      groups: {
        app: {
            //combine: true,
            base: "/combo?app/",
            comboBase: "/combo?",
            root: 'app/',
            filter: 'raw',
            // From modules.js
            modules: YUI_MODULES,
        },
      }
    };
  </script>

  <script src="/combo?app/assets/javascripts/yui/event-simulate/event-simulate.js&app/assets/javascripts/yui/node-event-simulate/node-event-simulate.js"></script>
  <script src="/combo?app/assets/javascripts/spin.min.js"></script>
  <script src="utils.js"></script>
  <script src="factory.js"></script>

  <!-- Tests (Alphabetical) -->

  <!-- There is a cascading test failure if these tests are run in their
        appropriate spot -->
  <script src="test_request_series_inspector.js"></script>
  <script src="test_request_series_view.js"></script>

  <script src="test_added_services_button.js"></script>
  <script src="test_added_services_view.js"></script>
  <script src="test_app.js"></script>
  <script src="test_app_hotkeys.js"></script>
  <script src="test_application_notifications.js"></script>
  <script src="test_bakery.js"></script>
  <script src="test_browser_app.js"></script>
  <script src="test_browser_charm_details.js"></script>
  <script src="test_browser_events.js"></script>
  <script src="test_browser_models.js"></script>
  <script src="test_browser_search_widget.js"></script>
  <script src="test_cache.js"></script>
  <script src="test_change_version_viewlet.js"></script>
  <script src="test_charmbrowser_view.js"></script>
  <script src="test_charmstore_apiv4.js"></script>
  <script src="test_ui_state.js"></script>
  <script src="test_bundle_details_view.js"></script>
  <script src="test_bundle_module.js"></script>
  <script src="test_bundle_importer.js"></script>
  <script src="test_bundle_import_notifications.js"></script>
  <script src="test_changes_utils.js"></script>
  <script src="test_token_container.js"></script>
  <script src="test_token.js"></script>
  <script src="test_token_drag_and_drop.js"></script>

  <!-- FIXME: tests flicker, add container. -->
  <script src="test_conflict_ux.js"></script>
  <script src="test_console.js"></script>
  <script src="test_container_token.js"></script>
  <script src="test_cookies_app_extension.js"></script>
  <script src="test_create_machine_view.js"></script>
  <script src="test_databinding.js"></script>
  <script src="test_d3_components.js"></script>
  <script src="test_deployer_bar.js"></script>
  <script src="test_autodeploy_extension.js"></script>
  <script src="test_dropdown_extension.js"></script>
  <script src="test_drop_target_view_extension.js"></script>
  <script src="test_endpoints.js"></script>
  <script src="test_entity_extension.js"></script>
  <script src="test_env.js"></script>
  <Script src="test_env_change_set.js"></script>
  <script src="test_env_go.js"></script>
  <script src="test_environment_header.js"></script>
  <script src="test_environment_header_extension.js"></script>
  <script src="test_environment_view.js"></script>
  <script src="test_event_tracker.js"></script>
  <script src="test_fakebackend.js"></script>
  <script src="test_filter_widget.js"></script>
  <script src="test_service_inspector.js"></script>
  <script src="test_ghost_deployer_extension.js"></script>
  <script src="test_help_dropdown.js"></script>
  <script src="test_inspector_base.js"></script>
  <script src="test_inspector_charm.js"></script>
  <script src="test_inspector_constraints.js"></script>
  <script src="test_inspector_overview.js"></script>
  <script src="test_inspector_relations.js"></script>
  <script src="test_inspector_settings.js"></script>
  <script src="test_inspector_widget.js"></script>
  <script src="test_landscape.js"></script>
  <script src="test_local_charm_import_helpers.js"></script>
  <script src="test_local_new_upgrade_inspector.js"></script>
  <script src="test_local_new_upgrade_view.js"></script>
  <script src="test_login.js"></script>
  <script src="test_machine_token.js"></script>
  <script src="test_machine_view_panel.js"></script>
  <script src="test_machine_view_panel_extension.js"></script>
  <script src="test_machine_view_panel_header.js"></script>
  <script src="test_more_menu.js"></script>
  <script src="test_service_scale_up_view.js"></script>
  <script src="test_user_dropdown.js"></script>

  <!-- FIXME: latter three modules depend on side effects from model tests. -->
  <script src="test_model.js"></script>
  <script src="test_model_bundle.js"></script>
  <script src="test_model_controller.js"></script>
  <script src="test_onboarding.js"></script>
  <script src="test_topology.js"></script>
  <script src="test_topology_relation.js"></script>

  <script src="test_model_handlers.js"></script>
  <script src="test_notifications.js"></script>

  <!-- FIXME: test "should destroy notifications after N milliseconds"
      failed once in Jenkins CI, retrying submission. -->
  <script src="test_notifier_widget.js"></script>

  <!-- FIXME: intermittent test failure under "make test-server" and Chromium -
      position matches on setBusy: expected 100 to equal 109.09090423583984 -->
  <script src="test_overlay_indicator.js"></script>
  <script src="test_panzoom.js"></script>
  <script src="test_prettify.js"></script>
  <script src="test_resizing_textarea.js"></script>
  <script src="test_routing.js"></script>
  <script src="test_sandbox.js"></script>
  <script src="test_sandbox_go.js"></script>

  <!-- FIXME: tests leave DOM elements behind. -->
  <script src="test_service_module.js"></script>

  <script src="test_scale_up_view.js"></script>
  <script src="test_simulator.js"></script>

  <!-- FIXME: feature flags depend on code loaded by the startup test. -->
  <!--<script src="test_startup.js"></script>
  <script src="test_feature_flags.js"></script>-->

  <script src="test_sub_app.js"></script>
  <script src="test_subapp_app_extension.js"></script>
  <script src="test_tabview.js"></script>
  <script src="test_topology_utils.js"></script>
  <script src="test_serviceunit_token.js"></script>
  <script src="test_unit_detail_viewlet.js"></script>

  <script src="test_utils.js"></script>
  <script src="test_viewlet_manager.js"></script>
  <script src="test_viewport_module.js"></script>
  <script src="test_websocket_logging.js"></script>

  <script src="test_web_handler.js"></script>
  <script src="test_web_sandbox.js"></script>
  <script src="test_zip_utils.js"></script>
  <script src="test_cleanup.js"></script>

  <script>
  YUI_config = {
      async: false,
      delayUntil: 'domready',
      debug: false,
      combine: false,
      fetchCSS: false,
      // Do not attempt to dispatch a new route when an anchor tag appears in
      // the url. This is intended to keep charm details from reloading on tab
      // selection in the browser.
      navigateOnHash: false
  };


  // Set the url so we can full path loading fixture files.
  GlobalConfig.test_url = window.location.protocol + '//' + window.location.host + "/test/";

  // tabview needs to be here since it doesn't auto load it for some reason.
  YUI().use(['node', 'event', 'tabview'], function(Y) {
    var globals = ['testRunner', 'jsyaml',
      'consoleManager', 'zip', 'spinner', 'yui', '_yuid', 'juju', '_gaq',
      'PR_SHOULD_USE_CONTINUATION', 'prettyPrintOne', 'prettyPrint', 'PR',
      'console', 'juju_config', 'lastpass_iter', 'lastpass_f', 'saveAs', 'nacl', 'Float64Array'];
      // Run the tests.
      if (window.mochaPhantomJS) {
          mochaPhantomJS.run().globals(globals);
      } else {
          // The global variable testRunner is required by browser tests.
          testRunner = mocha.run().globals(globals);
      }
  });
  </script>

</head>

<body>
  <div id="shortcut-help" style="display: none"></div>
  <div class="header-banner">
    <div id="logout-trigger" style="display: none"></div>
  </div>
  <div id="main" class="container"></div>
  <div id="mocha"></div>
</body>
</html>
<commit_msg>Added the react-dom script to the old mocha test index<commit_after><!DOCTYPE html>
<html>
<!--
This file is part of the Juju GUI, which lets users view and manage Juju
environments within a graphical interface (https://launchpad.net/juju-gui).
Copyright (C) 2012-2013 Canonical Ltd.

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License version 3, as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero
General Public License for more details.

You should have received a copy of the GNU Affero General Public License along
with this program.  If not, see <http://www.gnu.org/licenses/>.
-->

<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="assets/mocha.css">

  <!-- Load test runner/environment -->
  <script src="assets/chai.js"></script>
  <script src="assets/mocha.js"></script>
  <script>
    // Default window.flags to an empty object.
    window.flags = {};
    var juju = {
      components: {},
      utils: {}
    };
    // This is only the Mocha timeout. There's a selenium timeout in
    //  test_mocha_selenium as well that can effect CI test runs.
    var TIMEOUT = 50000;
    var assert = chai.assert,
        expect = chai.expect,
        should = chai.should();
    // Since we now no rely on locally installed mocha and phantomjs,
    // it is possible that mocha.useColors is not defined and should be
    // stubbed - Makyo 2015-08-07
    if (!mocha.useColors) {
        mocha.useColors = function() { return null; }
    }
    mocha.reporter('html');
    mocha.ui('bdd');
    mocha.setup({ignoreLeaks: false, timeout: TIMEOUT});

    var origBeforeEach = Mocha.Suite.prototype.beforeEach;
    var origAfterEach = Mocha.Suite.prototype.afterEach;
    Mocha.Suite.prototype.beforeEach = function(title, fn) {
      this.ctx._cleanups = [];
      origBeforeEach.call(this, title, fn);
    };

    Mocha.Suite.prototype.afterEach = function(func) {
      var newAfterEach = function(done) {
        func.apply(this, arguments);
        if (this._cleanups && this._cleanups.length) {
          while (this._cleanups.length > 0) {
            // Run the clean up method after popping it off the stack.
            this._cleanups.pop()();
          }
          this._cleanups = [];
        }
        done();
      }

      origAfterEach.call(this, newAfterEach);
    };
  </script>

  <!-- Load up YUI base, app modules, and test utils -->
  <!-- Since only the tests depend on these files and the prod tests disable
       the YUI loader, we have to include them manually here. -->
  <script src="/combo?app/assets/javascripts/bind-function-pollyfill.js&app/assets/javascripts/react-with-addons.js&app/assets/javascripts/react-dom.js&app/assets/javascripts/classnames.js&app/assets/javascripts/react-onclickoutside.js"></script>
  <script src="/combo?app/assets/javascripts/handlebars.runtime.js&app/components/templates.js&app/components/helpers.js"></script>
  <script src="/combo?app/assets/javascripts/yui/yui/yui.js&app/assets/javascripts/yui/loader/loader.js&app/assets/javascripts/d3.js"></script>
  <script src="/combo?modules.js"></script>
  <script>
    var GlobalConfig = {
      combine: true,
      base: '/combo?/app/assets/javascripts/yui/',
      comboBase: '/combo?',
      maxURLLenght: 1300,
      root: 'app/assets/javascripts/yui/',
      groups: {
        app: {
            //combine: true,
            base: "/combo?app/",
            comboBase: "/combo?",
            root: 'app/',
            filter: 'raw',
            // From modules.js
            modules: YUI_MODULES,
        },
      }
    };
  </script>

  <script src="/combo?app/assets/javascripts/yui/event-simulate/event-simulate.js&app/assets/javascripts/yui/node-event-simulate/node-event-simulate.js"></script>
  <script src="/combo?app/assets/javascripts/spin.min.js"></script>
  <script src="utils.js"></script>
  <script src="factory.js"></script>

  <!-- Tests (Alphabetical) -->

  <!-- There is a cascading test failure if these tests are run in their
        appropriate spot -->
  <script src="test_request_series_inspector.js"></script>
  <script src="test_request_series_view.js"></script>

  <script src="test_added_services_button.js"></script>
  <script src="test_added_services_view.js"></script>
  <script src="test_app.js"></script>
  <script src="test_app_hotkeys.js"></script>
  <script src="test_application_notifications.js"></script>
  <script src="test_bakery.js"></script>
  <script src="test_browser_app.js"></script>
  <script src="test_browser_charm_details.js"></script>
  <script src="test_browser_events.js"></script>
  <script src="test_browser_models.js"></script>
  <script src="test_browser_search_widget.js"></script>
  <script src="test_cache.js"></script>
  <script src="test_change_version_viewlet.js"></script>
  <script src="test_charmbrowser_view.js"></script>
  <script src="test_charmstore_apiv4.js"></script>
  <script src="test_ui_state.js"></script>
  <script src="test_bundle_details_view.js"></script>
  <script src="test_bundle_module.js"></script>
  <script src="test_bundle_importer.js"></script>
  <script src="test_bundle_import_notifications.js"></script>
  <script src="test_changes_utils.js"></script>
  <script src="test_token_container.js"></script>
  <script src="test_token.js"></script>
  <script src="test_token_drag_and_drop.js"></script>

  <!-- FIXME: tests flicker, add container. -->
  <script src="test_conflict_ux.js"></script>
  <script src="test_console.js"></script>
  <script src="test_container_token.js"></script>
  <script src="test_cookies_app_extension.js"></script>
  <script src="test_create_machine_view.js"></script>
  <script src="test_databinding.js"></script>
  <script src="test_d3_components.js"></script>
  <script src="test_deployer_bar.js"></script>
  <script src="test_autodeploy_extension.js"></script>
  <script src="test_dropdown_extension.js"></script>
  <script src="test_drop_target_view_extension.js"></script>
  <script src="test_endpoints.js"></script>
  <script src="test_entity_extension.js"></script>
  <script src="test_env.js"></script>
  <Script src="test_env_change_set.js"></script>
  <script src="test_env_go.js"></script>
  <script src="test_environment_header.js"></script>
  <script src="test_environment_header_extension.js"></script>
  <script src="test_environment_view.js"></script>
  <script src="test_event_tracker.js"></script>
  <script src="test_fakebackend.js"></script>
  <script src="test_filter_widget.js"></script>
  <script src="test_service_inspector.js"></script>
  <script src="test_ghost_deployer_extension.js"></script>
  <script src="test_help_dropdown.js"></script>
  <script src="test_inspector_base.js"></script>
  <script src="test_inspector_charm.js"></script>
  <script src="test_inspector_constraints.js"></script>
  <script src="test_inspector_overview.js"></script>
  <script src="test_inspector_relations.js"></script>
  <script src="test_inspector_settings.js"></script>
  <script src="test_inspector_widget.js"></script>
  <script src="test_landscape.js"></script>
  <script src="test_local_charm_import_helpers.js"></script>
  <script src="test_local_new_upgrade_inspector.js"></script>
  <script src="test_local_new_upgrade_view.js"></script>
  <script src="test_login.js"></script>
  <script src="test_machine_token.js"></script>
  <script src="test_machine_view_panel.js"></script>
  <script src="test_machine_view_panel_extension.js"></script>
  <script src="test_machine_view_panel_header.js"></script>
  <script src="test_more_menu.js"></script>
  <script src="test_service_scale_up_view.js"></script>
  <script src="test_user_dropdown.js"></script>

  <!-- FIXME: latter three modules depend on side effects from model tests. -->
  <script src="test_model.js"></script>
  <script src="test_model_bundle.js"></script>
  <script src="test_model_controller.js"></script>
  <script src="test_onboarding.js"></script>
  <script src="test_topology.js"></script>
  <script src="test_topology_relation.js"></script>

  <script src="test_model_handlers.js"></script>
  <script src="test_notifications.js"></script>

  <!-- FIXME: test "should destroy notifications after N milliseconds"
      failed once in Jenkins CI, retrying submission. -->
  <script src="test_notifier_widget.js"></script>

  <!-- FIXME: intermittent test failure under "make test-server" and Chromium -
      position matches on setBusy: expected 100 to equal 109.09090423583984 -->
  <script src="test_overlay_indicator.js"></script>
  <script src="test_panzoom.js"></script>
  <script src="test_prettify.js"></script>
  <script src="test_resizing_textarea.js"></script>
  <script src="test_routing.js"></script>
  <script src="test_sandbox.js"></script>
  <script src="test_sandbox_go.js"></script>

  <!-- FIXME: tests leave DOM elements behind. -->
  <script src="test_service_module.js"></script>

  <script src="test_scale_up_view.js"></script>
  <script src="test_simulator.js"></script>

  <!-- FIXME: feature flags depend on code loaded by the startup test. -->
  <!--<script src="test_startup.js"></script>
  <script src="test_feature_flags.js"></script>-->

  <script src="test_sub_app.js"></script>
  <script src="test_subapp_app_extension.js"></script>
  <script src="test_tabview.js"></script>
  <script src="test_topology_utils.js"></script>
  <script src="test_serviceunit_token.js"></script>
  <script src="test_unit_detail_viewlet.js"></script>

  <script src="test_utils.js"></script>
  <script src="test_viewlet_manager.js"></script>
  <script src="test_viewport_module.js"></script>
  <script src="test_websocket_logging.js"></script>

  <script src="test_web_handler.js"></script>
  <script src="test_web_sandbox.js"></script>
  <script src="test_zip_utils.js"></script>
  <script src="test_cleanup.js"></script>

  <script>
  YUI_config = {
      async: false,
      delayUntil: 'domready',
      debug: false,
      combine: false,
      fetchCSS: false,
      // Do not attempt to dispatch a new route when an anchor tag appears in
      // the url. This is intended to keep charm details from reloading on tab
      // selection in the browser.
      navigateOnHash: false
  };


  // Set the url so we can full path loading fixture files.
  GlobalConfig.test_url = window.location.protocol + '//' + window.location.host + "/test/";

  // tabview needs to be here since it doesn't auto load it for some reason.
  YUI().use(['node', 'event', 'tabview'], function(Y) {
    var globals = ['testRunner', 'jsyaml',
      'consoleManager', 'zip', 'spinner', 'yui', '_yuid', 'juju', '_gaq',
      'PR_SHOULD_USE_CONTINUATION', 'prettyPrintOne', 'prettyPrint', 'PR',
      'console', 'juju_config', 'lastpass_iter', 'lastpass_f', 'saveAs', 'nacl', 'Float64Array'];
      // Run the tests.
      if (window.mochaPhantomJS) {
          mochaPhantomJS.run().globals(globals);
      } else {
          // The global variable testRunner is required by browser tests.
          testRunner = mocha.run().globals(globals);
      }
  });
  </script>

</head>

<body>
  <div id="shortcut-help" style="display: none"></div>
  <div class="header-banner">
    <div id="logout-trigger" style="display: none"></div>
  </div>
  <div id="main" class="container"></div>
  <div id="mocha"></div>
</body>
</html>

{'fraction_non_alphanumeric': 0.1560965007607042, 'fraction_numerical': 0.004607693979569658, 'mean_word_length': 4.074106749007499, 'pattern_counts': {'":': 0, '<': 541, '<?xml version=': 0, '>': 543, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5380609', 'n_tokens_mistral': 7550, 'n_tokens_neox': 7317, 'n_words': 1543}