summaryrefslogtreecommitdiff
path: root/openstack_dashboard
diff options
context:
space:
mode:
authorTatiana Ovchinnikova <t.v.ovtchinnikova@gmail.com>2020-12-08 17:12:50 -0600
committerTatiana Ovchinnikova <t.v.ovtchinnikova@gmail.com>2020-12-17 12:21:31 -0600
commitb532943a31a9adb673586fc250cfa967306dccf3 (patch)
tree1756296dddb1a2556a8800643752e9cc8d3f3d6a /openstack_dashboard
parent5b554ce49b41e07701ba0f1af614d58e9ce3db9a (diff)
downloadhorizon-b532943a31a9adb673586fc250cfa967306dccf3.tar.gz
Update devDependencies in package.json
This patch updates outdated JavaScript dev dependencies. The latest Jasmine version makes nested beforeEach and unhandled promise rejection fail, this was fixed. Also, the latest Jasmine version runs tests in random order by default, random is set to false for now to prevent tests failures. Finally, the latest Jasmine version supports a new configuration option failSpecWithNoExpectations. By default, this option is set to false and Jasmine reports specs that have no expectations as passed. Setting this option to true tells Jasmine to report specs without as expectations as failed. For now, it is set to false for openstack-dashboard tests, this should be changed in future. Change-Id: I04d5c3ce7f7e0a9a38251e975b68bfa1998e556f
Diffstat (limited to 'openstack_dashboard')
-rw-r--r--openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js35
-rw-r--r--openstack_dashboard/karma.conf.js8
2 files changed, 25 insertions, 18 deletions
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js
index 93f2a821f..8e33169d8 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js
@@ -159,24 +159,23 @@
}
});
- beforeEach(function () {
- settings = {
- LAUNCH_INSTANCE_DEFAULTS: {
- create_volume: true,
- hide_create_volume: false,
- config_drive: false,
- disable_image: false,
- disable_instance_snapshot: false,
- disable_volume: false,
- disable_volume_snapshot: false
- },
- DEFAULT_BOOT_SOURCE: 'image'
- };
- IMAGE = {type: 'image', label: 'Image', selected: true};
- VOLUME = {type: 'volume', label: 'Volume', selected: false};
- VOLUME_SNAPSHOT = {type: 'volume_snapshot', label: 'Volume Snapshot', selected: false};
- INSTANCE_SNAPSHOT = {type: 'snapshot', label: 'Instance Snapshot', selected: false};
- });
+ settings = {
+ LAUNCH_INSTANCE_DEFAULTS: {
+ create_volume: true,
+ hide_create_volume: false,
+ config_drive: false,
+ disable_image: false,
+ disable_instance_snapshot: false,
+ disable_volume: false,
+ disable_volume_snapshot: false
+ },
+ DEFAULT_BOOT_SOURCE: 'image'
+ };
+ IMAGE = {type: 'image', label: 'Image', selected: true};
+ VOLUME = {type: 'volume', label: 'Volume', selected: false};
+ VOLUME_SNAPSHOT = {type: 'volume_snapshot', label: 'Volume Snapshot', selected: false};
+ INSTANCE_SNAPSHOT = {type: 'snapshot', label: 'Instance Snapshot', selected: false};
+
$provide.value('horizon.app.core.openstack-service-api.nova', novaApi);
$provide.value('horizon.app.core.openstack-service-api.security-group', securityGroupApi);
diff --git a/openstack_dashboard/karma.conf.js b/openstack_dashboard/karma.conf.js
index 2dd2713ba..d542b82e0 100644
--- a/openstack_dashboard/karma.conf.js
+++ b/openstack_dashboard/karma.conf.js
@@ -180,6 +180,14 @@ module.exports = function (config) {
dir: '../cover/openstack_dashboard'
},
+ // TODO(tmazur) set failSpecWithNoExpectations to true after fixing tests
+ client: {
+ jasmine: {
+ random: false,
+ failSpecWithNoExpectations: false
+ }
+ },
+
// Coverage threshold values.
thresholdReporter: {
statements: 96, // target 100