Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRegis <boudinot.regis@yahoo.com>2017-04-25 00:03:58 +0300
committerRegis <boudinot.regis@yahoo.com>2017-04-25 00:03:58 +0300
commit3417e97c18bcf28fbe9f7061e9d9036c29931969 (patch)
treed169963c9e133bd90591468391f2564c57506c70 /spec/features/task_lists_spec.rb
parent76cdb8ee127942a3e5b88eb7e8a9c199bdf3363e (diff)
fix a few tests (not all) - update title in tab with new issue
Diffstat (limited to 'spec/features/task_lists_spec.rb')
-rw-r--r--spec/features/task_lists_spec.rb24
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/features/task_lists_spec.rb b/spec/features/task_lists_spec.rb
index a5d14aa19f1..b8b4fb75dd9 100644
--- a/spec/features/task_lists_spec.rb
+++ b/spec/features/task_lists_spec.rb
@@ -63,12 +63,16 @@ feature 'Task Lists', feature: true do
end
describe 'for Issues' do
- describe 'multiple tasks' do
+ include WaitForVueResource
+
+ 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)
expect(page).to have_selector('ul input[checked]', count: 2)
@@ -79,6 +83,8 @@ feature 'Task Lists', feature: true do
container = '.detail-page-description .description.js-task-list-container'
+ wait_for_vue_resource
+
expect(page).to have_selector(container)
expect(page).to have_selector("#{container} .wiki .task-list .task-list-item .task-list-item-checkbox")
expect(page).to have_selector("#{container} .js-task-list-field")
@@ -88,12 +94,17 @@ 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,6 +120,8 @@ 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)
expect(page).to have_selector('ul input[checked]', count: 0)
@@ -126,6 +139,8 @@ 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)
expect(page).to have_selector('ul input[checked]', count: 1)
@@ -143,6 +158,9 @@ 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)
@@ -152,6 +170,8 @@ 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
@@ -160,6 +180,8 @@ 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')