Skip to content

Conversation

@osullivandonal
Copy link

Changes

This PR fixes the broken e2e frontend tests, currently when running make run-tests the e2e tests fail:

  • 2 Tests suites are skipped
  • 1 Test suite fails
  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 CypressFields used in the test are not correctly exported, so at runtime the test fails as these values are null.

the CypressFileds from enums, also mount the src/frontend dir in FE tests docker
compose to always pass the updated code
@dmathieu
Copy link
Member

dmathieu commented Dec 8, 2025

I see those tests were reenabled upstream in open-telemetry#2663
Should we instead apply that commit into the fork so we don't move away from upstream too much?

@osullivandonal
Copy link
Author

I see those tests were reenabled upstream in open-telemetry#2663 Should we instead apply that commit into the fork so we don't move away from upstream too much?

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?

@rogercoll
Copy link
Collaborator

I see those tests were reenabled upstream in open-telemetry#2663 Should we instead apply that commit into the fork so we don't move away from upstream too much?

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.

@osullivandonal
Copy link
Author

I see those tests were reenabled upstream in open-telemetry#2663 Should we instead apply that commit into the fork so we don't move away from upstream too much?

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.

@osullivandonal
Copy link
Author

Closing this PR as we have decided to sync with upstream as the tests have been fixed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants