-
Notifications
You must be signed in to change notification settings - Fork 5
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
FI-2609 : DSL Link Methods #521
Conversation
Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #521 +/- ##
==========================================
+ Coverage 84.00% 84.04% +0.03%
==========================================
Files 260 261 +1
Lines 11361 11385 +24
Branches 1252 1253 +1
==========================================
+ Hits 9544 9568 +24
Misses 1807 1807
Partials 10 10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
lib/inferno/dsl/links.rb
Outdated
|
||
# @private | ||
def add_predefined_link(type, url) | ||
label = DEFAULT_TYPES[type] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should allow the default labels to be overridden. For example, a suite might want to link to multiple IGs.
lib/inferno/dsl/links.rb
Outdated
# | ||
# @param url [String] The URL to the source code repository. | ||
# @return [Array<Hash>] The updated array of links. | ||
def source_code(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these methods should have _url
at the end.
} | ||
] | ||
source_code 'https://github.com/inferno-framework/inferno-core' | ||
report_issue 'https://github.com/inferno-framework/inferno-core/issues' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should go ahead and include all of the defined link types here.
…o be overriden Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
@@ -561,6 +561,17 @@ definitions: | |||
type: "string" | |||
input_instructions: | |||
type: "string" | |||
links: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a unit test verifying that these actually appear in the JSON api as described here.
Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
Summary
This PR introduces new methods to streamline the addition of common link types. These methods simplify the process for test writers, allowing them to easily add predefined link types with minimal effort.
Key Changes:
report_issue_url
: Adds a link for reporting issues.source_code_url
: Adds a link to the source code repository.download_url
: Adds a link to download the latest release version of the test kit.ig_url
: Adds a link to the implementation guide.Testing Guidance
Demo suite was updated to use the new methods.