Commit c7b0732c authored by Phil Hughes's avatar Phil Hughes

Testing builds

parent 3644162b
...@@ -337,6 +337,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -337,6 +337,7 @@ describe 'Issue Boards', feature: true, js: true do
page.within '.dropdown-menu-author' do page.within '.dropdown-menu-author' do
click_link(user2.name) click_link(user2.name)
end end
wait_for_vue_resource(spinner: false)
expect(find('.js-author-search')).to have_content(user2.name) expect(find('.js-author-search')).to have_content(user2.name)
end end
...@@ -361,6 +362,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -361,6 +362,7 @@ describe 'Issue Boards', feature: true, js: true do
page.within '.dropdown-menu-assignee' do page.within '.dropdown-menu-assignee' do
click_link(user.name) click_link(user.name)
end end
wait_for_vue_resource(spinner: false)
expect(find('.js-assignee-search')).to have_content(user.name) expect(find('.js-assignee-search')).to have_content(user.name)
end end
...@@ -385,6 +387,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -385,6 +387,7 @@ describe 'Issue Boards', feature: true, js: true do
page.within '.milestone-filter' do page.within '.milestone-filter' do
click_link(milestone.title) click_link(milestone.title)
end end
wait_for_vue_resource(spinner: false)
expect(find('.js-milestone-select')).to have_content(milestone.title) expect(find('.js-milestone-select')).to have_content(milestone.title)
end end
...@@ -408,6 +411,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -408,6 +411,7 @@ describe 'Issue Boards', feature: true, js: true do
page.within '.dropdown-menu-labels' do page.within '.dropdown-menu-labels' do
click_link(testing.title) click_link(testing.title)
wait_for_vue_resource(spinner: false)
find('.dropdown-menu-close').click find('.dropdown-menu-close').click
end end
end end
...@@ -435,6 +439,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -435,6 +439,7 @@ describe 'Issue Boards', feature: true, js: true do
page.within '.dropdown-menu-labels' do page.within '.dropdown-menu-labels' do
click_link(testing.title) click_link(testing.title)
wait_for_vue_resource(spinner: false)
find('.dropdown-menu-close').click find('.dropdown-menu-close').click
end end
end end
...@@ -458,7 +463,9 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -458,7 +463,9 @@ describe 'Issue Boards', feature: true, js: true do
page.within '.dropdown-menu-labels' do page.within '.dropdown-menu-labels' do
click_link(testing.title) click_link(testing.title)
wait_for_vue_resource(spinner: false)
click_link(bug.title) click_link(bug.title)
wait_for_vue_resource(spinner: false)
find('.dropdown-menu-close').click find('.dropdown-menu-close').click
end end
end end
...@@ -482,6 +489,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -482,6 +489,7 @@ describe 'Issue Boards', feature: true, js: true do
page.within '.dropdown-menu-labels' do page.within '.dropdown-menu-labels' do
click_link("No Label") click_link("No Label")
wait_for_vue_resource(spinner: false)
find('.dropdown-menu-close').click find('.dropdown-menu-close').click
end end
end end
...@@ -505,6 +513,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -505,6 +513,7 @@ describe 'Issue Boards', feature: true, js: true do
page.within '.dropdown-menu-labels' do page.within '.dropdown-menu-labels' do
click_link(bug.title) click_link(bug.title)
wait_for_vue_resource(spinner: false)
find('.dropdown-menu-close').click find('.dropdown-menu-close').click
end end
end end
...@@ -523,6 +532,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -523,6 +532,7 @@ describe 'Issue Boards', feature: true, js: true do
page.within(find('.board', match: :first)) do page.within(find('.board', match: :first)) do
click_button(bug.title) click_button(bug.title)
wait_for_vue_resource(spinner: false)
expect(page).to have_selector('.card', count: 6) expect(page).to have_selector('.card', count: 6)
end end
...@@ -537,6 +547,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -537,6 +547,7 @@ describe 'Issue Boards', feature: true, js: true do
page.within(find('.card', match: :first)) do page.within(find('.card', match: :first)) do
click_button(bug.title) click_button(bug.title)
end end
wait_for_vue_resource(spinner: false)
expect(page).to have_selector('.card', count: 1) expect(page).to have_selector('.card', count: 1)
end end
...@@ -560,11 +571,13 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -560,11 +571,13 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource wait_for_vue_resource
end end
def wait_for_vue_resource def wait_for_vue_resource(spinner: true)
Timeout.timeout(Capybara.default_max_wait_time) do Timeout.timeout(Capybara.default_max_wait_time) do
loop until page.evaluate_script('Vue.activeResources').zero? loop until page.evaluate_script('Vue.activeResources').zero?
end end
expect(find('.boards-list')).not_to have_selector('.fa-spinner') if spinner
expect(find('.boards-list')).not_to have_selector('.fa-spinner')
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment