summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-08-21 08:58:33 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-08-21 08:58:33 +0000
commitcc0bf2f6231a3c231450a7ef8f272de9f9591eaa (patch)
tree5eeab2e5a534f21d1954e380e2bae244bd798009 /qa
parent9276b10ddccfb28ac5dc581411166513e2173d72 (diff)
parent2efd5c0b63eb3b86354988cf0f47a0ca83e52d3e (diff)
downloadgitlab-ce-cc0bf2f6231a3c231450a7ef8f272de9f9591eaa.tar.gz
Merge branch '49179-fill-with-js-directly-qa' into 'master'
Resolve "[QA] Automation Triage 11.1.0 RC9 - Filling textarea with deploy key timeouts sometime" Closes #49179 See merge request gitlab-org/gitlab-ce!21258
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/project/settings/secret_variables.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/qa/qa/page/project/settings/secret_variables.rb b/qa/qa/page/project/settings/secret_variables.rb
index d2f5d5a9060..937ae6797c8 100644
--- a/qa/qa/page/project/settings/secret_variables.rb
+++ b/qa/qa/page/project/settings/secret_variables.rb
@@ -23,7 +23,13 @@ module QA
# After we fill the key, JS would generate another field so
# we need to use the same index to find the corresponding one.
keys[index].set(key)
- all_elements(:ci_variable_input_value)[index].set(value)
+ node = all_elements(:ci_variable_input_value)[index]
+
+ # Simply run `node.set(value)` is too slow for long text here,
+ # so we need to run JavaScript directly to set the value.
+ # The code was inspired from:
+ # https://github.com/teamcapybara/capybara/blob/679548cea10773d45e32808f4d964377cfe5e892/lib/capybara/selenium/node.rb#L217
+ execute_script("arguments[0].value = #{value.to_json}", node)
end
def save_variables