Wrong description of UI tests setup in development documentation for nailgun

Bug #1253702 reported by Aleksey Kasatkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Fuel UI Team

Bug Description

There is a problem with development documentation for nailgun:

https://github.com/stackforge/fuel-web/blob/master/docs/develop/env.rst#setup-for-web-ui-tests

UI tests setup was checked within https://bugs.launchpad.net/fuel/+bug/1251632 task
and no appropriate solution was found to get jslint tests green.

In Ubuntu Server 12.04 jslint tests didn't even run until nodejs upgrade:

sudo apt-get install python-software-properties
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

But there was no appropriate solution found to get jslint tests green (for both 12.04 and 13.04).

jslint output:

$ ./run_tests.sh --jslint

static/js/utils.js
 #1 Unused 'dummy'.
    var dummy = this.offsetHeight; // Line 44, Pos 25

static/js/models.js
 #1 Expected 'ignore' and instead saw 'e'.
    } catch (e) {} // Line 136, Pos 22
 #2 Expected 'ignore' and instead saw 'e'.
    } catch(e) {} // Line 199, Pos 21
 #3 Unused 'options'.
    toJSON: function(options) { // Line 208, Pos 26
 #4 Unused 'collections'.
    var collections = {}; // Line 20, Pos 9

static/js/main.js is OK.

static/js/coccyx_mixins.js is OK.

static/js/views/capacity_page.js
 #1 Unexpected assignment expression.
    this.registerDeferred(this.timeout = $.timeout(this.updateInterval).done(_.bind(this.update, this))); // Line 41, Pos 52

static/js/views/releases_page.js
 #1 Unexpected assignment expression.
    this.registerDeferred(this.timeout = $.timeout(this.updateInterval).done(_.bind(this.update, this))); // Line 42, Pos 52

static/js/views/dialogs.js
 #1 Expected 'ignore' and instead saw 'e'.
    } catch(e) {} // Line 59, Pos 21
 #2 Unused 'cluster'.
    beforeClusterCreation: function(cluster) { // Line 216, Pos 41
 #3 Unused 'cluster'.
    beforeSettingsSaving: function(cluster) { // Line 219, Pos 40
 #4 Unused 'model'.
    this.cluster.on('invalid', function(model, error) { // Line 262, Pos 49
 #5 Unused 'e'.
    renderReleases: function(e) { // Line 300, Pos 34
 #6 Expected 'ignore' and instead saw 'e'.
    } catch(e) {} // Line 352, Pos 21
 #7 Unused 'response'.
    .done(_.bind(function(response) { // Line 504, Pos 47
 #8 Expected 'ignore' and instead saw 'e'.
    } catch (e) {} // Line 641, Pos 26
 #9 Expected 'ignore' and instead saw 'e'.
    } catch (e) {} // Line 668, Pos 26
#10 Unused 'options'.
    this.nodes.toJSON = function(options) { // Line 765, Pos 46
#11 Unused 'deferred'.
    var deferred = this.nodes.sync('update', this.nodes) // Line 770, Pos 21

static/js/views/support_page.js
 #1 Unexpected assignment expression.
    this.registerDeferred(this.timeout = $.timeout(this.updateInterval).done(_.bind(this.update, this))); // Line 53, Pos 52

static/js/views/common.js
 #1 Unused 'breadcrumbsPath'.
    var breadcrumbsPath = _.isFunction(this.breadcrumbsPath) ? this.breadcrumbsPath() : this.breadcrumbsPath; // Line 42, Pos 17
 #2 Unused 'e'.
    togglePopover: function(e) { // Line 144, Pos 33
 #3 Unused 'options'.
    initialize: function(options) { // Line 269, Pos 30
 #4 Unused 'model'.
    this.redHatAccount.on('invalid', function(model, errors) { // Line 333, Pos 55

static/js/views/notifications_page.js is OK.

static/js/views/clusters_page.js
 #1 Unused 'models'.
    function(models, utils, commonViews, dialogViews, clustersPageTemplate, clusterTemplate, newClusterTemplate) { // Line 26, Pos 10

static/js/views/cluster_page.js
 #1 Unused 'options'.
    initialize: function(options) { // Line 249, Pos 30
 #2 Unused 'models'.
    function(utils, models, commonViews, dialogViews, NodesTab, NetworkTab, SettingsTab, LogsTab, ActionsTab, HealthCheckTab, clusterPageTemplate, clusterCustomizationMessageTemplate, deploymentResultTemplate, deploymentControlTemplate) { // Line 33, Pos 17

static/js/views/cluster_page_tabs/network_tab.js
 #1 Unused 'el'.
    this.$('.net-manager input').attr('checked', function(el, oldAttr) {return !oldAttr;}); // Line 65, Pos 67
 #2 Unused 'index'.
    this.$('.ip-range-row').each(function(index, rangeRow) { // Line 329, Pos 51
 #3 Unused 'model'.
    this.network.on('invalid', function(model, errors) { // Line 386, Pos 49
 #4 Unused 'e'.
    onChange: function(e) { // Line 418, Pos 28
 #5 Unused 'model'.
    this.novaNetworkConfiguration.on('invalid', function(model, errors) { // Line 427, Pos 66
 #6 Unused 'e'.
    changeConfiguration: function(e) { // Line 448, Pos 39
 #7 Unused 'model'.
    this.neutronParameters.on('invalid', function(model, errors) { // Line 481, Pos 59
 #8 Unused 'dialogViews'.
    function(utils, models, commonViews, dialogViews, networkTabTemplate, networkTemplate, novaNetworkConfigurationTemplate, neutronParametersTemplate, networkTabVerificationControlTemplate) { // Line 28, Pos 38

etc.

Appropriate solution is required to get UI tests green (for Ubuntu 12.04, and *maybe* 13.04-13.10).

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Vitaly Kramskikh (vkramskikh) → Fuel UI Team (fuel-ui)
Revision history for this message
Vitaly Kramskikh (vkramskikh) wrote :

Fixed a few weeks ago by switching to JS dependencies management using npm/grunt/bower

Changed in fuel:
status: New → Fix Committed
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.