-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
fix(datetime): handle invalid dates when value changes #25049
Conversation
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.
Looks good other than the comment. Don't forget to update the commit subject to be more descriptive. Maybe something like "warn when parsing an invalid date value"?
core/src/utils/test/playwright.ts
Outdated
@@ -106,6 +106,8 @@ export const test = base.extend<CustomFixtures>({ | |||
page.setIonViewport = async () => { | |||
const currentViewport = page.viewportSize(); | |||
|
|||
await page.waitForSelector('ion-content'); |
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.
With the other fix I merged into main
, is this still needed?
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.
The behavior it was added to resolve, was fixed by your other changes. There is some value of it existing, in that we shouldn't be calling setIonViewport
on a test template that doesn't use ion-content
. If we use the waitForSelector
, an invalid test will fail and help inform that that tag is expected in the test file. I think this is rare though, so I'd be happy to remove for now and re-add if we would find value in the safe guard.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
When assigning an invalid value to a datetime in Firefox, such as:
In Firefox an exception will be thrown that states:
This exception is not present in Safari or Chrome and isn't helpful or clear to developers.
What is the new behavior?
Does this introduce a breaking change?
Other information