Skip to content

Commit

Permalink
Updated the test cases to use keywords more in accordance with the do…
Browse files Browse the repository at this point in the history
…cumentation.
  • Loading branch information
vobratil committed Jan 15, 2025
1 parent f4c5100 commit e85ba2f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 22 deletions.
32 changes: 20 additions & 12 deletions tests/features/advisory-explorer.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,51 @@ Background:

# Advisory Explorer
Scenario: Display an overview of all advisories
Given User has navigated to the Advisory Explorer page
Given User is on the Home page
When User navigates to the Advisory Explorer page
Then The ID and Title of each advisory is visible on each row
And "Show more" button is visible for advisories with a long title
And Advisory metadata (Severity, Revision, Vulnerabilites) is visible on each row
And A context menu icon is visible on each row

Scenario: Download an advisory from the Advisory Explorer page
Given User has navigated to the Advisory Explorer page
And User has clicked the Download button in the context menu of an advisory
Given User is on the Home page
When User navigates to the Advisory Explorer page
And User clicks the Download button in the context menu of an advisory
Then The advisory should download as a JSON file

# Advisory Overview
Scenario: Display detailed information about a single advisory
Given User has selected an advisory on the Advisory Explorer page
Given User is on the Home page
When User navigates to the Advisory Explorer page
And User selects an advisory on the Advisory Explorer page
Then The Overview, Publisher, Tracking, References and Product Info panels should display
And The Product Info panel should display a list of impacted products
And The Product Info panel items should be collapsable

# Advisory Notes
Scenario: Display notes about a single advisory
Given User has selected an advisory on the Advisory Explorer page
And User has navigated to the Notes tab on the Advisory Overview page
Given User is on the Home page
When User navigates to the Advisory Explorer page
And User selects an advisory on the Advisory Explorer page
And User navigates to the Notes tab on the Advisory Overview page
Then All notes on an advisory should display

# Advisory Vulnerabilities
Scenario: Display vulnerabilities tied to a single advisory
Given User has selected an advisory on the Advisory Explorer page
And User has navigated to the Vulnerabilites tab on the Advisory Overview page
Then A list of all vulnerabilites tied to the advisory should display
Given User is on the Home page
When User selects an advisory on the Advisory Explorer page
And User navigates to the Vulnerabilites tab on the Advisory Overview page
Then A list of all active vulnerabilites tied to the advisory should display
And The ID, Title, Discovery, Release, Score and CWE information should be visible for each vulnerability
And The vulnerabilities should be sorted by ID by default
And Each vulnerability should be expandable

Scenario: Display detailed information about a single vulnerability tied to a single advisory
Given User has selected an advisory on the Advisory Explorer page
And User has navigated to the Vulnerabilites tab on the Advisory Overview page
And User has expanded the row of a selected vulnerability
Given User is on the Home page
When User selects an advisory on the Advisory Explorer page
And User navigates to the Vulnerabilites tab on the Advisory Overview page
And User expands the row of a selected vulnerability
Then A list of all affected products, separated by status, should display
And Each fixed product should display a link to a remediation
And All notes on a vulnerability should be displayed underneath the list of products
25 changes: 15 additions & 10 deletions tests/features/vulnerability-explorer.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,40 @@ Background:

# Vulnerabilities Explorer
Scenario: Display an overview of all vulnerabilities
Given User has navigated to the Vulnerabilities Explorer page
Given User is on the Home page
When User navigates to the Vulnerabilities Explorer page
Then The ID and Title of each vulnerability is visible on each row
And "Show more" button is visible for vulnerabilities with a long title
And Advisory metadata (CVSS, Date published, Related documents) is visible on each row
And A context menu icon is visible on each row

# This is how it's described in the User Stories document, but no such button actually appears in either the screenshot or the Trustify app
Scenario: Download a vulnerability CVE from the Vulnerability Explorer page
Given User has navigated to the Vulnerabilities Explorer page
And User has clicked the Download button in the context menu of a vulnerability
Given User is on the Home page
When User navigates to the Vulnerabilities Explorer page
And User clicks the Download button in the context menu of a vulnerability
Then The vulnerability CVE should download as a JSON file

# Vulnerability-related Products
Scenario: Display a list of products related to a single vulnerability
Given User has navigated to the Vulnerabilities Explorer page
And User has selected a vulnerability
Given User is on the Home page
When User navigates to the Vulnerabilities Explorer page
And User selects a vulnerability
Then The Name, Version, Status, Dependencies, Supplier and Created On data is visible for each product
And The name of each product should be a link to the overview of a corresponding SBOM Overview page
And The dependencies column should be expandable

Scenario: Display a list of dependencies of a product related to a single vulnerability
Given User has navigated to the Vulnerabilities Explorer page
And User has selected a vulnerability
And User has clicked on the Dependencies column of a product
Given User is on the Home page
When User navigates to the Vulnerabilities Explorer page
And User selects a vulnerability
And User clicks on the Dependencies column of a product
Then The Type, Namespace, Name, Version, Path, Qualifiers and Dependency tree position data should display for each dependency

# Vulnerability-related Advisories
Scenario: Display advisories tied to a single vulnerability
Given User has navigated to the Vulnerabilities Explorer page
And User has navigated to the Related Advisories tab
Given User is on the Home page
When User navigates to the Vulnerabilities Explorer page
And User then navigates to the Related Advisories tab
Then The ID, Title, Aggregated severity, Revision and Vulnerabilities data should display for each advisory tied to the vulnerability
And The ID should be a link a corresponding Advisory Overview page

0 comments on commit e85ba2f

Please sign in to comment.