fix e2e tests for helix-front#2144
Conversation
|
@somecodemonkey this PR is ready for your review. Thanks for sharing your frontend expertise! |
| }, | ||
| "test": { | ||
| "builder": "@angular-devkit/build-angular:karma", | ||
| "builder": "@angular-builders/jest:run", |
There was a problem hiding this comment.
I followed this guide to migrate, adjusting the paths to helix-front's existing paths along the way.
| .subscribe( | ||
| result => { | ||
| _.forEach(result, (resource) => { | ||
| lodashForEach(result, (resource) => { |
There was a problem hiding this comment.
A workaround for this TypeScript related error: https://stackoverflow.com/q/49256040/1732222
A secondary benefit of this approach is new contributors will be less likely to confuse lodash's forEach with the native TypeScript Array.forEach().
| "target": "es2015", | ||
| "skipLibCheck": true, | ||
| "esModuleInterop": true, | ||
| "allowSyntheticDefaultImports": true, |
There was a problem hiding this comment.
These two options are the other part of the solution to https://stackoverflow.com/q/49256040/1732222
micahstubbs
left a comment
There was a problem hiding this comment.
Self-review complete. I left some comments for other reviewers. LGTM.
…than root tsconfig
…arma-chrome-launcher karma-coverage-istanbul-reporter karma-cli karma-jasmine-html-reporter karma-phantomjs-launcher
3b7a936 to
cea3e24
Compare
|
@somecodemonkey here is the test failure. It seems like installing this frontend dependency [INFO] --- frontend-maven-plugin:1.12.1:yarn (yarn install) @ helix-front ---
[INFO] Running 'yarn install' in /home/runner/work/helix/helix/helix-front
[INFO] yarn install v1.22.18
[INFO] [1/5] Validating package.json...
[INFO] [2/5] Resolving packages...
[INFO] warning request > har-validator@5.1.5: this library is no longer supported
[INFO] [3/5] Fetching packages...
[INFO] [4/5] Linking dependencies...
[INFO] warning " > ngx-vis@3.1.0" has incorrect peer dependency "keycharm@^0.2.0".
[INFO] warning "@angular-builders/jest > jest-preset-angular > ts-jest@27.1.5" has incorrect peer dependency "jest@^27.0.0".
[INFO] warning " > @angular/compiler-cli@13.3.9" has incorrect peer dependency "@angular/compiler@13.3.9".
[INFO] warning nohoist config is ignored in "cypress" because it is not a private package. If you think nohoist should be allowed in public packages, please submit an issue for your use case.
[INFO] [5/5] Building fresh packages...
[INFO] info This package requires node-gyp, which is not currently installed. Yarn will attempt to automatically install it. If this fails, you can run "yarn global add node-gyp" to manually install it.
[INFO] error An unexpected error occurred: "/home/runner/work/helix/helix/helix-front/node_modules/vis-network: Cannot read property 'config' of undefined".
[INFO] error An unexpected error occurred: "/home/runner/work/helix/helix/helix-front/node_modules/vis-network: Cannot read property 'config' of undefined".info If you think this is a bug, please open a bug report with the information provided in "/home/runner/.config/yarn/global/yarn-error.log".****
https://github.com/apache/helix/runs/6820814450?check_suite_focus=true logged as #2148 |
|
LGTM, please look into the failing build test as well |
|
This PR is ready to be merged, approved by @somecodemonkey fix e2e tests for helix-front (#2075)Fix the helix-front end to end tests by replacing the deprecated Protractor testing library with Cypress |
|
How was the failing test as Darby mentioned? |
|
@junkaixue good question. Details here: #2148 It looks like there is an OS specific failure during Javascript dependency installation. |
|
Based on conversation with @junkaixue will fix #2148 first. |
|
#2148 is now fixed. |
|
This PR is ready to be merged, approved by @somecodemonkey Final commit message:fix e2e tests for helix-front (#2075) |
Issues
fix #2075 #2148
Description
This PR fixes the end to end tests by replacing the deprecated Protractor library with Cypress.
This PR also replaces karma and jasmine with Jest [Jest + Angular guide].
Tests
[x] The following is the result of the "mvn test" command on the appropriate module:
N/A, helix-front only change. No Java changes.
Changes that Break Backward Compatibility
[x] No backwards incompatible changes
Documentation
[x] New commands documented in ./helix-front/README.md
Commits
[x] Commits match Apache style
Code Quality
[x] My diff has been formatted using helix-style.xml
(helix-style-intellij.xml if IntelliJ IDE is used)
N/A, helix-front only change. No Java changes. See #2143 for an effort to add automatic code formatting for helix-front.