Conversation
the CypressFileds from enums, also mount the src/frontend dir in FE tests docker compose to always pass the updated code
|
I see those tests were reenabled upstream in open-telemetry#2663 |
Good spot, it would be best to apply that commit, however that is a large PR do we want to include everything from that PR into the elastic otel demo repo? |
Yes, we should try to be in sync with upstream as much as possible to prevent merge conflicts and be up-to-date. That PR adds a new service to the demo, we should first sync the fork (e.g #171) and add the new service in the fork's CI (e.g. https://github.com/elastic/opentelemetry-demo/pull/122/files) so a new image is build in the new release. |
Sounds good, I can close this PR and create a PR to sync with upstream. |
|
Closing this PR as we have decided to sync with upstream as the tests have been fixed there. |
Changes
This PR fixes the broken e2e frontend tests, currently when running
make run-teststhe e2e tests fail:Home Page 1) should validate the home page 2) should change currency 0 passing (1s) 2 failing 1) Home Page should validate the home page: TypeError: Cannot read properties of undefined (reading 'HomePage') at Context.eval (webpack://frontend/./cypress/e2e/Home.cy.ts:14:22) at runnable.fn (http://frontend:8080/__cypress/runner/cypress_runner.js:141791:19) at callFn (http://frontend:8080/__cypress/runner/cypress_runner.js:160869:21) at Runnable.run (http://frontend:8080/__cypress/runner/cypress_runner.js:160856:7) at <unknown> (http://frontend:8080/__cypress/runner/cypress_runner.js:166946:30) at PassThroughHandlerContext.finallyHandler (http://frontend:8080/__cypress/runner/cypress_runner.js:4042:23) at PassThroughHandlerContext.tryCatcher (http://frontend:8080/__cypress/runner/cypress_runner.js:1777:23) at Promise._settlePromiseFromHandler (http://frontend:8080/__cypress/runner/cypress_runner.js:1489:31) at Promise._settlePromise (http://frontend:8080/__cypress/runner/cypress_runner.js:1546:18) 2) Home Page should change currency: TypeError: Cannot read properties of undefined (reading 'CurrencySwitcher') at Context.eval (webpack://frontend/./cypress/e2e/Home.cy.ts:21:22) at runnable.fn (http://frontend:8080/__cypress/runner/cypress_runner.js:141791:19) at callFn (http://frontend:8080/__cypress/runner/cypress_runner.js:160869:21) at Runnable.run (http://frontend:8080/__cypress/runner/cypress_runner.js:160856:7) at <unknown> (http://frontend:8080/__cypress/runner/cypress_runner.js:166946:30) at PassThroughHandlerContext.finallyHandler (http://frontend:8080/__cypress/runner/cypress_runner.js:4042:23) at PassThroughHandlerContext.tryCatcher (http://frontend:8080/__cypress/runner/cypress_runner.js:1777:23) at Promise._settlePromiseFromHandler (http://frontend:8080/__cypress/runner/cypress_runner.js:1489:31) at Promise._settlePromise (http://frontend:8080/__cypress/runner/cypress_runner.js:1546:18)The issue is that the
CypressFieldsused in the test are not correctly exported, so at runtime the test fails as these values arenull.