Commit 75e0ec0f authored by Clement Ho's avatar Clement Ho

Fix rspec

parent d14acc3f
...@@ -777,17 +777,17 @@ describe 'Filter issues', js: true, feature: true do ...@@ -777,17 +777,17 @@ describe 'Filter issues', js: true, feature: true do
end end
it 'open state' do it 'open state' do
find('.issues-state-filters a', text: 'Closed').click find('.issues-state-filters .state-closed').click
wait_for_requests wait_for_requests
find('.issues-state-filters a', text: 'Open').click find('.issues-state-filters .state-opened').click
wait_for_requests wait_for_requests
expect(page).to have_selector('.issues-list .issue', count: 4) expect(page).to have_selector('.issues-list .issue', count: 4)
end end
it 'closed state' do it 'closed state' do
find('.issues-state-filters a', text: 'Closed').click find('.issues-state-filters .state-closed').click
wait_for_requests wait_for_requests
expect(page).to have_selector('.issues-list .issue', count: 1) expect(page).to have_selector('.issues-list .issue', count: 1)
...@@ -795,7 +795,7 @@ describe 'Filter issues', js: true, feature: true do ...@@ -795,7 +795,7 @@ describe 'Filter issues', js: true, feature: true do
end end
it 'all state' do it 'all state' do
find('.issues-state-filters a', text: 'All').click find('.issues-state-filters .state-all').click
wait_for_requests wait_for_requests
expect(page).to have_selector('.issues-list .issue', count: 5) expect(page).to have_selector('.issues-list .issue', count: 5)
......
...@@ -40,13 +40,13 @@ describe 'Filter merge requests', feature: true do ...@@ -40,13 +40,13 @@ describe 'Filter merge requests', feature: true do
end end
it 'does not change when closed link is clicked' do it 'does not change when closed link is clicked' do
find('.issues-state-filters a', text: "Closed").click find('.issues-state-filters .state-closed').click
expect_assignee_visual_tokens() expect_assignee_visual_tokens()
end end
it 'does not change when all link is clicked' do it 'does not change when all link is clicked' do
find('.issues-state-filters a', text: "All").click find('.issues-state-filters .state-all').click
expect_assignee_visual_tokens() expect_assignee_visual_tokens()
end end
...@@ -73,13 +73,13 @@ describe 'Filter merge requests', feature: true do ...@@ -73,13 +73,13 @@ describe 'Filter merge requests', feature: true do
end end
it 'does not change when closed link is clicked' do it 'does not change when closed link is clicked' do
find('.issues-state-filters a', text: "Closed").click find('.issues-state-filters .state-closed').click
expect_milestone_visual_tokens() expect_milestone_visual_tokens()
end end
it 'does not change when all link is clicked' do it 'does not change when all link is clicked' do
find('.issues-state-filters a', text: "All").click find('.issues-state-filters .state-all').click
expect_milestone_visual_tokens() expect_milestone_visual_tokens()
end end
...@@ -142,11 +142,9 @@ describe 'Filter merge requests', feature: true do ...@@ -142,11 +142,9 @@ describe 'Filter merge requests', feature: true do
expect_tokens([{ name: 'assignee', value: "@#{user.username}" }]) expect_tokens([{ name: 'assignee', value: "@#{user.username}" }])
expect_filtered_search_input_empty expect_filtered_search_input_empty
input_filtered_search_keys("label:~#{label.title} ") input_filtered_search_keys("label:~#{label.title}")
expect_mr_list_count(1) expect_mr_list_count(1)
find("#state-opened[href=\"#{URI.parse(current_url).path}?assignee_username=#{user.username}&label_name%5B%5D=#{label.title}&scope=all&state=opened\"]")
end end
context 'assignee and label', js: true do context 'assignee and label', js: true do
...@@ -163,13 +161,13 @@ describe 'Filter merge requests', feature: true do ...@@ -163,13 +161,13 @@ describe 'Filter merge requests', feature: true do
end end
it 'does not change when closed link is clicked' do it 'does not change when closed link is clicked' do
find('.issues-state-filters a', text: "Closed").click find('.issues-state-filters .state-closed').click
expect_assignee_label_visual_tokens() expect_assignee_label_visual_tokens()
end end
it 'does not change when all link is clicked' do it 'does not change when all link is clicked' do
find('.issues-state-filters a', text: "All").click find('.issues-state-filters .state-all').click
expect_assignee_label_visual_tokens() expect_assignee_label_visual_tokens()
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