chore(): sync with main

This commit is contained in:
Liam DeBeasi
2023-05-11 14:57:44 -04:00
1009 changed files with 4248 additions and 4043 deletions

View File

@ -6,29 +6,19 @@ import { configs, test } from '@utils/test/playwright';
*/
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
test.describe(title('picker: isOpen'), () => {
test.beforeEach(async ({ page }) => {
test('should open and close the picker', async ({ page }) => {
await page.goto('/src/components/picker/test/is-open', config);
});
test('should open the picker', async ({ page }) => {
const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent');
const ionPickerDidDismiss = await page.spyOnEvent('ionPickerDidDismiss');
const picker = page.locator('ion-picker');
await page.click('#default');
await ionPickerDidPresent.next();
await expect(picker).toBeVisible();
});
test('should open the picker then close after a timeout', async ({ page }) => {
const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent');
const ionPickerDidDismiss = await page.spyOnEvent('ionPickerDidDismiss');
const picker = page.locator('ion-picker');
await page.click('#timeout');
await ionPickerDidPresent.next();
await expect(picker).toBeVisible();
await picker.evaluate((el: HTMLIonPickerElement) => (el.isOpen = false));
await ionPickerDidDismiss.next();
await expect(picker).toBeHidden();