Commit 60adf5a9 authored by Filipa Lacerda's avatar Filipa Lacerda

Update dropdown tests to match bootstrap one on issue page and droplab on other pages

parent dff60db2
...@@ -76,7 +76,16 @@ shared_examples 'discussion comments' do |resource_name| ...@@ -76,7 +76,16 @@ shared_examples 'discussion comments' do |resource_name|
expect(page).not_to have_selector menu_selector expect(page).not_to have_selector menu_selector
end end
it 'clicking the ul padding or divider should not change the text' do it 'clicking the ul padding or divider should not change the text' do
if resource_name == 'issue'
find(menu_selector).trigger 'click'
expect(find(dropdown_selector)).to have_content 'Comment'
find(toggle_selector).click
find("#{menu_selector} .divider").trigger 'click'
expect(find(dropdown_selector)).to have_content 'Comment'
else
find(menu_selector).trigger 'click' find(menu_selector).trigger 'click'
expect(page).to have_selector menu_selector expect(page).to have_selector menu_selector
...@@ -87,6 +96,7 @@ shared_examples 'discussion comments' do |resource_name| ...@@ -87,6 +96,7 @@ shared_examples 'discussion comments' do |resource_name|
expect(page).to have_selector menu_selector expect(page).to have_selector menu_selector
expect(find(dropdown_selector)).to have_content 'Comment' expect(find(dropdown_selector)).to have_content 'Comment'
end end
end
describe 'when selecting "Start discussion"' do describe 'when selecting "Start discussion"' do
before do before 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