Skip to content

Commit

Permalink
[ci] Fix failing tests for requests after server side pagination
Browse files Browse the repository at this point in the history
Pair programming with @mdeniz
  • Loading branch information
eduardoj committed Nov 3, 2016
1 parent b81f6e6 commit 6830091
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/api/test/functional/webui/request_controller_test.rb
Expand Up @@ -23,10 +23,8 @@ def test_my_involved_requests # spec/controllers/webui/user_controller_spec.rb

page.must_have_selector 'table#requests_in_table tr'

# walk over the table
rs = find('tr#tr_request_9991').find('.request_target')
rs.find(:xpath, '//a[@title="kde4"]').must_have_text 'kde4'
rs.find(:xpath, '//a[@title="kdelibs"]').must_have_text 'kdelibs'
find(:xpath, '//a[@title="kde4"]').must_have_text 'kde4'
find(:xpath, '//a[@title="kdelibs"]').must_have_text 'kdelibs'
end

def test_can_request_role_addition_for_projects # spec/features/webui/requests_spec.rb
Expand Down Expand Up @@ -160,7 +158,7 @@ def test_submit_package_and_revoke # spec/features/webui/requests_spec.rb
def test_tom_adds_invalid_project_reviewer # spec/features/webui/requests_spec.rb
login_tom to: user_show_path(user: 'tom')

within('tr#tr_request_9994') do
within('table#reviews_in_table') do
page.must_have_text '~:branches:kde4 / BranchPack'
first(:css, 'a.request_link').click
end
Expand All @@ -182,7 +180,7 @@ def test_tom_adds_invalid_project_reviewer # spec/features/webui/requests_spec.r
def test_tom_adds_reviewer_Iggy # spec/features/webui/requests_spec.rb
login_tom to: user_show_path(user: 'tom')

within('tr#tr_request_9994') do
within('table#reviews_in_table') do
page.must_have_text '~:branches:kde4 / BranchPack'
first(:css, 'a.request_link').click
end
Expand Down Expand Up @@ -298,8 +296,8 @@ def test_requests # spec/controllers/webui/user_controller_spec.rb
get "/home/requests.json"
assert_response :success
result = ActiveSupport::JSON.decode(@response.body)
assert_equal 2, result["sEcho"]
assert_equal 0, result["iTotalRecords"]
assert_equal 1, result["draw"]
assert_equal 0, result["recordsTotal"]
assert_equal [], result["data"]
end

Expand Down

0 comments on commit 6830091

Please sign in to comment.