Call page.all
instead of all
in feature steps
There's a naming conflict between Capybara and rspec-matchers which both define the `all` method. See https://github.com/jnicklas/capybara/issues/1396
This commit is contained in:
parent
584f8601ef
commit
4c42fc7c4c
10 changed files with 12 additions and 12 deletions
|
@ -45,7 +45,7 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
step 'I should see all checkboxes checked' do
|
||||
all('input[type=checkbox]').each do |checkbox|
|
||||
page.all('input[type=checkbox]').each do |checkbox|
|
||||
expect(checkbox).to be_checked
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
|
|||
expect(github_modal).to be_visible
|
||||
expect(github_modal).to have_content "To enable importing projects from GitHub"
|
||||
|
||||
all('.modal-body').each do |element|
|
||||
page.all('.modal-body').each do |element|
|
||||
expect(element).not_to be_visible unless element == github_modal
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,14 +22,14 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
|
|||
|
||||
step 'I should see empty public project details with http clone info' do
|
||||
project = Project.find_by(name: 'Empty Public Project')
|
||||
all(:css, '.git-empty .clone').each do |element|
|
||||
page.all(:css, '.git-empty .clone').each do |element|
|
||||
expect(element.text).to include(project.http_url_to_repo)
|
||||
end
|
||||
end
|
||||
|
||||
step 'I should see empty public project details with ssh clone info' do
|
||||
project = Project.find_by(name: 'Empty Public Project')
|
||||
all(:css, '.git-empty .clone').each do |element|
|
||||
page.all(:css, '.git-empty .clone').each do |element|
|
||||
expect(element.text).to include(project.url_to_repo)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -80,6 +80,6 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
step "I should not see branch 'improve/awesome'" do
|
||||
expect(all(visible: true)).not_to have_content 'improve/awesome'
|
||||
expect(page.all(visible: true)).not_to have_content 'improve/awesome'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -83,7 +83,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
step 'The diff links to both the previous and current image' do
|
||||
links = all('.two-up span div a')
|
||||
links = page.all('.two-up span div a')
|
||||
expect(links[0]['href']).to match %r{blob/#{sample_image_commit.old_blob_id}}
|
||||
expect(links[1]['href']).to match %r{blob/#{sample_image_commit.new_blob_id}}
|
||||
end
|
||||
|
|
|
@ -61,13 +61,13 @@ class Spinach::Features::ProjectCommitsTags < Spinach::FeatureSteps
|
|||
|
||||
step "I should not see tag 'v1.1.0'" do
|
||||
page.within '.tags' do
|
||||
expect(all(visible: true)).not_to have_content 'v1.1.0'
|
||||
expect(page.all(visible: true)).not_to have_content 'v1.1.0'
|
||||
end
|
||||
end
|
||||
|
||||
step 'I delete all tags' do
|
||||
page.within '.tags' do
|
||||
all('.btn-remove').each do |remove|
|
||||
page.all('.btn-remove').each do |remove|
|
||||
remove.click
|
||||
sleep 0.05
|
||||
end
|
||||
|
|
|
@ -190,7 +190,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
|
|||
|
||||
step 'I see empty project details with ssh clone info' do
|
||||
project = Project.find_by(name: 'Empty Project')
|
||||
all(:css, '.git-empty .clone').each do |element|
|
||||
page.all(:css, '.git-empty .clone').each do |element|
|
||||
expect(element.text).to include(project.url_to_repo)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
|
|||
|
||||
step 'I delete all labels' do
|
||||
page.within '.labels' do
|
||||
all('.btn-remove').each do |remove|
|
||||
page.all('.btn-remove').each do |remove|
|
||||
remove.click
|
||||
sleep 0.05
|
||||
end
|
||||
|
|
|
@ -121,7 +121,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
step 'I should see the proper Inline and Side-by-side links' do
|
||||
buttons = all('#commit-diff-viewtype')
|
||||
buttons = page.all('#commit-diff-viewtype')
|
||||
expect(buttons.count).to eq(2)
|
||||
|
||||
buttons.each do |b|
|
||||
|
|
|
@ -30,7 +30,7 @@ class Spinach::Features::ProjectSourceMultiselectBlob < Spinach::FeatureSteps
|
|||
ids = Array(range).map { |n| "LC#{n}" }
|
||||
extra = false
|
||||
|
||||
highlighted = all("#tree-content-holder .highlight .line.hll")
|
||||
highlighted = page.all("#tree-content-holder .highlight .line.hll")
|
||||
highlighted.each do |element|
|
||||
extra ||= ids.delete(element[:id]).nil?
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue