-
Notifications
You must be signed in to change notification settings - Fork 68
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
Safari 15 and 14 minor verions. Samsung Browser versions #2537
Conversation
@willyaranda did you check out https://github.com/browscap/browscap/wiki/Testing ? Most of the tests are just JSON files with sample UA(s) and expected output(s), should be all that is needed here I reckon. Thank you ! |
@asgrim I have added a few local tests, but I'm unable to test it… seems the wiki is outdated? what should be the steps that needs to be done? |
ok! running like this
Is there a way to select the test so it does not run the full suite if I'm debugging one? |
I'm afraid I don't know - @mimmi20 is this possible? |
This is not possible. |
Nice work @willyaranda. |
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.
Can you add a few unit tests?
Those will be run automatically by Github once you push your commits :)
resources/user-agents/browsers/samsung/samsung-android-browser-6-2-on.json
Show resolved
Hide resolved
I have pushed a few tests @paulrutter |
Codecov Report
@@ Coverage Diff @@
## 6.0.x #2537 +/- ##
=========================================
Coverage 51.02% 51.03%
Complexity 892 892
=========================================
Files 1815 1815
Lines 67472 67472
Branches 30611 30611
=========================================
+ Hits 34429 34434 +5
+ Misses 33043 33038 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Test failure observed in CI:
There was 1 failure:
1) UserAgentsTest\V4\StandardTest::testUserAgents with data set "issue-2537-B" ('Mozilla/5.0 (iPad; CPU OS 15_.../604.1', array('Mobile Safari 15.2', '15.2'), false, true, true)
Expected actual "Comment" to be "Mobile Safari 15.2" (was "Mobile Safari Generic"; used pattern: "mozilla/5.0*(ipad*cpu*os* like mac os x*)*applewebkit*(*khtml*like*gecko*)*version/*safari/*")
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'Mobile Safari 15.2'
+'Mobile Safari Generic'
/home/runner/work/browscap/browscap/tests/UserAgentsTest/V4/StandardTest.php:197
FAILURES!
Tests: 22762, Assertions: 476688, Failures: 1.
https://github.com/browscap/browscap/runs/4286988584?check_suite_focus=true
Pushed a change. iPad no longer reports the Safari version but being like a Desktop |
Thank you @willyaranda for the update, and @mimmi20 & @paulrutter for reviews! 👍 |
I released a new version of the browscap-java library: https://github.com/blueconic/browscap-java/releases/tag/1.3.10 |
@paulrutter I have added a few UA that we are seeing in our platform that are failing on the
https://browscap.org/ua-lookup
which uses the latest library released this morning.
I'm trying to add tests, but I would love some help as I'm not familiar with php at all, and I don't know how to run them