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.
This commit is contained in:
parent
2be3463062
commit
e6c13d2954
1 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue