Skip to content

Commit

Permalink
Merge pull request #1429 from SUSE/depfu/update/rubocop-capybara-2.20.0
Browse files Browse the repository at this point in the history
Update rubocop-capybara 2.19.0 → 2.20.0 (minor)
  • Loading branch information
danidoni authored Jan 8, 2024
2 parents f923462 + e2589bf commit 41036a0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.19.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
Expand Down
20 changes: 10 additions & 10 deletions spec/features/collaboration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

visit project_path(nil, project)

click_link 'Join this project'
click_on 'Join this project'
expect(page).to have_css("#user#{user.id}-gravatar")
expect(page).to have_text("Welcome to the project #{user.name}.")
end
Expand All @@ -19,9 +19,9 @@
sign_in user

visit project_path(nil, project)
click_link 'Leave this project'
click_on 'Leave this project'

expect(page).not_to have_css("#user#{user.id}-gravatar")
expect(page).to have_no_css("#user#{user.id}-gravatar")
expect(page).to have_text("Sorry to see you go #{user.name}.")
end

Expand All @@ -33,9 +33,9 @@
visit project_path(nil, project)

expect do
click_link "like-#{project.id}"
click_on "like-#{project.id}"
end.to change(Project.liked, :count).by(1)
expect(page).not_to have_css("like-#{project.id}")
expect(page).to have_no_css("like-#{project.id}")
end

scenario 'User dislikes a project' do
Expand All @@ -44,12 +44,12 @@
sign_in user

visit project_path(nil, project)
click_link "like-#{project.id}"
click_on "like-#{project.id}"

expect do
click_link "dislike-#{project.id}"
click_on "dislike-#{project.id}"
end.to change(Project.liked, :count).by(-1)
expect(page).not_to have_css("dislike-#{project.id}")
expect(page).to have_no_css("dislike-#{project.id}")
end

scenario 'User likes a project multiple times' do
Expand All @@ -58,11 +58,11 @@
sign_in user

visit project_path(nil, project)
click_link "like-#{project.id}"
click_on "like-#{project.id}"

expect do
find("#like-#{project.id}", visible: false).click
end.to change(Project.liked, :count).by(0)
expect(page).not_to have_css("like-#{project.id}")
expect(page).to have_no_css("like-#{project.id}")
end
end
12 changes: 6 additions & 6 deletions spec/features/comment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

visit project_path(:all, project)
fill_in 'comment_text', with: '_italic_ **bold** :smile: @user'
click_link 'Preview'
click_on 'Preview'

expect(page).to have_css('em', text: 'italic')
expect(page).to have_css('strong', text: 'bold')
Expand All @@ -31,7 +31,7 @@

expect do
within('#comments_form_section') do
click_button 'Create Comment'
click_on 'Create Comment'
end
end.to change(project.comments, :count).by(1)
expect(page).to have_text comment_text
Expand All @@ -45,7 +45,7 @@
visit project_path(nil, project)

within("li#comment_#{first_comment.id}") do
click_link 'Reply'
click_on 'Reply'
end

within("#replyCommentcomment_#{first_comment.id}") do
Expand All @@ -54,7 +54,7 @@

expect do
within("#replyCommentcomment_#{first_comment.id}") do
click_button 'Create Comment'
click_on 'Create Comment'
end
end.to change(first_comment.comments, :count).by(1)
end
Expand All @@ -67,12 +67,12 @@
visit project_path(nil, project)

within("li#comment_#{comment.id}") do
click_link 'Edit'
click_on 'Edit'
end

within("#editCommentcomment_#{comment.id}") do
fill_in 'comment_text', with: update_text
click_button 'Update Comment'
click_on 'Update Comment'
end

within("li#comment_#{comment.id}") do
Expand Down
14 changes: 7 additions & 7 deletions spec/features/project_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
fill_in 'project_description', with: description

expect do
click_button 'Create Project'
click_on 'Create Project'
end.to change(Project, :count).by(1)
expect(page).to have_text("an idea by #{user.name}")
expect(page).to have_text(title)
Expand All @@ -35,7 +35,7 @@

fill_in 'project_title', with: title
fill_in 'project_description', with: description
click_button 'Update Project'
click_on 'Update Project'

expect(page).to have_text("an idea by #{user.name}")
expect(page).to have_text(title)
Expand All @@ -48,7 +48,7 @@
visit project_path(nil, project)

expect do
click_link "project#{project.to_param}-delete-link"
click_on "project#{project.to_param}-delete-link"
end.to change(Project, :count).by(-1)
end

Expand All @@ -58,7 +58,7 @@
visit project_path(nil, project)

expect do
click_link "project#{project.to_param}-recess-link"
click_on "project#{project.to_param}-recess-link"
end.to change(Project.archived, :count).by(1)
end

Expand All @@ -68,15 +68,15 @@
visit project_path(nil, project)

expect do
click_link "project#{project.to_param}-advance-link"
click_on "project#{project.to_param}-advance-link"
end.to change(Project.finished, :count).by(1)
end

scenario 'User restarts a project' do
project = create(:invention, originator: user, users: [user])

visit project_path(nil, project)
click_link "project#{project.to_param}-recess-link"
click_on "project#{project.to_param}-recess-link"

project.reload
expect(project.aasm_state).to eq('project')
Expand All @@ -85,7 +85,7 @@
scenario 'User uses markdown preview button during editing', :js do
visit '/projects/new'
fill_in 'project_description', with: '_italic_ **bold**'
click_link 'Preview'
click_on 'Preview'

expect(page).to have_css('em', text: 'italic')
expect(page).to have_css('strong', text: 'bold')
Expand Down

0 comments on commit 41036a0

Please sign in to comment.