summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-08-26 12:51:47 -0700
committerStan Hu <stanhu@gmail.com>2017-08-26 12:51:47 -0700
commite6c13d29544c7cbdad16575af04e5f2efca06e01 (patch)
tree767649a550cd3443c9b3a26d94ade8ff26b5ba60
parent2be34630623711fc20ef8c101b5cef688f207cc1 (diff)
downloadgitlab-ce-sh-improve-flaky-ace-editor-spec.tar.gz
Improve flaky ACE editor specsh-improve-flaky-ace-editor-spec
The ACE editor JavaScript may not be loaded when the spec runs evaluateScript. Wait for the editor to load before attempting to run ACE-specific JavaScript.
-rw-r--r--spec/features/projects/user_creates_files_spec.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/features/projects/user_creates_files_spec.rb b/spec/features/projects/user_creates_files_spec.rb
index 4b78cc4fc53..3d335687510 100644
--- a/spec/features/projects/user_creates_files_spec.rb
+++ b/spec/features/projects/user_creates_files_spec.rb
@@ -56,11 +56,10 @@ describe 'User creates files' do
find('.add-to-tree').click
click_link('New file')
+ expect(page).to have_selector('.file-editor')
end
it 'creates and commit a new file', js: true do
- expect(page).to have_selector('.file-editor')
-
execute_script("ace.edit('editor').setValue('*.rbca')")
fill_in(:file_name, with: 'not_a_file.md')
fill_in(:commit_message, with: 'New commit message', visible: true)