|
| 1 | + |
| 2 | +Feature: License Explorer |
| 3 | + As a Platform Eng |
| 4 | + I want to be able to download the licenses in a CSV file format from a specific SBOM |
| 5 | + |
| 6 | +Background: |
| 7 | + Given User is on TPA Application |
| 8 | + And User has successfully uploaded a SPDX SBOM from Upload SBOM page |
| 9 | + And Uploaded SPDX SBOM appears on Search List page under SBOMs tab |
| 10 | + |
| 11 | +Scenario: Verify Download Licences option on SBOM Search Results page for SPDX SBOM |
| 12 | + Given User Searches for SPDX SBOM using Search Text box and Navigates to Search results page |
| 13 | + When User Selects SPDX SBOM of interest from the Search Results |
| 14 | + And User Clicks "Action" button |
| 15 | + Then "Download Licences" Option should be visible |
| 16 | + |
| 17 | +Scenario: User Downloads license information for SPDX SBOM from SBOM Search Results page |
| 18 | + Given User Searches for SPDX SBOM using Search Text box and Navigates to Search results page |
| 19 | + When User Selects SPDX SBOM of interest from the Search Results |
| 20 | + And User Clicks "Action" button |
| 21 | + And Selects "Download Licences" option |
| 22 | + Then Licenses associated with the SBOM should be downloaded in ZIP format using the SBOM name |
| 23 | + |
| 24 | +Scenario: Verify Download Licences option on SBOM Explorer page for SPDX SBOM |
| 25 | + Given User Searches for SPDX SBOM using Search Text box and Navigates to Search results page |
| 26 | + When User Selects SPDX SBOM of interest from the Search Results |
| 27 | + And User Clicks on SBOM name hyperlink from the Search Results |
| 28 | + Then Application Navigates to SBOM Explorer page |
| 29 | + And "Download Licences" Option should be visible |
| 30 | + |
| 31 | +Scenario: User Downloads license information for SPDX SBOM from SBOM Explorer page |
| 32 | + Given User is on SBOM Explorer page for the SPDX SBOM |
| 33 | + And User Clicks on "Download Licences" button |
| 34 | + Then Licenses associated with the SBOM should be downloaded in ZIP format using the SBOM name |
| 35 | + |
| 36 | +Scenario: Verify the files on downloaded SPDX SBOM license ZIP |
| 37 | + Given User has Downloaded the License information for SPDX SBOM |
| 38 | + When User extracts the Downloaded license ZIP file |
| 39 | + Then Extracted files should contain two CSVs, one for Package License combination and another one for License reference |
| 40 | + |
| 41 | +Scenario: Verify the headers on SPDX SBOM package License CSV file |
| 42 | + Given User extracted the SPDX SBOM license compressed file |
| 43 | + When User Opens the package license combination file |
| 44 | + Then The file should have the following headers - name, namespace, group, version, package, reference license,license name and alternate package reference |
| 45 | + |
| 46 | +Scenario: Verify the headers on SPDX SBOM License reference CSV file |
| 47 | + Given User extracted the SPDX SBOM license compressed file |
| 48 | + When User Opens the license reference file |
| 49 | + Then The file should have the following headers - licenseId, name, extracted text and comment |
| 50 | + |
| 51 | +Scenario: Verify the license information for a package with single license |
| 52 | + Given User is on package license combination file |
| 53 | + When User selects a package with Single license information |
| 54 | + Then name column should contain the value of name field from SBOM json |
| 55 | + And namespace column should contain the value of documentNamespace field from SBOM json |
| 56 | + And group column should be empty |
| 57 | + And version column should be empty |
| 58 | + And package reference column should contain the value of packages.externalRefs.referenceLocator field for purl referenceType from SBOM json |
| 59 | + And license column should contain the value of packages.licenseDeclared field from SBOM json |
| 60 | + And license name column should be populated in reference to license reference CSV file |
| 61 | + And alternate package reference column should contain the arrays of values of packages.externalRefs.referenceLocator field for referenceType other than purl |
| 62 | + |
| 63 | +Scenario: Verify the license information for a package with multiple licenses |
| 64 | + Given User is on package license combination file |
| 65 | + When User selects a package with multiple license information |
| 66 | + Then Package should have Rows equivalent to number of licenses |
| 67 | + And All the package rows should be loaded with identical values for the columns name, namespace, group, version, package |
| 68 | + And License column should be loaded with the unique licenses of the package from SBOM json |
| 69 | + |
| 70 | +Scenario: Verify the contents on SPDX SBOM license reference CSV file |
| 71 | + Given User is on license reference file |
| 72 | + When User selects a license from the list of licenses |
| 73 | + Then The unique values of licenceDeclared field from SPDX SBOM file should be listed |
| 74 | + And licenseId column should be loaded with unique license id |
| 75 | + And license column should be loaded with the name of the license |
| 76 | + And extracted text and comment columns should be loaded in reference to the template file |
0 commit comments