Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONSOLE-2426: Cypress & Protractor: Optimized shell and yarn scripts #7053

Conversation

dtaylor113
Copy link
Contributor

@dtaylor113 dtaylor113 commented Oct 30, 2020

This PR dramatically enhances the test-cypress.sh script to allow running Cypress tests in different 'packages' (console, olm, and devconsole); running the Test Runner UI or in -- headless mode, as well as specifing --spec mask/glob for test files.

This PR also updates the test-gui.. shell script and yarn scritps to test-protractor.. for clarity.

test-cypres.sh enhancements

Waiting on #6776 to merge in order to use "test-cypress-devconsole" & "test-cypress-devconsole-headless" yarn scripts.

console>./test-cypress.sh

Runs Cypress tests in Test Runner or headless mode
Usage: test-cypress [-p] <package> [-s] <filemask> [-h true]
  '-p <package>' may be 'console, 'olm' or 'devconsole'
  '-s <specmask>' is a file mask for spec test files, such as 'tests/monitoring/*'. Used only in headless mode when '-p' is specified.
  '-h true' runs Cypress in headless mode. When omitted, launches Cypress Test Runner
Examples:
  test-cypress.sh                                       // displays this help text
  test-cypress.sh -p console                            // opens Cypress Test Runner for console tests
  test-cypress.sh -p olm                                // opens Cypress Test Runner for OLM tests
  test-cypress.sh -h true                               // runs all packages in headless mode
  test-cypress.sh -p olm -h true                        // runs OLM tests in headless mode
  test-cypress.sh -p console -s 'tests/crud/*' -h true  // runs console CRUD tests in headless mode

JIRA Story: https://issues.redhat.com/browse/CONSOLE-2426

test-gui.. changes

test-gui.sh -> test-protractor.sh

package.json:
-    "test-gui-tap": "TAP=true yarn test-gui",
-    "test-gui-openshift": "yarn test-suite --suite crud --params.openshift true",
-    "test-gui": "yarn test-suite --suite all",
-    "test-suite": "yarn ts-node ./node_modules/.bin/protractor integration-tests/protractor.conf.ts",
-    "debug-test-suite": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' node -r ts-node/register...    
+    "test-protractor-tap": "TAP=true yarn test-protractor",
+    "test-protractor-openshift": "yarn test-protractor-suite --suite crud --params.openshift true",
+    "test-protractor": "yarn test-protractor-suite --suite all",
+    "test-protractor-suite": "yarn ts-node ./node_modules/.bin/protractor integration-tests/protractor.conf.ts",
+    "debug-protractor-suite": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' node -r ts-node/register --in

*README.md file updated accordingly

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 30, 2020
@dtaylor113
Copy link
Contributor Author

/retest

@openshift-ci-robot openshift-ci-robot added the component/olm Related to OLM label Oct 30, 2020
@dtaylor113 dtaylor113 changed the title [WIP] Cypress: Optimized scripts [WIP] Cypress & Protractor: Optimized shell and yarn scripts Oct 30, 2020
@dtaylor113
Copy link
Contributor Author

/retest

1 similar comment
@spadgett
Copy link
Member

spadgett commented Nov 2, 2020

/retest

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 2, 2020
@dtaylor113 dtaylor113 changed the title [WIP] Cypress & Protractor: Optimized shell and yarn scripts Cypress & Protractor: Optimized shell and yarn scripts Nov 2, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 2, 2020
@dtaylor113 dtaylor113 changed the title Cypress & Protractor: Optimized shell and yarn scripts [WIP] Cypress & Protractor: Optimized shell and yarn scripts Nov 2, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 2, 2020
@spadgett spadgett changed the title [WIP] Cypress & Protractor: Optimized shell and yarn scripts [WIP] CONSOLE-2426: Cypress & Protractor: Optimized shell and yarn scripts Nov 2, 2020
@dtaylor113 dtaylor113 changed the title [WIP] CONSOLE-2426: Cypress & Protractor: Optimized shell and yarn scripts CONSOLE-2426: Cypress & Protractor: Optimized shell and yarn scripts Nov 2, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 2, 2020
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 2, 2020
@openshift openshift deleted a comment from openshift-bot Nov 2, 2020
Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 2, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtaylor113, spadgett

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 242d2f4 into openshift:master Nov 2, 2020
@spadgett spadgett added this to the v4.7 milestone Nov 4, 2020
@dtaylor113 dtaylor113 deleted the optimize-cypress-yarn-scripts branch November 25, 2020 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/olm Related to OLM lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants