Skip to content

Commit f27b948

Browse files
committed
Update test dependencies
Version Updates: * geckodriver 1.8.1 * karma-jasmine 1.1.0 * protractor 5.1.2 * selenium-webdriver 3.5.0 Other changes: * Remove no-longer-needed upgrade-selenium script * Remove no-longer-needed jasmine-beforeall (built into jasmine now) * Use Node 6.x for Travis (required for latest dependencies) * Fix failing unit tests under newer jasmine version
1 parent bc1359d commit f27b948

File tree

8 files changed

+26
-30
lines changed

8 files changed

+26
-30
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- "4"
3+
- "6"
44
before_script:
55
- make build
66
script:

app/scripts/services/applicationGenerator.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,19 @@ angular.module("openshiftConsole")
351351
sourceStrategy: {
352352
from: {
353353
kind: "ImageStreamTag",
354-
name: input.imageName + ":" + input.imageTag,
355-
namespace: input.namespace
354+
name: input.imageName + ":" + input.imageTag
356355
},
357356
env: env
358357
}
359358
},
360359
triggers: triggers
361360
}
362361
};
362+
363+
if (input.namespace) {
364+
bc.spec.strategy.sourceStrategy.namespace = input.namespace;
365+
}
366+
363367
if (_.get(input, 'buildConfig.secrets.gitSecret[0].name')) {
364368
bc.spec.source.sourceSecret = _.head(input.buildConfig.secrets.gitSecret);
365369
}

app/scripts/services/membership/membership.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,16 @@ angular
9494
_.each(rolebinding.subjects, function(subject) {
9595
var subjectKey = uniqueKey(subject.namespace, subject.name);
9696
if(!result[subject.kind].subjects[subjectKey]) {
97-
result[subject.kind].subjects[subjectKey] = {
97+
var subjectValue = {
9898
name: subject.name,
99-
namespace: subject.namespace,
10099
roles: {}
101100
};
101+
if (subject.namespace) {
102+
subjectValue.namespace = subject.namespace;
103+
}
104+
result[subject.kind].subjects[subjectKey] = subjectValue;
102105
}
103-
if(!_.includes(result[subject.kind].subjects[subjectKey].roles, roleKey)) {
106+
if(roles[roleKey] && !_.includes(result[subject.kind].subjects[subjectKey].roles, roleKey)) {
104107
result[subject.kind].subjects[subjectKey].roles[roleKey] = roles[roleKey];
105108
}
106109
});

dist/scripts/scripts.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -1481,16 +1481,15 @@ type: "Source",
14811481
sourceStrategy: {
14821482
from: {
14831483
kind: "ImageStreamTag",
1484-
name: e.imageName + ":" + e.imageTag,
1485-
namespace: e.namespace
1484+
name: e.imageName + ":" + e.imageTag
14861485
},
14871486
env: n
14881487
}
14891488
},
14901489
triggers: a
14911490
}
14921491
};
1493-
return _.get(e, "buildConfig.secrets.gitSecret[0].name") && (l.spec.source.sourceSecret = _.head(e.buildConfig.secrets.gitSecret)), e.buildConfig.contextDir && (l.spec.source.contextDir = e.buildConfig.contextDir), l;
1492+
return e.namespace && (l.spec.strategy.sourceStrategy.namespace = e.namespace), _.get(e, "buildConfig.secrets.gitSecret[0].name") && (l.spec.source.sourceSecret = _.head(e.buildConfig.secrets.gitSecret)), e.buildConfig.contextDir && (l.spec.source.contextDir = e.buildConfig.contextDir), l;
14941493
}, o._generateImageStream = function(e) {
14951494
return {
14961495
apiVersion: "v1",
@@ -2324,11 +2323,14 @@ var a = _.reduce(e, function(e, a) {
23242323
var r = n(a.roleRef.namespace ? "Role" : "ClusterRole", a.roleRef.name);
23252324
return _.each(a.subjects, function(a) {
23262325
var o = n(a.namespace, a.name);
2327-
e[a.kind].subjects[o] || (e[a.kind].subjects[o] = {
2326+
if (!e[a.kind].subjects[o]) {
2327+
var i = {
23282328
name: a.name,
2329-
namespace: a.namespace,
23302329
roles: {}
2331-
}), _.includes(e[a.kind].subjects[o].roles, r) || (e[a.kind].subjects[o].roles[r] = t[r]);
2330+
};
2331+
a.namespace && (i.namespace = a.namespace), e[a.kind].subjects[o] = i;
2332+
}
2333+
t[r] && !_.includes(e[a.kind].subjects[o].roles, r) && (e[a.kind].subjects[o].roles[r] = t[r]);
23322334
}), e;
23332335
}, {
23342336
User: {

package.json

+5-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"bower": "1.8.0",
1212
"clean-css": "3.4.12",
1313
"connect-modrewrite": "0.7.9",
14-
"geckodriver": "1.6.0",
14+
"geckodriver": "1.8.1",
1515
"grunt": "0.4.5",
1616
"grunt-angular-templates": "1.0.3",
1717
"grunt-cli": "1.1.0",
@@ -40,22 +40,21 @@
4040
"grunt-wiredep": "3.0.0",
4141
"html-minifier": "1.1.1",
4242
"imagemin": "1.0.5",
43-
"jasmine-beforeall": "0.1.1",
4443
"jasmine-spec-reporter": "4.0.0",
4544
"jshint-stylish": "0.2.0",
4645
"karma": "0.12.23",
4746
"karma-chrome-launcher": "^2.0.0",
4847
"karma-coverage": "0.2.6",
4948
"karma-firefox-launcher": "^1.0.0",
50-
"karma-jasmine": "0.1.5",
49+
"karma-jasmine": "1.1.0",
5150
"karma-ng-html2js-preprocessor": "1.0.0",
5251
"karma-phantomjs-launcher": "^1.0.4",
5352
"less": "2.6.1",
5453
"load-grunt-tasks": "0.4.0",
5554
"lodash": "3.10.1",
56-
"protractor": "5.1.1",
55+
"protractor": "^5.1.2",
5756
"protractor-screenshot-reporter": "0.0.5",
58-
"selenium-webdriver": "3.4.0",
57+
"selenium-webdriver": "3.5.0",
5958
"serve-static": "1.10.2",
6059
"time-grunt": "0.3.2"
6160
},
@@ -70,6 +69,6 @@
7069
"serve": "grunt serve",
7170
"start": "grunt serve",
7271
"test-integration": "grunt test-integration",
73-
"postinstall": "node test/upgrade-selenium.js && node_modules/protractor/bin/webdriver-manager update"
72+
"postinstall": "node_modules/protractor/bin/webdriver-manager update"
7473
}
7574
}

test/integration/e2e.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22

3-
//require('jasmine-beforeall');
43
var h = require('./helpers.js');
54

65
describe('', function() {

test/integration/features/user_creates_from_url.spec.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
//require('jasmine-beforeall');
4-
53
const h = require('../helpers');
64
const addExtension = require('../helpers/extensions').addExtension;
75
const resetExtensions = require('../helpers/extensions').resetExtensions;

test/upgrade-selenium.js

-9
This file was deleted.

0 commit comments

Comments
 (0)