This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
edclement
force-pushed
the
fix-unit-tests
branch
2 times, most recently
from
December 9, 2021 15:59
482b93e
to
da514cb
Compare
Since version 93, Firefox started more closely following the spec on formatting `datetime-local` input values by removing trailing zeros from the string representation of the value. This causes some of our tests to fail ([example failure][1]). For example, a value is reported by Firefox as `2009-01-06T16:25` while the tests expect `2009-01-06T16:25:00.000`. I.e. Firefox started leaving out seconds/milliseconds if they are zero. According to [MDN][2], this is the correct behavior according to the spec. Indeed the spec says that [if the value of the element is a valid local date and time string, then it must be set to a **valid normalized local date and time string**][3], where **valid normalized local date and time string** is [defined as consisting of][4]: > - A valid date string representing the date. > - A U+0054 LATIN CAPITAL LETTER T character (T). > - A valid time string representing the time, expressed as the > **shortest possible string** for the given time (e.g. **omitting the > seconds component** entirely if the given time is zero seconds past > the minute). This commit fixes the relevant tests by explicitly specifying non-zero values for seconds and milliseconds. [1]: https://circleci.com/gh/angular/angular.js/3527 [2]: https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats #local_date_and_time_strings [3]: https://html.spec.whatwg.org/multipage/input.html #local-date-and-time-state-(type=datetime-local) [4]: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html #concept-datetime-local Co-authored-by: George Kalpakas <[email protected]>
Previously, the `angularInit()` tests assumed that the Safari browser uses the `safari-extension:` protocol for browser extension URLs. This is true for versions <15. However, since v15, Safari on iOS only recognizes the `chrome-extension:` protocol, which causes the tests to fail ([example failure][1]). This commit updates the tests to use the correct protocol according to the version of Safari used. NOTE: On macOS, Safari v15+ recognizes both `safari-extension:` and `chrome-extension:`, so it is OK to always use the later with Safari v15+ (regardless of the platform). [1]: https://circleci.com/gh/angular/angular.js/3527 Co-authored-by: George Kalpakas <[email protected]>
edclement
force-pushed
the
fix-unit-tests
branch
from
December 9, 2021 17:52
da514cb
to
ca0a166
Compare
gkalpak
approved these changes
Dec 9, 2021
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.
Thx, @edclement ✨
gkalpak
pushed a commit
that referenced
this pull request
Dec 9, 2021
Previously, the `angularInit()` tests assumed that the Safari browser uses the `safari-extension:` protocol for browser extension URLs. This is true for versions <15. However, since v15, Safari on iOS only recognizes the `chrome-extension:` protocol, which causes the tests to fail ([example failure][1]). This commit updates the tests to use the correct protocol according to the version of Safari used. NOTE: On macOS, Safari v15+ recognizes both `safari-extension:` and `chrome-extension:`, so it is OK to always use the later with Safari v15+ (regardless of the platform). [1]: https://circleci.com/gh/angular/angular.js/3527 Co-authored-by: George Kalpakas <[email protected]> Closes #17166
AnkushLambdatest
pushed a commit
to AnkushLambdatest/angular.js
that referenced
this pull request
Jun 29, 2022
Previously, the `angularInit()` tests assumed that the Safari browser uses the `safari-extension:` protocol for browser extension URLs. This is true for versions <15. However, since v15, Safari on iOS only recognizes the `chrome-extension:` protocol, which causes the tests to fail ([example failure][1]). This commit updates the tests to use the correct protocol according to the version of Safari used. NOTE: On macOS, Safari v15+ recognizes both `safari-extension:` and `chrome-extension:`, so it is OK to always use the later with Safari v15+ (regardless of the platform). [1]: https://circleci.com/gh/angular/angular.js/3527 Co-authored-by: George Kalpakas <[email protected]> Closes angular#17166
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the current behavior? (You can also link to an open issue here)
Unit tests on the
master
branch failWhat is the new behavior (if this is a feature change)?
Unit tests pass
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements
Other information:
These commits were cherry-picked from:
The commit author has been updated to myself. The original author of these commits (as noted in the commit messages) is
George Kalpakas <[email protected]>
👏🏼.