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

pulibrary / pdc_discovery / d4e0f429-48ab-46c0-b837-27bacddd2a41

24 Apr 2024 06:43PM UTC coverage: 92.63% (-4.4%) from 97.039%
d4e0f429-48ab-46c0-b837-27bacddd2a41

Pull #614

circleci

leefaisonr
Remove firefox from ci

Co-authored-by: Bess Sadler <bess@users.noreply.github.com>
Pull Request #614: Remove firefox from ci

2878 of 3107 relevant lines covered (92.63%)

495.74 hits per line

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

43.75
/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('*:*')
3✔
6
    Blacklight.default_index.connection.commit
3✔
7
    Rails.configuration.pdc_discovery.index_pdc_describe = true
3✔
8
    pdc_files = Dir.entries(Rails.root.join("spec", "fixtures", "files", "pdc_describe_data", ""))
3✔
9
                   .reject { |name| [".", "..", "works.rss"].include?(name) }
210✔
10
    pdc_files.each do |name|
3✔
11
      stub_request(:get, "https://datacommons.princeton.edu/describe/works/#{name}")
201✔
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")
3✔
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")
3✔
17
    indexer.index
3✔
18
    page.driver.browser.manage.window.resize_to(4000, 4000)
3✔
19
  end
20

21
  it "renders expected fields" do
1✔
22
    visit '/?search_field=all_fields&q='
×
23
    click_on "Source"
×
24
    click_on "pdc_describe"
×
25
    expect(page).to have_content("3D full wave fast wave modeling with realistic HHFW antenna geometry and SOL plasma in NSTX-U")
×
26
    click_on "Community"
×
27
    click_link "Princeton Plasma Physics Laboratory"
×
28
    expect(page).to have_content("Subcommunity")
×
29
    click_on("Subcommunity")
×
30
    expect(page).to have_content("Stellarators")
×
31
    expect(page).to have_content("more")
×
32
    click_link("more")
×
33
    expect(page).to have_content("System Studies")
×
34
    click_on("System Studies")
×
35
    expect(page).to have_content("Fusion Pilot Plant performance and the role of a Sustained High Power Density tokamak")
×
36

37
    click_on "Year Published"
×
38
    expect(page).to have_content "View larger"
×
39
    expect(page).not_to have_content "[Missing]"
×
40
    expect(page).to have_content "2022\n2022"
×
41
  end
42
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