diff options
author | Regis <boudinot.regis@yahoo.com> | 2017-05-02 05:56:04 +0300 |
---|---|---|
committer | Regis <boudinot.regis@yahoo.com> | 2017-05-02 05:56:04 +0300 |
commit | cfc03dab245843b924c353e50e15e2e59733048e (patch) | |
tree | 48b849c17471407747a84f75d818d3d2b8fea5b9 /spec/features/task_lists_spec.rb | |
parent | 7021e867e41f86343fa8fe9cef75f89d466b2ef6 (diff) |
fix rubocop offenses
Diffstat (limited to 'spec/features/task_lists_spec.rb')
-rw-r--r-- | spec/features/task_lists_spec.rb | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/spec/features/task_lists_spec.rb b/spec/features/task_lists_spec.rb index 3858f4d8959..38437b4250a 100644 --- a/spec/features/task_lists_spec.rb +++ b/spec/features/task_lists_spec.rb @@ -62,15 +62,16 @@ feature 'Task Lists', feature: true do visit namespace_project_issue_path(project.namespace, project, issue) end - describe 'for Issues' do + describe 'for Issues', js: true do include WaitForVueResource + before { wait_for_vue_resource } + describe 'multiple tasks', js: true do let!(:issue) { create(:issue, description: markdown, author: user, project: project) } it 'renders' do visit_issue(project, issue) - wait_for_vue_resource expect(page).to have_selector('ul.task-list', count: 1) expect(page).to have_selector('li.task-list-item', count: 6) @@ -79,7 +80,6 @@ feature 'Task Lists', feature: true do it 'contains the required selectors' do visit_issue(project, issue) - wait_for_vue_resource container = '.detail-page-description .description.js-task-list-container' @@ -92,14 +92,12 @@ feature 'Task Lists', feature: true do it 'is only editable by author' do visit_issue(project, issue) - wait_for_vue_resource expect(page).to have_selector('.js-task-list-container') logout(:user) login_as(user2) visit current_path - wait_for_vue_resource expect(page).not_to have_selector('.js-task-list-container') end @@ -109,12 +107,15 @@ feature 'Task Lists', feature: true do end end - describe 'single incomplete task' do + describe 'single incomplete task', js: true do + include WaitForVueResource + let!(:issue) { create(:issue, description: singleIncompleteMarkdown, author: user, project: project) } + before { wait_for_vue_resource } + it 'renders' do visit_issue(project, issue) - wait_for_vue_resource expect(page).to have_selector('ul.task-list', count: 1) expect(page).to have_selector('li.task-list-item', count: 1) @@ -132,7 +133,6 @@ feature 'Task Lists', feature: true do it 'renders' do visit_issue(project, issue) - wait_for_vue_resource expect(page).to have_selector('ul.task-list', count: 1) expect(page).to have_selector('li.task-list-item', count: 1) @@ -151,9 +151,6 @@ feature 'Task Lists', feature: true do before { visit_issue(project, issue) } it 'renders' do - - wait_for_vue_resource - expect(page).to have_selector('ul.task-list', count: 2) expect(page).to have_selector('li.task-list-item', count: 7) expect(page).to have_selector('ul input[checked]', count: 1) @@ -163,8 +160,6 @@ feature 'Task Lists', feature: true do it 'solves tasks' do expect(page).to have_content("2 of 7 tasks completed") - wait_for_vue_resource - page.find('li.task-list-item', text: 'Task b').find('input').click page.find('li.task-list-item ul li.task-list-item', text: 'Task a.2').find('input').click page.find('li.task-list-item ol li.task-list-item', text: 'Task 1.1').find('input').click @@ -173,8 +168,6 @@ feature 'Task Lists', feature: true do visit_issue(project, issue) # reload to see new system notes - wait_for_vue_resource - expect(page).to have_content('marked the task Task b as complete') expect(page).to have_content('marked the task Task a.2 as complete') expect(page).to have_content('marked the task Task 1.1 as complete') |