Skip to content

Commit

Permalink
Write project comment spec for bootstrap
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Bruckmayer <cbruckmayer@suse.com>
Co-authored-by: Dany Marcoux <dmarcoux@suse.com>
  • Loading branch information
3 people authored and dmarcoux committed Dec 10, 2018
1 parent 1fdd903 commit d0dc3e4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/api/spec/features/webui/comments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

RSpec.feature 'Comments', type: :feature, js: true do
let(:user) { create(:confirmed_user, login: 'burdenski') }
let!(:comment) { create(:comment_project, commentable: user.home_project, user: user) }

scenario 'can be created' do
login user
Expand All @@ -13,13 +14,10 @@
end

scenario 'can be answered' do
skip_if_bootstrap
login user
comment = create(:comment_project, commentable: Project.first, user: user)
visit project_show_path(user.home_project)
# reply link contains an img element. Thus the regex
find('a', text: /.*Reply/).click
fill_in "reply_body_#{comment.id}", with: 'Reply Body'
find("#reply_link_id_#{comment.id}").click
fill_in("reply_body_#{comment.id}", with: 'Reply Body')
click_button("add_reply_#{comment.id}")

expect(page).to have_text('Reply Body')
Expand Down

0 comments on commit d0dc3e4

Please sign in to comment.