chore: sync with main

This commit is contained in:
Liam DeBeasi
2024-02-07 11:48:46 -05:00
167 changed files with 1120 additions and 841 deletions

View File

@ -32,7 +32,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
});
test('should switch to a date-only view when the date button is clicked', async ({ page }) => {
const datetime = page.locator('ion-datetime');
@ -62,7 +62,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('Jan 1, 2022');
await expect(page.locator('#time-button')).toContainText('6:30 AM');
@ -75,7 +75,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('January 2022');
await expect(page.locator('#time-button')).toBeHidden();
@ -88,7 +88,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('2022');
await expect(page.locator('#time-button')).toBeHidden();
@ -101,7 +101,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('January');
await expect(page.locator('#time-button')).toBeHidden();
@ -114,7 +114,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#time-button')).toContainText('6:30 AM');
await expect(page.locator('#date-button')).toBeHidden();
@ -127,7 +127,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
const dateTarget = page.locator('#date-button');
@ -152,7 +152,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('January 2022');
await expect(page.locator('#time-button')).toBeHidden();
@ -170,7 +170,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('2022');
await expect(page.locator('#time-button')).toBeHidden();
@ -186,7 +186,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
/**
* The entire text reads 1 ene 2022, but some browsers will add
@ -204,7 +204,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#time-button')).toContainText('16:30');
});
@ -216,7 +216,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const timeTarget = page.locator('#time-button');
await expect(timeTarget).toContainText('6:30');
@ -240,7 +240,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('Jan 1, 2022 6:30 AM');
await expect(page.locator('#time-button')).not.toBeVisible();
@ -255,7 +255,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('Jan 1, 2022 6:30 AM');
await expect(page.locator('#time-button')).not.toBeVisible();

View File

@ -18,7 +18,7 @@
</ion-header>
<ion-content>
<ion-item>
<ion-input value="March 15, 2022 at 12:43 AM"></ion-input>
<ion-input aria-label="input" value="March 15, 2022 at 12:43 AM"></ion-input>
<ion-datetime-button slot="end" id="default-button" datetime="default-datetime">
<ion-icon color="primary" id="custom-date-button" slot="date-target" name="calendar"></ion-icon>
<ion-icon color="primary" id="custom-time-button" slot="time-target" name="time"></ion-icon>

View File

@ -11,7 +11,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toBeDisabled();
await expect(page.locator('#time-button')).toBeDisabled();
@ -24,7 +24,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetimeButton = page.locator('ion-datetime-button');
await expect(datetimeButton).toHaveScreenshot(screenshot(`datetime-button-disabled`));

View File

@ -20,7 +20,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toContainText('3 days');
});
@ -32,7 +32,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toHaveText('0 days');
});
@ -49,7 +49,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toHaveText('Jun 1, 2022');
});
@ -69,7 +69,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toHaveText('Selected: 3');
});
@ -86,7 +86,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
const datetime = page.locator('ion-datetime');
const ionValueChange = await page.spyOnEvent('ionValueChange');
@ -111,7 +111,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
`,
config
);
await page.waitForSelector('.datetime-ready');
await page.locator('.datetime-ready').waitFor();
await expect(page.locator('#date-button')).toHaveText('Jun 1, 2022');
await expect(page.locator('#time-button')).toHaveText('4:30 PM');