-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix(datetime): changing months work if partially visible #27917
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -301,21 +301,20 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => | |
<ion-datetime | ||
min="2022-01-15" | ||
value="2022-02-01" | ||
presentation="date" | ||
presentation="month-year" | ||
></ion-datetime> | ||
`, | ||
config | ||
); | ||
|
||
const datetime = page.locator('ion-datetime'); | ||
const monthYearToggle = page.locator('ion-datetime .calendar-month-year'); | ||
const monthColumnItems = page.locator('ion-datetime .month-column .picker-item:not(.picker-item-empty)'); | ||
const ionChange = await page.spyOnEvent('ionChange'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test started to flake after my changes. This test touches the wheel picker which does not use any of the changed code. I noticed that the test was not waiting for I simplified the test but made sure to check the same datetime APIs, so this behavior is definitely still working. |
||
|
||
await monthYearToggle.click(); | ||
await page.waitForChanges(); | ||
await page.waitForSelector('.datetime-ready'); | ||
|
||
await monthColumnItems.nth(0).click(); // switch to January | ||
await page.waitForChanges(); | ||
await ionChange.next(); | ||
|
||
await expect(datetime).toHaveJSProperty('value', '2022-01-15T00:00:00'); | ||
}); | ||
|
Uh oh!
There was an error while loading. Please reload this page.