forked from openshift/console
-
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.
- Loading branch information
1 parent
74b0498
commit 4e340c4
Showing
24 changed files
with
399 additions
and
108 deletions.
There are no files selected for viewing
52 changes: 0 additions & 52 deletions
52
.../packages/dev-console/integration-tests/features/gitops/add-Manifest-URL-ODC-3067.feature
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
...es/dev-console/integration-tests/features/gitops/install-GitOps-Operator-ODC-3067.feature
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
frontend/packages/dev-console/integration-tests/features/gitops/linkArgoCD.feature
This file was deleted.
Oops, something went wrong.
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
15 changes: 15 additions & 0 deletions
15
frontend/packages/gitops-plugin/integration-tests/.eslintrc
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,15 @@ | ||
{ | ||
"env": { | ||
"cypress/globals": true, | ||
"node": true | ||
}, | ||
"extends": ["../../.eslintrc", "plugin:cypress/recommended", "plugin:prettier/recommended"], | ||
"plugins": ["cypress"], | ||
"rules": { | ||
"no-console": "off", | ||
"no-namespace": "off", | ||
"no-redeclare": "off", | ||
"promise/catch-or-return": "off", | ||
"promise/no-nesting": "off" | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
frontend/packages/gitops-plugin/integration-tests/README.md
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,52 @@ | ||
# Getting Started | ||
|
||
- Guidelines related to Setup, Standards, Review process are present in [README.md](frontend/packages/dev-console/integration-tests/README.md) | ||
|
||
## Directory Structure | ||
|
||
Folder structure of cypress cucumber framework for gitops-plugin | ||
|
||
``` | ||
frontend/packages/gitops-plugin/integration-tests/ | ||
├── features | ||
| ├── gitops <--- gitOps gherkin scenarios | ||
| | └──add-manifest-url.feature | ||
| | └──linkArgoCD.feature | ||
| ├── BestPractices.md <--- Gherkin script standards | ||
├── plugins <--- Plugins provide a way to support and extend the behavior of cypress | ||
| | └── index.ts | ||
├── support <--- cypress cucumber support configurations | ||
| ├── commands <--- add commands to Cypress 'cy.' global, other support configurations | ||
| | └── index.ts | ||
| | └── app.ts <--- hooks are added in this file | ||
| ├── page-objects <--- helper objects | ||
| | └── environments-po.ts <--- helper objects related to gitops etc... | ||
| ├── constants <--- enums required for gitOps scripts | ||
| | | └──gitops.ts <--- environments page related text or messages or field names etc.. | ||
| ├── pages <--- page functions | ||
| | | environments-page.ts <--- environments page related text or messages or field names etc.. | ||
| | └── app.ts <--- Re-usable helper objects and page functions | ||
| ├── step-definitions <--- cucumber step implementations | ||
│ | ├── gitops <--- Re-usable gitOps step definitions | ||
| | | └──common.ts | ||
├── testData <--- Test data required for scripts and installation yaml files | ||
| ├── install-gitops-operator.yaml <--- GitOps installation yaml file | ||
├── cypress.json <--- cypress configuration file | ||
├── tsconfig.json <--- typescript configuration file | ||
├── reporter-config.json <--- reporter configuration file | ||
``` | ||
|
||
### Execution process | ||
|
||
Feature file - "regression" suite - execution from Cypress Dashboard | ||
|
||
1. Update the TAGS under env section in config file [Cypress.json file](frontend/packages/gitops-plugin/integration-tests/cypress.json) as | ||
"env": { "TAGS": "@regression and not @manual and not @to-do" } | ||
2. In command prompt, navigate to frontend folder | ||
3. Execute command `yarn run test-cypress-gitops` and select that particular file or run all files in cypress dashboard | ||
|
||
Feature file - "regression" suite - execution from command line | ||
|
||
1. Open the [frontend/package.json](../../../package.json) and update `test-cypress-gitops-headless` as per requirement | ||
2. In command line, navigate to frontend folder and execute the command `yarn run test-cypress-gitops-headless` | ||
3. All the regression scenarios get executed as per the configuration |
32 changes: 32 additions & 0 deletions
32
frontend/packages/gitops-plugin/integration-tests/cypress.json
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,32 @@ | ||
{ | ||
"integrationFolder": "features", | ||
"testFiles": "**/*.{feature,features}", | ||
"defaultCommandTimeout": 40000, | ||
"viewportWidth": 1920, | ||
"viewportHeight": 1080, | ||
"watchForFileChanges": true, | ||
"chromeWebSecurity": true, | ||
"waitForAnimation": true, | ||
"animationDistanceThreshold": 20, | ||
"execTimeout": 90000, | ||
"pageLoadTimeout": 90000, | ||
"requestTimeout": 15000, | ||
"responseTimeout": 15000, | ||
"supportFile": "support/commands/index.ts", | ||
"pluginsFile": "plugins/index.js", | ||
"fixturesFolder": "testData", | ||
"video": true, | ||
"reporter": "../../../node_modules/cypress-multi-reporters", | ||
"reporterOptions": { | ||
"configFile": "reporter-config.json" | ||
}, | ||
"screenshotsFolder": "../../../gui_test_screenshots/cypress/screenshots", | ||
"videosFolder": "../../../gui_test_screenshots/cypress/videos", | ||
"env": { | ||
"TAGS": "@gitOps and @smoke and not @manual and not @to-do" | ||
}, | ||
"retries": { | ||
"runMode": 1, | ||
"openMode": 0 | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
frontend/packages/gitops-plugin/integration-tests/features/BestPractices.md
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,3 @@ | ||
# Gherkin Scenarios designing Best Practices | ||
|
||
Follow the rules present in [BestPractices.md](frontend/packages/dev-console/integration-tests/features/BestPractices.md) |
50 changes: 50 additions & 0 deletions
50
frontend/packages/gitops-plugin/integration-tests/features/gitops/add-manifest-url.feature
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,50 @@ | ||
@gitOps | ||
Feature: Applications managed by GitOps and Create secret | ||
User should be able to see list of applications managed by GitOps | ||
|
||
|
||
Background: | ||
Given user has installed gitOps operator | ||
And user is at developer perspective | ||
|
||
|
||
@smoke | ||
Scenario: No GitOps Manifest URLs found | ||
When user navigates to Environments page | ||
Then user will see the message No GitOps manifest URLs found | ||
|
||
|
||
@regression @manual | ||
Scenario: Create Secret | ||
Given user has imported gitops repo | ||
When user creates the namespace in pattern of "pipelines-{username}-github" | ||
And user creates the secret in pattern of "{username}-github-token" | ||
And user navigates to Environments page | ||
Then user will see the list GitOps application groupings on the page | ||
|
||
|
||
@regression @manual | ||
Scenario: Application Details page for Applications | ||
Given user is on the Environments page | ||
And user can see the Applications on the page | ||
When user clicks on the application | ||
Then user can see the application Details page | ||
And user can see various environments for that application | ||
And user can see how many application or workloads are deployed in each environment | ||
And user can see status of the application or workloads | ||
|
||
|
||
# scenario is commented, as we don't need to add Manifest URLs manually now | ||
# @regression @manual | ||
# Scenario: Add Manifest URL and No Application groups found message | ||
# When user has created namespace "aut-addflow-catalog" | ||
# And user navigates to Search page | ||
# And user selects "Namespaces" on Resources dropdown | ||
# And user selects Namespace "aut-addflow-catalog" | ||
# And user clicks on YAML tab | ||
# And user adds annotation "app.openshift.io/vcs-uri" | ||
# And user adds the Manifest URL under annotation "app.openshift.io/vcs-uri" | ||
# And user saves the YAML | ||
# And user reloads the YAML to see the changes | ||
# And user navigates to Environments page | ||
# Then user will see No Application groups found message |
23 changes: 23 additions & 0 deletions
23
frontend/packages/gitops-plugin/integration-tests/features/gitops/linkArgoCD.feature
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,23 @@ | ||
@gitOps | ||
Feature: External Argo CD Link for Argo CD Dashboard | ||
As a developer, I want a way to navigate to Argo CD from the Deploy Stages page of the OpenShift console so that I can get insight on the sync status of my application. | ||
|
||
|
||
Background: | ||
Given user has installed gitOps operator | ||
And user is at administrator perspective | ||
|
||
|
||
@regression @manual | ||
Scenario: External link to the ArgoCD Dashboard | ||
Given user has logged in to cluster using CLI | ||
And user has created namespace "test-argocd" | ||
And user has imported a gitops repo using kam command to namespace "test-aregocd" | ||
Then user will see external link to the ArgoCD dashboard in Application Launcher | ||
And user will see external link to the ArgoCD dashboard on Environments page on DevConsole | ||
And user will see external link to the ArgoCD dashboard on each Environment on Environments page on DevConsole | ||
And user will see external link to the ArgoCD dashboard in Launcher card on Projects page | ||
And user will see external link to the ArgoCD dashboard in Launcher Section on Projects Details page | ||
|
||
#Follow below document for setup | ||
#https://docs.google.com/document/d/1JTvo51vJrLV-L10GTa7kTGYTOrB5OuyZ-zBIMU7eVfc/edit |
9 changes: 9 additions & 0 deletions
9
frontend/packages/gitops-plugin/integration-tests/package.json
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,9 @@ | ||
{ | ||
"name": "@gitops-plugin/integration-tests", | ||
"version": "0.0.1", | ||
"description": "GitOps Cypress tests", | ||
"private": true, | ||
"cypress-cucumber-preprocessor": { | ||
"step_definitions": "support/step-definitions/*/" | ||
} | ||
} |
Oops, something went wrong.