Skip to content

Commit 0130d75

Browse files
Hacks for jenkins
1 parent 4bec58a commit 0130d75

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

test/integration/features/user_adds_template_to_project.spec.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ describe('User adds a template to a project', function() {
3939
createFromTemplatePage.clickCreate(); // implicit redirect to overview page
4040
var deploymentsPage = new DeploymentsPage(project);
4141
deploymentsPage.visit();
42+
browser.sleep(10 * 1000); // sleep 10 seconds to experiment with jenkins
4243
var tableRows = element(by.repeater('replicationController in replicationControllersForDC'));
43-
h.waitForElem(tableRows, 20 * 1000); // 20 seconds? see if it flakes?
44+
h.waitForElem(tableRows);
4445
// TODO:
4546
// this template has 7 objects that should be verified:
4647
// - Service (load balancer)

test/integration/helpers.js

+13-11
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ exports.login = function(loginPageAlreadyLoaded) {
3737
}, 5000);
3838
};
3939

40-
exports.setInputValue = function(name, value) {
41-
var input = element(by.model(name));
42-
expect(input).toBeTruthy();
43-
input.clear();
44-
input.sendKeys(value);
45-
expect(input.getAttribute("value")).toBe(value);
46-
return input;
47-
};
48-
4940
exports.clickAndGo = function(buttonText, uri) {
5041
var button = element(by.buttonText(buttonText));
5142
browser.wait(EC.elementToBeClickable(button), 2000);
@@ -70,13 +61,15 @@ exports.waitForUri = waitForUri;
7061
// example:
7162
// waitForElement(element(by.css('.foo'))); // success
7263
// waitForElement(element.all(by.css('.foos'))); // fail, incorrect element.all
73-
exports.waitForElem = function(elem, timeout) {
64+
var waitForElem = function(elem, timeout) {
7465
return browser.wait(EC.presenceOf(elem), timeout || 5000, 'Element not found');
7566
};
67+
exports.waitForElem = waitForElem;
7668

77-
exports.waitForElemRemoval = function(elem, timeout) {
69+
var waitForElemRemoval = function(elem, timeout) {
7870
return browser.wait(EC.not(EC.presenceOf(elem)), timeout || 5000, 'Element did not disappear');
7971
};
72+
exports.waitForElemRemoval = waitForElemRemoval;
8073

8174
// an alt to waitForElem()
8275
// waitForElem() does not use protractor.ExpectConditions, which can occasionally flake
@@ -115,3 +108,12 @@ exports.waitFor = function(item, timeout, msg) {
115108
msg = msg || '';
116109
return browser.wait(item, timeout, msg);
117110
};
111+
112+
exports.setInputValue = function(name, value) {
113+
var input = element(by.model(name));
114+
waitForElem(input);
115+
input.clear();
116+
input.sendKeys(value);
117+
expect(input.getAttribute("value")).toBe(value);
118+
return input;
119+
};

0 commit comments

Comments
 (0)