Skip to content

Commit

Permalink
Updated cypress config for the upgrade (#13239)
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Cai <[email protected]>
  • Loading branch information
ciiay authored Oct 17, 2023
1 parent 3bdf252 commit b7629f5
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 33 deletions.
6 changes: 3 additions & 3 deletions frontend/packages/gitops-plugin/integration-tests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Getting Started

- Guidelines related to Setup, Standards, Review process are present in [README.md](frontend/packages/dev-console/integration-tests/README.md)
- Guidelines related to Setup, Standards, Review process are present in [README.md](../../dev-console/integration-tests/README.md)

## Directory Structure

Expand Down Expand Up @@ -31,7 +31,7 @@ frontend/packages/gitops-plugin/integration-tests/
| | | └──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
├── cypress.config.js <--- cypress configuration file
├── tsconfig.json <--- typescript configuration file
├── reporter-config.json <--- reporter configuration file
```
Expand All @@ -40,7 +40,7 @@ frontend/packages/gitops-plugin/integration-tests/

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
1. Update the TAGS under env section in config file [Cypress.config.js file](frontend/packages/gitops-plugin/integration-tests/cypress.config.js) 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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
projectId: "j4jxoy",
viewportWidth: 1920,
viewportHeight: 1080,
defaultCommandTimeout: 40000,
execTimeout: 90000,
pageLoadTimeout: 90000,
requestTimeout: 15000,
responseTimeout: 15000,
animationDistanceThreshold: 20,
screenshotsFolder: "../../../gui_test_screenshots/cypress/screenshots",
videosFolder: "../../../gui_test_screenshots/cypress/videos",
video: true,
reporter: "../../node_modules/cypress-multi-reporters",

reporterOptions: {
configFile: "reporter-config.json",
},

fixturesFolder: "testData",
defaultCommandTimeout: 40000,

retries: {
runMode: 1,
openMode: 0,
},

env: {
TAGS: "@gitOps and @smoke and not (@manual or @to-do or @un-verified)",
NAMESPACE: "aut-gitops",
},

e2e: {
// TODO: see https://issues.redhat.com/browse/CONSOLE-3781
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
// eslint-disable-next-line global-require
return require("../../dev-console/integration-tests/plugins/index.js")(
on,
config
);
},
specPattern: "**/*.{feature,features}",
supportFile: "support/commands/index.ts",
baseUrl: "http://localhost:9000",
testIsolation: false,
},
});
29 changes: 0 additions & 29 deletions frontend/packages/gitops-plugin/integration-tests/cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Gherkin Scenarios designing Best Practices

Follow the rules present in [BestPractices.md](frontend/packages/dev-console/integration-tests/features/BestPractices.md)
Follow the rules present in [BestPractices.md](../../../dev-console/integration-tests/features/BestPractices.md)

0 comments on commit b7629f5

Please sign in to comment.