mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(): sync with main
This commit is contained in:
@@ -300,10 +300,13 @@ test.describe('datetime: visibility', () => {
|
||||
|
||||
await datetime.evaluate((el: HTMLIonDatetimeElement) => el.style.setProperty('display', 'none'));
|
||||
await expect(datetime).toBeHidden();
|
||||
await expect(datetime).not.toHaveClass(/datetime-ready/);
|
||||
|
||||
await datetime.evaluate((el: HTMLIonDatetimeElement) => el.style.removeProperty('display'));
|
||||
await expect(datetime).toBeVisible();
|
||||
|
||||
await page.waitForSelector('.datetime-ready');
|
||||
|
||||
// month/year interface should be reset
|
||||
await expect(monthYearInterface).toBeHidden();
|
||||
});
|
||||
|
||||
@@ -214,8 +214,8 @@ test.describe('datetime: prefer wheel', () => {
|
||||
const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)');
|
||||
const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)');
|
||||
|
||||
expect(monthValues).toHaveText(['1月', '2月', '3月']);
|
||||
expect(dayValues).toHaveText(['1日', '2日', '3日']);
|
||||
await expect(monthValues).toHaveText(['1月', '2月', '3月']);
|
||||
await expect(dayValues).toHaveText(['1日', '2日', '3日']);
|
||||
});
|
||||
test('should render the columns according to locale - en-US', async ({ page }) => {
|
||||
await page.setContent(`
|
||||
@@ -334,7 +334,7 @@ test.describe('datetime: prefer wheel', () => {
|
||||
|
||||
const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
|
||||
|
||||
expect(dateValues).toHaveText(['2月1日(火)', '2月2日(水)', '2月3日(木)']);
|
||||
await expect(dateValues).toHaveText(['2月1日(火)', '2月2日(水)', '2月3日(木)']);
|
||||
});
|
||||
test('should respect min and max bounds even across years', async ({ page }) => {
|
||||
await page.setContent(`
|
||||
@@ -495,7 +495,7 @@ test.describe('datetime: prefer wheel', () => {
|
||||
|
||||
const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
|
||||
|
||||
expect(dateValues).toHaveText(['2月1日(火)', '2月2日(水)', '2月3日(木)']);
|
||||
await expect(dateValues).toHaveText(['2月1日(火)', '2月2日(水)', '2月3日(木)']);
|
||||
});
|
||||
test('should respect min and max bounds even across years', async ({ page }) => {
|
||||
await page.setContent(`
|
||||
|
||||
@@ -159,9 +159,10 @@ class TimePickerFixture {
|
||||
}
|
||||
|
||||
async goto() {
|
||||
await this.page.goto(`/src/components/datetime/test/presentation`);
|
||||
await this.page.locator('select').selectOption('time');
|
||||
await this.page.waitForSelector('.datetime-presentation-time');
|
||||
await this.page.setContent(`
|
||||
<ion-datetime presentation="time" value="2022-03-10T13:00:00"></ion-datetime>
|
||||
`);
|
||||
await this.page.waitForSelector('.datetime-ready');
|
||||
this.timePicker = this.page.locator('ion-datetime');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user