-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/add e2e factories #7
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
base: main
Are you sure you want to change the base?
Conversation
This reverts commit d7ed55a.
…e/add-e2e-factories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| // Test-env override: when running E2E with Panther, the page origin | ||
| // is the internal PHP server (exelearning:908X), which doesn't host Mercure. | ||
| // Force the hub to the Nginx/Caddy endpoint in the exelearning container. | ||
| if (window.eXeLearning?.symfony?.environment === 'test') { | ||
| // Only override if not already explicitly set to a non-908X host | ||
| try { | ||
| const current = window.eXeLearning.mercure?.url || ''; | ||
| const url = new URL(current || 'http://exelearning'); | ||
| const isPantherPort = /^90\d{2}$/.test( | ||
| String(urlRequest.port || '') | ||
| ); | ||
| const isCurrentOk = current.includes('exelearning:8080'); | ||
| if (!isCurrentOk && isPantherPort) { | ||
| window.eXeLearning.mercure = { | ||
| ...(window.eXeLearning.mercure || {}), | ||
| url: 'http://exelearning:8080/.well-known/mercure', | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid overriding custom Mercure hub in test mode
The test‑mode fallback always rewrites window.eXeLearning.mercure.url whenever the page is loaded from a 908x port, regardless of what the current hub is set to. This means a caller who intentionally configured window.eXeLearning.mercure.url to an external hub (e.g. https://mercure.example.com) will still be forced back to http://exelearning:8080/.well-known/mercure in every test run. The conditional only checks the page origin’s port via urlRequest.port rather than the parsed current hub, so any environment served from 908x gets clobbered. Consider basing isPantherPort on the parsed current URL (or skipping the override when the existing hub host already differs from 908x) so custom hubs survive.
Useful? React with 👍 / 👎.
…ties of undefined (reading 'id')
…e/add-e2e-factories
…e/add-e2e-factories
…m:exelearning/exelearning into feature/add-e2e-factories
Removed the PRAGMA foreign_keys setting to allow default behavior. There are many errors on Symfony when using them
Removed assertions for foreign keys and deleted a test for concurrent writers.
…m:exelearning/exelearning into feature/add-e2e-factories
…e/add-e2e-factories
…e/add-e2e-factories
…e/add-e2e-factories
No description provided.