-
Notifications
You must be signed in to change notification settings - Fork 8
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
Disabled TableColumnDateText tests on WebKit due to date formatting differences #1940
Comments
# Pull Request ## 🤨 Rationale One of the tasks in #1747 is to run nimble-components tests in WebKit and see if there are any new failures. There are several. We also wanted to start tracking specific issues for each root cause rather than catch all issues like #1074 and #1075. ## 👩💻 Implementation Marked each failing test with one of these specific issues: - #1936 - #1938 TODO: ALSO FILE AZDO BUG - #1939 - #1940 - #1942 - #1943 Also re-enabled a couple of table header tests in Firefox which are now passing. ## 🧪 Testing Ran tests in Playwright webkit browser, Firefox, and Safari and and all the enabled tests now pass. ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [x] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: Milan Raj <[email protected]>
@jattasNI, it's interesting that these tests are failing for you. When I run |
@mollykreis My system setup is: It appears to be a behavior difference in the Intl.DateTimeFormat in WebKit, but only on macOS? |
That's interesting. They pass on my machine (Windows 10), and I just verified that they pass on the GitHub pipeline. Any thoughts on the best way to resolve the issue? Should I close it since it passes on the pipeline? |
For other formatting differences we have been capturing it in pageObjects. II can't find the example anymore but that would be nice to do to enable devs across platform |
Yeah, ideally we'll find a way to enable the tests so they pass on Windows dev machines, macOS dev machines, and Linux agents. I'd find it annoying if they were permanently disabled or failing on the OS I use for dev. I don't recall the browser-specific page object example Milan mentioned. It'd be cool to abstract away like that, but I'm not sure how it'd work since our page objects usually have methods like Another alternative would be to create one test that's permanently disabled (via tags like SkipWebkit) on certain configurations and a corresponding test that's permanently enabled on the inverse configuration. But that might require new tags like SkipMacOS/SkipWindows and new commands for running them. I could see that getting complex. |
This formatting normalizer used by duration and date columns was what I had in mind. It handles both a difference in chrome (not mentioned in the comments) and a difference across languages inside the page object: nimble/packages/nimble-components/src/table-column/testing/table-column-formatted-text.pageobject.ts Lines 10 to 14 in 626b6c7
|
The important detail being having the page object hide browser-specific details, not having different page objects per browser or something. |
# Pull Request ## 🤨 Rationale Resolves #1940 ## 👩💻 Implementation Added a page object function to get the expected cell text for a given value/locale combination. The function internally uses `Intl.DateTimeFormat` to determine the expected text, so that it will always return the correct value for a given browser. With this change, the tests still test all the column, cell, and group row formatting code without actually testing the nuances of the string returned from `Intl.DateTimeFormat`. ## 🧪 Testing Ran the tests for the date-text column in WebKit on my machine (Windows 10) and on the pipeline to verify they pass on both. ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed.
🧹 Tech Debt
Several TableColumnDateText tests have been disabled on WebKit due to errors like this:
Expected 'Dec 10, 2012 at 10:35:05 PM' to be 'Dec 10, 2012, 10:35:05 PM'.
We need to either fix and re-enable the tests or file an issue upstream (e.g. to webkit) and mark this blocked.
Search for this bug ID in source for a complete list of such tests.
The text was updated successfully, but these errors were encountered: