aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/test/js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-03-17 10:36:55 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-03-17 10:37:44 +0100
commitcb1993913dea86f7584e57391b5a3b41e40dc267 (patch)
tree8178236117b76910a4946fab4aea25871c86bed5 /server/sonar-web/src/test/js
parent707572f2a6702c04d4941d2cb41382ef9853284d (diff)
downloadsonarqube-cb1993913dea86f7584e57391b5a3b41e40dc267.tar.gz
sonarqube-cb1993913dea86f7584e57391b5a3b41e40dc267.zip
stabilize execution of web tests on windows
Diffstat (limited to 'server/sonar-web/src/test/js')
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-create-custom-rules.js6
-rw-r--r--server/sonar-web/src/test/js/nav-spec.js7
-rw-r--r--server/sonar-web/src/test/js/source-viewer-create-manual-issue.js9
3 files changed, 12 insertions, 10 deletions
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-create-custom-rules.js b/server/sonar-web/src/test/js/coding-rules-page-should-create-custom-rules.js
index 57ace3f2892..1d6d4cf7fa6 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-create-custom-rules.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-create-custom-rules.js
@@ -66,9 +66,9 @@ casper.test.begin('coding-rules-page-should-delete-create-rules', 2, function (t
.then(function () {
test.assertElementCount('#coding-rules-detail-custom-rules .coding-rules-detail-list-name', 1);
casper.click('.js-create-custom-rule');
- casper.fillForm('.modal form', {
- name: 'test',
- markdown_description: 'test'
+ casper.evaluate(function () {
+ jQuery('.modal form [name="test"]').val('test');
+ jQuery('.modal form [name="markdown_description"]').val('test');
});
casper.click('#coding-rules-custom-rule-creation-create');
lib.waitForElementCount('#coding-rules-detail-custom-rules .coding-rules-detail-list-name', 2, function () {
diff --git a/server/sonar-web/src/test/js/nav-spec.js b/server/sonar-web/src/test/js/nav-spec.js
index 41b9c8e0ea3..3e9f3f1a777 100644
--- a/server/sonar-web/src/test/js/nav-spec.js
+++ b/server/sonar-web/src/test/js/nav-spec.js
@@ -270,7 +270,9 @@ casper.test.begin(testName('Search'), 16, function (test) {
})
.then(function () {
- casper.fill('.navbar-search', { q: 'search query' }, true);
+ casper.evaluate(function () {
+ jQuery('.navbar-search [name="q"]').val('search query').keyup();
+ });
casper.evaluate(function () {
jQuery('.navbar-search [name="q"]').keyup();
});
@@ -286,9 +288,8 @@ casper.test.begin(testName('Search'), 16, function (test) {
.then(function () {
// should reset search results
- casper.fill('.navbar-search', { q: '' }, true);
casper.evaluate(function () {
- jQuery('.navbar-search [name="q"]').keyup();
+ jQuery('.navbar-search [name="q"]').val('').keyup();
});
casper.waitForSelectorTextChange('.js-search-results');
})
diff --git a/server/sonar-web/src/test/js/source-viewer-create-manual-issue.js b/server/sonar-web/src/test/js/source-viewer-create-manual-issue.js
index 554af8b9268..f897c471bf8 100644
--- a/server/sonar-web/src/test/js/source-viewer-create-manual-issue.js
+++ b/server/sonar-web/src/test/js/source-viewer-create-manual-issue.js
@@ -62,10 +62,11 @@ casper.test.begin(testName('source-viewer-create-manual-issue'), function (test)
})
.then(function () {
- casper.fill('.js-manual-issue-form', {
- rule: 'manual:api',
- message: 'An issue message'
- }, true);
+ casper.evaluate(function () {
+ jQuery('.js-manual-issue-form [name="rule"]').val('manual:api');
+ jQuery('.js-manual-issue-form [name="message"]').val('An issue message');
+ jQuery('.js-manual-issue-form input[type="submit"]').click();
+ });
})
.then(function () {