diff options
Diffstat (limited to 'spec/features/projects/pipeline_schedules_spec.rb')
-rw-r--r-- | spec/features/projects/pipeline_schedules_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/features/projects/pipeline_schedules_spec.rb b/spec/features/projects/pipeline_schedules_spec.rb index 065d00d51d4..220b3529c59 100644 --- a/spec/features/projects/pipeline_schedules_spec.rb +++ b/spec/features/projects/pipeline_schedules_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -feature 'Pipeline Schedules', :js do +describe 'Pipeline Schedules', :js do include PipelineSchedulesHelper let!(:project) { create(:project, :repository) } @@ -155,7 +155,7 @@ feature 'Pipeline Schedules', :js do end context 'when user creates a new pipeline schedule with variables' do - background do + before do visit_pipelines_schedules click_link 'New schedule' fill_in_schedule_form @@ -166,7 +166,7 @@ feature 'Pipeline Schedules', :js do save_pipeline_schedule end - scenario 'user sees the new variable in edit window' do + it 'user sees the new variable in edit window' do find(".content-list .pipeline-schedule-table-row:nth-child(1) .btn-group a[title='Edit']").click page.within('.ci-variable-list') do expect(find(".ci-variable-row:nth-child(1) .js-ci-variable-input-key").value).to eq('AAA') @@ -178,7 +178,7 @@ feature 'Pipeline Schedules', :js do end context 'when user edits a variable of a pipeline schedule' do - background do + before do create(:ci_pipeline_schedule, project: project, owner: user).tap do |pipeline_schedule| create(:ci_pipeline_schedule_variable, key: 'AAA', value: 'AAA123', pipeline_schedule: pipeline_schedule) end @@ -192,7 +192,7 @@ feature 'Pipeline Schedules', :js do click_button 'Save pipeline schedule' end - scenario 'user sees the updated variable in edit window' do + it 'user sees the updated variable in edit window' do find(".content-list .pipeline-schedule-table-row:nth-child(1) .btn-group a[title='Edit']").click page.within('.ci-variable-list') do expect(find(".ci-variable-row:nth-child(1) .js-ci-variable-input-key").value).to eq('foo') @@ -202,7 +202,7 @@ feature 'Pipeline Schedules', :js do end context 'when user removes a variable of a pipeline schedule' do - background do + before do create(:ci_pipeline_schedule, project: project, owner: user).tap do |pipeline_schedule| create(:ci_pipeline_schedule_variable, key: 'AAA', value: 'AAA123', pipeline_schedule: pipeline_schedule) end @@ -213,7 +213,7 @@ feature 'Pipeline Schedules', :js do click_button 'Save pipeline schedule' end - scenario 'user does not see the removed variable in edit window' do + it 'user does not see the removed variable in edit window' do find(".content-list .pipeline-schedule-table-row:nth-child(1) .btn-group a[title='Edit']").click page.within('.ci-variable-list') do expect(find(".ci-variable-row:nth-child(1) .js-ci-variable-input-key").value).to eq('') @@ -223,13 +223,13 @@ feature 'Pipeline Schedules', :js do end context 'when active is true and next_run_at is NULL' do - background do + before do create(:ci_pipeline_schedule, project: project, owner: user).tap do |pipeline_schedule| pipeline_schedule.update_attribute(:cron, nil) # Consequently next_run_at will be nil end end - scenario 'user edit and recover the problematic pipeline schedule' do + it 'user edit and recover the problematic pipeline schedule' do visit_pipelines_schedules find(".content-list .pipeline-schedule-table-row:nth-child(1) .btn-group a[title='Edit']").click fill_in 'schedule_cron', with: '* 1 2 3 4' |