-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
2,004 additions
and
138 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: E2E Test | ||
on: | ||
push: | ||
branches: | ||
- cypress-experiment | ||
- develop | ||
- main | ||
- master | ||
|
||
pull_request: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
e2e-tests: | ||
runs-on: [ubuntu-latest] | ||
concurrency: | ||
group: ${{ github.workflow }}-ci-${{ github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
deployments: write | ||
name: Run E2E Tests | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run build | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v5 | ||
env: | ||
CYPRESS_TEST_USERNAME: ${{ secrets.CYPRESS_TEST_USERNAME}} | ||
CYPRESS_TEST_PASSWORD: ${{ secrets.CYPRESS_TEST_PASSWORD }} | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_TEST_RECORD_ID}} | ||
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_TEST_PROJECT_ID }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
install: false | ||
config: pageLoadTimeout=100000 | ||
record: true | ||
parallel: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<ImgLogo></ImgLogo> | ||
<ImgLogo id='login-logo-img' /> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { defineConfig } from 'cypress'; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
projectId: 'fkj9f2', | ||
baseUrl: 'http://localhost:4200/', | ||
specPattern: ['cypress/e2e/**/*.spec.{js,ts}'], | ||
viewportHeight: 1070, | ||
viewportWidth: 1480, | ||
env: { | ||
hideCredentials: true, | ||
TEST_USERNAME: '***', | ||
TEST_PASSWORD: '***', | ||
}, | ||
setupNodeEvents(on, config) {}, | ||
}, | ||
}); |
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,76 @@ | ||
// Add Cypress types | ||
declare namespace Cypress { | ||
/** | ||
* ================================== | ||
* IRENE SPECIFIC INTERFACES | ||
* ================================== | ||
*/ | ||
|
||
export interface FrontendConfig { | ||
name: string; | ||
hide_poweredby_logo: boolean; | ||
url: string; | ||
registration_enabled: boolean; | ||
registration_link: string; | ||
integrations: Integrations; | ||
images: Images; | ||
theme: Theme; | ||
} | ||
|
||
export interface Images { | ||
logo_on_darkbg: string; | ||
logo_on_lightbg: string; | ||
favicon: string; | ||
} | ||
|
||
export interface Integrations { | ||
crisp_key: string; | ||
hotjar_key: string; | ||
pendo_key: string; | ||
csb_key: string; | ||
rollbar_key: string; | ||
freshdesk_configuration: FreshdeskConfiguration; | ||
} | ||
|
||
export interface FreshdeskConfiguration { | ||
widget_id: string; | ||
} | ||
|
||
export interface Theme { | ||
scheme: string; | ||
primary_color: string; | ||
primary_alt_color: string; | ||
secondary_color: string; | ||
secondary_alt_color: string; | ||
} | ||
|
||
interface ServerConfig { | ||
websocket: string; | ||
enterprise: boolean; | ||
url_upload_allowed: boolean; | ||
} | ||
|
||
/** | ||
* ================================== | ||
* CUSTOM CYPRESS COMMANDS | ||
* ================================== | ||
*/ | ||
type modelFactoriesName = 'vulnerabilities' | 'projects'; | ||
|
||
interface Chainable { | ||
loginByCredentials(username: string, password: string): Chainable; | ||
|
||
generateModelFixture: ( | ||
name: modelFactoriesName, | ||
size?: number | ||
) => Chainable; | ||
|
||
loadAppConfig(data?: { | ||
frontendConfig?: FrontendConfig; | ||
serverConfig?: ServerConfig; | ||
}): Chainable; | ||
|
||
loadMockAppConfig(): Chainable; | ||
loadMockHudsonProjects(): Chainable; | ||
} | ||
} |
Oops, something went wrong.