Commit d701b39d authored by Phil Hughes's avatar Phil Hughes

Fixed up boards filter spec due to CSS classes changing

Also fixed issue with Vue resource encoding + in search term
parent 9ef84008
...@@ -70,7 +70,8 @@ class List { ...@@ -70,7 +70,8 @@ class List {
const paramSplit = filterParam.split('='); const paramSplit = filterParam.split('=');
const paramKeyNormalized = paramSplit[0].replace('[]', ''); const paramKeyNormalized = paramSplit[0].replace('[]', '');
const isArray = paramSplit[0].indexOf('[]'); const isArray = paramSplit[0].indexOf('[]');
const value = decodeURIComponent(paramSplit[1]); let value = decodeURIComponent(paramSplit[1]);
value = value.replace(/\+/g, ' ');
if (isArray >= 0) { if (isArray >= 0) {
if (!data[paramKeyNormalized]) { if (!data[paramKeyNormalized]) {
......
...@@ -29,7 +29,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -29,7 +29,7 @@ describe 'Issue Boards', feature: true, js: true do
end end
it 'shows tooltip on add issues button' do it 'shows tooltip on add issues button' do
button = page.find('.issue-boards-search button', text: 'Add issues') button = page.find('.filter-dropdown-container button', text: 'Add issues')
expect(button[:"data-original-title"]).to eq("Please add a list to your board first") expect(button[:"data-original-title"]).to eq("Please add a list to your board first")
end end
...@@ -115,9 +115,8 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -115,9 +115,8 @@ describe 'Issue Boards', feature: true, js: true do
end end
it 'search done list' do it 'search done list' do
page.within('#js-boards-search') do find('.filtered-search').set(issue8.title)
find('.form-control').set(issue8.title) find('.filtered-search').native.send_keys(:enter)
end
wait_for_vue_resource wait_for_vue_resource
...@@ -127,9 +126,8 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -127,9 +126,8 @@ describe 'Issue Boards', feature: true, js: true do
end end
it 'search list' do it 'search list' do
page.within('#js-boards-search') do find('.filtered-search').set(issue5.title)
find('.form-control').set(issue5.title) find('.filtered-search').native.send_keys(:enter)
end
wait_for_vue_resource wait_for_vue_resource
...@@ -333,7 +331,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -333,7 +331,7 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource wait_for_vue_resource
expect(find('.issue-boards-search')).to have_selector('.open') expect(page).to have_css('#js-add-list.open')
end end
it 'creates new list from a new label' do it 'creates new list from a new label' do
......
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