Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix xpath and add stubbed mappings manager in specs #62

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aapomm
Copy link
Contributor

@aapomm aapomm commented Aug 14, 2024

Summary

The HTML importer is associating the issues in the first discovered node. This is happening because of the xpath we're using in the HTML importer:

html_evidence.xpath("//td[starts-with(.,'Host:')]").first

//td... will start a global search from the top level. We're calling #first afterwards so the first node in the document will always be selected.

Proposed solution
Use .//td... instead

Note that the PR also includes the following spec changes:

  • Split the importer specs
  • Stub the mappings manager service

Check List

  • Added a CHANGELOG entry
  • Added specs

CHANGELOG.md Outdated Show resolved Hide resolved
spec/spec_helper.rb Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants