Skip to content
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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

heimwege
Copy link
Contributor

@heimwege heimwege commented Oct 1, 2024

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 🥳

Copy link

changeset-bot bot commented Oct 1, 2024

🦋 Changeset detected

Latest commit: ab3e7c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sap-ux/preview-middleware Patch
@sap-ux/create Patch

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

@heimwege
Copy link
Contributor Author

heimwege commented Oct 1, 2024

@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 or do we need to keep them because of some downward compatibility? But if this PR is merged first we should hopefully be fine 🤔

@heimwege
Copy link
Contributor Author

heimwege commented Oct 1, 2024

@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?

@heimwege heimwege marked this pull request as ready for review October 1, 2024 16:16
@heimwege heimwege requested a review from a team as a code owner October 1, 2024 16:16
Copy link
Contributor

@tobiasqueck tobiasqueck left a 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);
Copy link
Contributor

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?

Copy link
Contributor Author

@heimwege heimwege Oct 7, 2024

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

Copy link

sonarcloud bot commented Oct 13, 2024

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.

2 participants