Uncomments tests

This commit is contained in:
Filipa Lacerda 2017-08-12 00:14:45 +01:00
parent a3cf3e5074
commit ab88fcf117
2 changed files with 10 additions and 13 deletions

View file

@ -11,6 +11,7 @@ shared_examples 'discussion comments' do |resource_name|
expect(page).to have_selector toggle_selector
find("#{form_selector} .note-textarea").send_keys('a')
find(submit_selector).click
wait_for_requests
@ -75,17 +76,17 @@ shared_examples 'discussion comments' do |resource_name|
expect(page).not_to have_selector menu_selector
end
# it 'clicking the ul padding or divider should not change the text' do
# find(menu_selector).trigger 'click'
it 'clicking the ul padding or divider should not change the text' do
find(menu_selector).trigger 'click'
# expect(page).to have_selector menu_selector
# expect(find(dropdown_selector)).to have_content 'Comment'
expect(page).to have_selector menu_selector
expect(find(dropdown_selector)).to have_content 'Comment'
# find("#{menu_selector} .divider").trigger 'click'
find("#{menu_selector} .divider").trigger 'click'
# expect(page).to have_selector menu_selector
# expect(find(dropdown_selector)).to have_content 'Comment'
# end
expect(page).to have_selector menu_selector
expect(find(dropdown_selector)).to have_content 'Comment'
end
describe 'when selecting "Start discussion"' do
before do

View file

@ -1,13 +1,9 @@
module QuickActionsHelpers
def write_note(text, wait = true)
def write_note(text)
Sidekiq::Testing.fake! do
page.within('.js-main-target-form') do
fill_in 'note[note]', with: text
find('.js-comment-submit-button').trigger('click')
if wait
wait_for_requests
end
end
end
end