-
Notifications
You must be signed in to change notification settings - Fork 35
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
Feat/make rta url params optional #2431
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: ab3e7c0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@ytpo-lyne this PR should help us for https://github.com/SAP/open-ux-tools/tree/feat/create-variantsConfig because the url parameter for the rta editor endpoints are no longer needed with this PR. |
@tobiasqueck I think we do not need to insist on this logic working with the connect API used by the karma test runner as rta editor is not subject to karma tests. Would you agree? |
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.
See inline comment - the redirects for tests with developerMode=true
are not expected.
@@ -336,7 +341,7 @@ describe('FlpSandbox', () => { | |||
|
|||
test('rta with developerMode=true and plugin', async () => { | |||
await server.get('/with/plugin.html').expect(200); | |||
const response = await server.get('/with/plugin.html.inner.html').expect(200); | |||
const response = await server.get('/with/plugin.html.inner.html').expect(302); |
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.
We control exactly what is called as inner.html
therefore, we should be able to also add the url parameters if required, thus, I would not expect that there is a redirect necessary for the inner html.
Is the test case just wrong i.e. should we test here with parameters or is there an unnecessary redirect now?
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.
I think the issue is a test issue because the URL added to the html template contains the parameters. See here
Quality Gate passedIssues Measures |
This PR makes the usage of url params for the rta editor endpoints optional. In case they are missing a re-route will happen and the parameters will be added 🥳