single-window behavior breaks functionality where messages would be passed down to the window owner
Ghxst opened this issue · 5 comments
What is your Scenario?
Some websites like uber (auth.uber.com/v2) use a new window for their SSO integrations which make use of the messaging api to return a response to the parent / original window before posting the login form.
What is the Current behavior?
The proxy is opening these SSO integrations as a redirect, in the same window, breaking this functionality.
What is the Expected behavior?
Maybe we can replicate the same behavior as other proxies like UV that open a new window, or maybe there's some iframe magic we can possibly do?
What is your public website URL? (or attach your complete example)
What is your TestCafe test code?
n/a
Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
node node_modules/gulp/bin/gulp http-playground
- Visit any page with SSO integrations that open a new window (like auth.uber.com/v2)
- Click on any of the SSO integrations
- Follow the SSO (no uber account required)
TestCafe version
latest main branch
Node.js version
v18.16.0
Command-line arguments
n/a
Browser name(s) and version(s)
Chrome 114
Platform(s) and version(s)
Windows
Other
Happy to dive into this some more myself if someone can point me to the related code.
Wondering if the following issue is related #1428
Is there a way to run this multi window api with the http-server in playground?
Confirmed that multi-window-http-playground
does work and has the intended behavior! For the single-window implementation I guess this issue remains however
This is not an issue. These are just two different modes of how testcafe-hammerhead
works: with and without multiple windows. You can check the following code to see how this feature is enabled in the playground: https://github.com/DevExpress/testcafe-hammerhead/blob/c09db9f911abb75914655f9a430305fde69edc51/test/playground/create-session.js.
If you have any questions, please let us know.
Thanks so much for your prompt reply. I'm afraid there may be a slight misunderstanding regarding the issue I'm trying to raise. It seems that when utilizing the default settings in http-playground, it impacts the functionality of websites that use multiple windows. This implies that the website may not function as intended under these conditions.
Was this an intentional design decision for the http-playground?
I had thought that the intent behind modifying the existing website was to retain all of the original functionality, even though it's being implemented within a single window. Could you please clarify this for me?
Thanks again for your time and assistance.
edit to clarify: It breaks the login functionality of the proxied website, unless the multi-window setting is used, meaning websites that integrate their SSO (or any other kind of feature using a similar setup) this way will no longer function correctly.
Initially, testcafe-hammerhead
did not support using multiple windows as you can see in the http-playground
. Thus, multi-window-http-playground
was only created after testcafe-hammerhead
and TestCafe itself started supporting the Multiple Windows functionality.
Therefore, this was an intentional design decision, because TestCafe had limitations when using multiple windows.