Sha256: 3d90e7e4dd6fd9aa4eefc2ccef5ad97f42bd90d97e6eaa3cb8efff55c03ff4c3

Contents?: true

Size: 1.54 KB

Versions: 50

Compression:

Stored size: 1.54 KB

Contents

module GroupHelpers
  def available_groups
    all("#content .file_list_container")
  end

  def available_source_files
    all(".source_files .source_table")
  end
end
World(GroupHelpers)

Then /^I should see the groups:$/ do |table|
  expected_groups = table.hashes
  # Given group names should be the same number than those rendered in report
  expect(expected_groups.count).to eq(available_groups.count)

  # Verify each of the expected groups has a file list container and corresponding title and coverage number
  # as well as the correct number of links to files.
  expected_groups.each do |group|
    with_scope "#content ##{group['name'].gsub(/[^a-z]/i, '')}.file_list_container" do
      file_count_in_group = page.all("a.src_link").count
      expect(file_count_in_group).to eq(group["files"].to_i)

      with_scope "h2" do
        expect(page).to have_content(group["name"])
        expect(page).to have_content(group["coverage"])
      end
    end
  end
end

Then /^I should see the source files:$/ do |table|
  expected_files = table.hashes
  expect(expected_files.length).to eq(available_source_files.count)

  # Find all filenames and their coverage present in coverage report
  files = available_source_files.map { |f| {"name" => f.find("h3").text, "coverage" => f.find("h4 > span").text} }

  expect(files.sort_by { |hsh| hsh["name"] }).to eq(expected_files.sort_by { |hsh| hsh["name"] })
end

Then /^there should be (\d+) skipped lines in the source files$/ do |expected_count|
  expect(all(".source_table ol li.skipped").count).to eq(expected_count.to_i)
end

Version data entries

50 entries across 50 versions & 14 rubygems

Version Path
dirwatch-0.0.9 vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/step_definitions/html_steps.rb
dirwatch-0.0.8 vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/step_definitions/html_steps.rb
tdiary-5.0.9 vendor/bundle/gems/simplecov-0.14.1/features/step_definitions/html_steps.rb
dirwatch-0.0.6 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/features/step_definitions/html_steps.rb
dirwatch-0.0.5 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/features/step_definitions/html_steps.rb
dirwatch-0.0.4 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/features/step_definitions/html_steps.rb
dirwatch-0.0.3 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/features/step_definitions/html_steps.rb
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/features/step_definitions/html_steps.rb
simplecov-0.15.1 features/step_definitions/html_steps.rb
simplecov-0.15.0 features/step_definitions/html_steps.rb
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/simplecov-0.14.1/features/step_definitions/html_steps.rb
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/simplecov-0.14.1/features/step_definitions/html_steps.rb
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/simplecov-0.14.1/features/step_definitions/html_steps.rb
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/simplecov-0.14.1/features/step_definitions/html_steps.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/simplecov-0.14.1/features/step_definitions/html_steps.rb
simplecov-patched-0.14.3 features/step_definitions/html_steps.rb
simplecov-patched-0.14.2 features/step_definitions/html_steps.rb
simplecov-0.14.1 features/step_definitions/html_steps.rb
simplecov-0.14.0 features/step_definitions/html_steps.rb
simplecov-0.13.0 features/step_definitions/html_steps.rb