Skip to content

Commit

Permalink
Merge pull request #1446 from appknox/PD-1446-e-2-e-test-for-ignore-v…
Browse files Browse the repository at this point in the history
…ulnerability

E2e test for ignore vulnerability
  • Loading branch information
future-pirate-king authored Sep 6, 2024
2 parents 5064f9f + af1ae17 commit b40da04
Show file tree
Hide file tree
Showing 20 changed files with 1,128 additions and 23 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
containers: [1, 2]
containers: [1, 2, 3]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -59,6 +59,8 @@ jobs:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_TEST_PROJECT_ID }}
CYPRESS_DYNAMIC_SCAN_SYSTEM_APK_FILE_ID: ${{ vars.CYPRESS_DYNAMIC_SCAN_SYSTEM_APK_FILE_ID }}
CYPRESS_DYNAMIC_SCAN_SYSTEM_IPA_FILE_ID: ${{ vars.CYPRESS_DYNAMIC_SCAN_SYSTEM_IPA_FILE_ID }}
CYPRESS_IGNORE_VULNERABILITY_TEST_PACKAGE_NAME: ${{ vars.CYPRESS_IGNORE_VULNERABILITY_TEST_PACKAGE_NAME }}
CYPRESS_API_HOST: ${{ vars.CYPRESS_API_HOST }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
start: npm run startprod
Expand Down
9 changes: 8 additions & 1 deletion app/components/analysis-risk/override-edit-drawer/index.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<AkDrawer @open={{@open}} @onClose={{@onClose}} @anchor='right' as |dr|>
<AkDrawer
@open={{@open}}
@onClose={{@onClose}}
@anchor='right'
data-test-cy='editAnaysis-drawer'
as |dr|
>
<AkAppbar @justifyContent='space-between' class='px-3' as |ab|>
<AkStack @alignItems='center' @spacing='1'>
{{#if this.appBarData.onBackClick}}
Expand All @@ -22,6 +28,7 @@

<AkIconButton
data-test-analysisRisk-overrideEditDrawer-closeBtn
data-test-cy='overrideEditDrawer-closeBtn'
{{on 'click' dr.closeHandler}}
class={{ab.classes.defaultIconBtn}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
<AkDivider @color='dark' class='my-2' />

<div class='p-3'>
<AkStack @direction='column' @spacing='1'>
<AkStack
@direction='column'
@spacing='1'
data-test-cy='overrideEditDrawer-overrideDetails-overriddenRiskInfo'
>
<AkTypography
data-test-analysisRisk-overrideEditDrawer-overrideDetails-overriddenAsTitle
@variant='subtitle1'
Expand Down Expand Up @@ -52,7 +56,11 @@

<AkDivider @color='dark' class='my-2' />

<AkStack @direction='column' @spacing='1'>
<AkStack
@direction='column'
@spacing='1'
data-test-cy='overrideEditDrawer-overrideDetails-auditDetails'
>
{{#each this.overrideAuditDetails as |oad|}}
<AkStack
data-test-analysisRisk-overrideEditDrawer-overrideDetails-auditDetails='{{oad.label}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
>
<AnalysisRisk::Text
data-test-analysisRisk-overrideEditDrawer-overrideForm-successOriginalRisk
data-test-cy='overrideEditDrawer-overrideForm-successOriginalRisk'
@risk={{@dataModel.risk}}
@fontWeight='medium'
/>
Expand All @@ -38,10 +39,12 @@
@color='textSecondary'
@iconName='east'
data-test-analysisRisk-overrideEditDrawer-overrideForm-successFromToRiskIcon
data-test-cy='overrideEditDrawer-overrideForm-successFromToRiskIcon'
/>

<AnalysisRisk::Text
data-test-analysisRisk-overrideEditDrawer-overrideForm-successOverriddenRisk
data-test-cy='overrideEditDrawer-overrideForm-successOverriddenRisk'
@risk={{@dataModel.overriddenRisk}}
@fontWeight='medium'
/>
Expand Down Expand Up @@ -70,6 +73,7 @@
<AkSelect
{{style width='180px'}}
data-test-analysisRisk-overrideEditDrawer-overrideForm-overrideToSelect
data-test-cy='overrideEditDrawer-overrideForm-overrideToSelect'
@options={{this.filteredRisks}}
@selected={{this.selectedRiskToOverride}}
@onChange={{this.handleOverrideRiskChange}}
Expand All @@ -93,6 +97,7 @@
<AkSelect
{{style width='160px'}}
data-test-analysisRisk-overrideEditDrawer-overrideForm-criteriaSelect
data-test-cy='overrideEditDrawer-overrideForm-criteriaSelect'
@options={{this.overrideRiskForOptions}}
@selected={{this.selectedOverrideCriteria}}
@onChange={{this.handleOverrideCriteriaChange}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
@originalRisk={{@dataModel.risk}}
@disableOverriddenTooltip={{this.disableOverriddenTooltip}}
data-test-analysisRisk-overrideEditDrawer-vulnerabilityRiskTag
data-test-cy='overrideEditDrawer-vulnerabilityRiskTag'
/>
{{/if}}
</AkStack>
1 change: 1 addition & 0 deletions app/components/file-chart/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
@iconName='drive-file-rename-outline'
@color='secondary'
data-test-fileChartSeverityLevel-ignoreVulnerabilityIcon
data-test-cy='fileChartSeverityLevel-ignoreVulnerabilityIcon'
/>
</:default>
</AkTooltip>
Expand Down
1 change: 1 addition & 0 deletions app/components/file-details/summary-old/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{{on 'click' this.handleFileMoreMenuOpen}}
@variant='outlined'
data-test-fileDetailsSummary-moreMenuBtn
aria-label='file summary more button'
>
<AkIcon @iconName='more-vert' />
</AkIconButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
}}
>
<AkIconButton
aria-label='edit analysis button'
@variant='outlined'
{{on 'click' this.openEditAnalysisDrawer}}
data-test-analysisDetails-editAnalysisBtn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div local-class='analysis-details-root' data-test-analysis-details-container>
<header
data-test-cy='analysisDetails-header'
data-test-analysisDetails-header
local-class='analysis-details-header'
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
<b.row
{{style cursor='pointer'}}
@onClick={{this.handleAnalysisClick}}
data-test-cy='file-analysis-{{b.rowValue.id}}'
data-test='file-analysis-computedRisk-{{b.rowValue.computedRisk}}'
data-test-file-analysis-isOverriddenAsPassed='{{b.rowValue.isOverriddenAsPassed}}'
data-test-vulnerability-analysis-row
as |r|
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@variant='outlined'
@size='small'
{{on 'click' (fn @setVulnerabilityDataModel @vulnerabilityPreference)}}
aria-label='vulnerability preference action'
data-test-prjSettings-analysisSettings-vulnPreferenceItem-action
>
{{#if @vulnerabilityPreference.riskOverridden}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<t.body @rows={{this.vulnerabilityPreferences}} as |b|>
<b.row
data-test-prjSettings-analysisSettings-vulnPreference-list-row
data-test-cy='vulnPreference-item-{{b.rowValue.id}}'
as |r|
>
<r.cell
Expand Down
Loading

0 comments on commit b40da04

Please sign in to comment.