Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-10-16 20:37:52 +0300
committerEric Eastwood <contact@ericeastwood.com>2017-10-19 22:01:15 +0300
commit43377979c6cfee922702a5dc6324fded96b1f111 (patch)
tree8ac0061a979a611c9927e04815a1df5a71d2d505 /spec/features/ci_lint_spec.rb
parent96d8c7fff114911faa7d3e1b6322c2b9e3377e9b (diff)
Check for element before evaluate_script
Tip from https://robots.thoughtbot.com/write-reliable-asynchronous-integration-tests-with-capybara#directly-interacting-with-javascript
Diffstat (limited to 'spec/features/ci_lint_spec.rb')
-rw-r--r--spec/features/ci_lint_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/features/ci_lint_spec.rb b/spec/features/ci_lint_spec.rb
index 9accd7bb07c..9bc23baf6cf 100644
--- a/spec/features/ci_lint_spec.rb
+++ b/spec/features/ci_lint_spec.rb
@@ -10,6 +10,7 @@ describe 'CI Lint', :js do
visit ci_lint_path
# Ace editor updates a hidden textarea and it happens asynchronously
# `sleep 0.1` is actually needed here because of this
+ find('#ci-editor')
execute_script("ace.edit('ci-editor').setValue(" + yaml_content.to_json + ");")
sleep 0.1
click_on 'Validate'