-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add JBrowser tests #17140
Add JBrowser tests #17140
Conversation
List for UA's to consider testing for
Here are links to get common user agents to test with |
@mbabker I've pinged you and @wilsonge for comments in #17051 (comment), which is already RTC. Apart from the "missing" test, why the new PR`? |
I started only by writing the unit tests. When I copied over the Mozilla user agents from the web client class' test case, I found those were failing to detect the correct version and added a fix for that too. Can't say I remembered that PR being open, either way it doesn't matter what order things get merged in but the added unit test cases are required. |
The problem with Firefox not being detected correctly was not only because of a missing else / if, but the regular expression for "mozilla" browsers being: I've also looked into some alternative Mozilla ~ Firefox based browsers which all(?) have their own UA and would now be detected as "mozilla". Therefore my question #17051. For this to work in the future, we either have to "remove" the Mozilla check, sort of what I did. or put it at the very end of that list, right? |
I have no idea honestly, browser detection isn't something I do normally. I just did what looked to be a valid fix for the issue I ran into while importing tests. I do know without a change in |
This is updated now to only add the unit test cases, the browser detection can be sorted in the other PR. |
Merged on review |
Summary of Changes
JBrowser
does not correctly detect version data for Firefox browsers, this is now addedJBrowser
itself has no test coverage, this adds several test cases based on user agents used to testJoomla\Application\Web\WebClient
to coverJBrowser::match()
Testing Instructions
For Firefox browsers, their data (especially the version) should now be detected correctly.All added test cases should pass.