diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2017-01-04 15:44:16 -0600 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-01-04 15:50:07 -0600 |
commit | f4772b37c9fbccb72d1956e308313a8bb1dc8342 (patch) | |
tree | dca423c7f0c432f605523014747a802f0a14e977 /spec/features/ci_lint_spec.rb | |
parent | 7c2a4699b8bdd9d8abd193e4256694115b41fc07 (diff) | |
download | gitlab-ce-f4772b37c9fbccb72d1956e308313a8bb1dc8342.tar.gz |
Change CI template linter textarea with Ace Editor
Diffstat (limited to 'spec/features/ci_lint_spec.rb')
-rw-r--r-- | spec/features/ci_lint_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/features/ci_lint_spec.rb b/spec/features/ci_lint_spec.rb index 81077f4b005..3ebc432206a 100644 --- a/spec/features/ci_lint_spec.rb +++ b/spec/features/ci_lint_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'CI Lint' do +describe 'CI Lint', js: true do before do login_as :user end @@ -8,7 +8,10 @@ describe 'CI Lint' do describe 'YAML parsing' do before do visit ci_lint_path - fill_in 'content', with: yaml_content + # Ace editor updates a hidden textarea and it happens asynchronously + # `sleep 0.1` is actually needed here because of this + execute_script("ace.edit('ci-editor').setValue(" + yaml_content.to_json + ");") + sleep 0.1 click_on 'Validate' end @@ -40,7 +43,7 @@ describe 'CI Lint' do let(:yaml_content) { 'my yaml content' } it 'loads previous YAML content after validation' do - expect(page).to have_field('content', with: 'my yaml content', type: 'textarea') + expect(page).to have_field('content', with: 'my yaml content', visible: false, type: 'textarea') end end end |