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
end
it 'open state' do
find('.issues-state-filters a', text: 'Closed').click
find('.issues-state-filters .state-closed').click
wait_for_requests
find('.issues-state-filters a', text: 'Open').click
find('.issues-state-filters .state-opened').click
wait_for_requests
expect(page).to have_selector('.issues-list .issue', count: 4)
end
it 'closed state' do
find('.issues-state-filters a', text: 'Closed').click
find('.issues-state-filters .state-closed').click
wait_for_requests
expect(page).to have_selector('.issues-list .issue', count: 1)
......@@ -795,7 +795,7 @@ describe 'Filter issues', js: true, feature: true do
end
it 'all state' do
find('.issues-state-filters a', text: 'All').click
find('.issues-state-filters .state-all').click
wait_for_requests
expect(page).to have_selector('.issues-list .issue', count: 5)
......
......@@ -40,13 +40,13 @@ describe 'Filter merge requests', feature: true do
end
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()
end
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()
end
......@@ -73,13 +73,13 @@ describe 'Filter merge requests', feature: true do
end
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()
end
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()
end
......@@ -142,11 +142,9 @@ describe 'Filter merge requests', feature: true do
expect_tokens([{ name: 'assignee', value: "@#{user.username}" }])
expect_filtered_search_input_empty
input_filtered_search_keys("label:~#{label.title} ")
input_filtered_search_keys("label:~#{label.title}")
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
context 'assignee and label', js: true do
......@@ -163,13 +161,13 @@ describe 'Filter merge requests', feature: true do
end
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()
end
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()
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