forked from stackrox/stackrox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ROX-21476: Fix title on browser tab for exception management (stackro…
- Loading branch information
Showing
8 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
ui/apps/platform/cypress/integration/vulnerabilities/exceptionManagement/general.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import withAuth from '../../../helpers/basicAuth'; | ||
import { hasFeatureFlag } from '../../../helpers/features'; | ||
import { getRegExpForTitleWithBranding } from '../../../helpers/title'; | ||
import { visit } from '../../../helpers/visit'; | ||
import { cancelAllCveExceptions } from '../workloadCves/WorkloadCves.helpers'; | ||
import { | ||
approvedDeferralsPath, | ||
approvedFalsePositivesPath, | ||
deferAndVisitRequestDetails, | ||
deniedRequestsPath, | ||
pendingRequestsPath, | ||
} from './ExceptionManagement.helpers'; | ||
|
||
describe('Exception Management', () => { | ||
withAuth(); | ||
|
||
before(function () { | ||
if ( | ||
!hasFeatureFlag('ROX_VULN_MGMT_WORKLOAD_CVES') || | ||
!hasFeatureFlag('ROX_VULN_MGMT_UNIFIED_CVE_DEFERRAL') || | ||
!hasFeatureFlag('ROX_WORKLOAD_CVES_FIXABILITY_FILTERS') | ||
) { | ||
this.skip(); | ||
} | ||
}); | ||
|
||
beforeEach(() => { | ||
if ( | ||
hasFeatureFlag('ROX_VULN_MGMT_WORKLOAD_CVES') && | ||
hasFeatureFlag('ROX_VULN_MGMT_UNIFIED_CVE_DEFERRAL') && | ||
hasFeatureFlag('ROX_WORKLOAD_CVES_FIXABILITY_FILTERS') | ||
) { | ||
cancelAllCveExceptions(); | ||
} | ||
}); | ||
|
||
after(() => { | ||
if ( | ||
hasFeatureFlag('ROX_VULN_MGMT_WORKLOAD_CVES') && | ||
hasFeatureFlag('ROX_VULN_MGMT_UNIFIED_CVE_DEFERRAL') && | ||
hasFeatureFlag('ROX_WORKLOAD_CVES_FIXABILITY_FILTERS') | ||
) { | ||
cancelAllCveExceptions(); | ||
} | ||
}); | ||
|
||
it('should have the correct browser title for pending requests', () => { | ||
visit(pendingRequestsPath); | ||
cy.title().should( | ||
'match', | ||
getRegExpForTitleWithBranding('Exception Management - Pending Requests') | ||
); | ||
}); | ||
|
||
it('should have the correct browser title for approved deferrals', () => { | ||
visit(approvedDeferralsPath); | ||
cy.title().should( | ||
'match', | ||
getRegExpForTitleWithBranding('Exception Management - Approved Deferrals') | ||
); | ||
}); | ||
|
||
it('should have the correct browser title for approved false positives', () => { | ||
visit(approvedFalsePositivesPath); | ||
cy.title().should( | ||
'match', | ||
getRegExpForTitleWithBranding('Exception Management - Approved False Positives') | ||
); | ||
}); | ||
|
||
it('should have the correct browser title for denied requests', () => { | ||
visit(deniedRequestsPath); | ||
cy.title().should( | ||
'match', | ||
getRegExpForTitleWithBranding('Exception Management - Denied Requests') | ||
); | ||
}); | ||
|
||
it('should have the correct browser title for request details', () => { | ||
const comment = 'Defer me'; | ||
const expiry = 'When all CVEs are fixable'; | ||
const scope = 'All images'; | ||
deferAndVisitRequestDetails({ | ||
comment, | ||
expiry, | ||
scope, | ||
}); | ||
cy.title().should( | ||
'match', | ||
getRegExpForTitleWithBranding('Exception Management - Request Details') | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters