• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / pdc_discovery / d736ff91-d543-4530-a84d-5d91200b6783

03 Nov 2023 05:30PM UTC coverage: 93.662% (-3.3%) from 96.965%
d736ff91-d543-4530-a84d-5d91200b6783

push

circleci

jrgriffiniii
wip

10 of 11 new or added lines in 1 file covered. (90.91%)

91 existing lines in 15 files now uncovered.

2601 of 2777 relevant lines covered (93.66%)

178.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
/spec/system/search_pdc_results_page_spec.rb
1
# frozen_string_literal: true
2

3
describe 'Search Results PDC Page', type: :system, js: true do
1✔
4
  before do
1✔
5
    Blacklight.default_index.connection.delete_by_query('*:*')
1✔
6
    Blacklight.default_index.connection.commit
1✔
7
    Rails.configuration.pdc_discovery.index_pdc_describe = true
1✔
8
    pdc_files = Dir.entries(Rails.root.join("spec", "fixtures", "files", "pdc_describe_data", ""))
1✔
9
                   .reject { |name| [".", "..", "works.rss"].include?(name) }
70✔
10
    pdc_files.each do |name|
1✔
11
      stub_request(:get, "https://datacommons.princeton.edu/describe/works/#{name}")
67✔
12
        .to_return(status: 200, body: File.open(Rails.root.join("spec/fixtures/files/pdc_describe_data/#{name}")).read, headers: {})
13
    end
14
    stub_request(:get, "http://pdc_test_data/works.rss")
1✔
15
      .to_return(status: 200, body: File.open(Rails.root.join("spec", "fixtures", "files", "pdc_describe_data", "works.rss")).read, headers: {})
16
    indexer = DescribeIndexer.new(rss_url: "http://pdc_test_data/works.rss")
1✔
17
    indexer.index
1✔
18
    page.driver.browser.manage.window.resize_to(4000, 4000)
1✔
19
  end
20

21
  it "renders expected fields" do
1✔
22
    visit '/?search_field=all_fields&q='
1✔
23
    click_on "Source"
1✔
UNCOV
24
    click_on "pdc_describe"
×
UNCOV
25
    expect(page).to have_content("3D full wave fast wave modeling with realistic HHFW antenna geometry and SOL plasma in NSTX-U")
×
UNCOV
26
    click_on "Community"
×
UNCOV
27
    click_link "Princeton Plasma Physics Laboratory"
×
UNCOV
28
    expect(page).to have_content("Subcommunity")
×
UNCOV
29
    click_on("Subcommunity")
×
UNCOV
30
    expect(page).to have_content("Stellarators")
×
UNCOV
31
    expect(page).to have_content("more")
×
UNCOV
32
    click_link("more")
×
UNCOV
33
    expect(page).to have_content("System Studies")
×
UNCOV
34
    click_on("System Studies")
×
UNCOV
35
    expect(page).to have_content("Fusion Pilot Plant performance and the role of a Sustained High Power Density tokamak")
×
36
  end
37
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc