test(many): resolve more flaky tests (#26731)

This commit is contained in:
Liam DeBeasi
2023-02-03 13:21:38 -05:00
committed by GitHub
parent 9d6ec2925c
commit 7553cc7b0d
40 changed files with 6 additions and 21 deletions

View File

@ -27,23 +27,6 @@ test.describe('datetime: locale', () => {
}); });
}); });
test.describe('ta-IN', () => {
test('should not have visual regressions', async () => {
await datetimeFixture.goto('ta-IN', 'date');
await datetimeFixture.expectLocalizedDatePicker();
});
test('month/year picker should not have visual regressions', async () => {
await datetimeFixture.goto('ta-IN', 'month-year');
await datetimeFixture.expectLocalizedMonthYearPicker();
});
test('time picker should not have visual regressions', async () => {
await datetimeFixture.goto('ta-IN', 'time');
await datetimeFixture.expectLocalizedTimePicker();
});
});
test.describe('ja-JP', () => { test.describe('ja-JP', () => {
test('should not have visual regressions', async () => { test('should not have visual regressions', async () => {
await datetimeFixture.goto('ja-JP', 'date'); await datetimeFixture.goto('ja-JP', 'date');

View File

@ -14,7 +14,7 @@ export async function testPickerColumn(page: E2EPage, buttonSelector: string, de
await page.click(buttonSelector); await page.click(buttonSelector);
await ionPickerDidPresentSpy.next(); await ionPickerDidPresentSpy.next();
await page.waitForTimeout(100); await page.waitForChanges();
expect(await page.screenshot()).toMatchSnapshot( expect(await page.screenshot()).toMatchSnapshot(
`picker-${description}-column-initial-${page.getSnapshotSettings()}.png` `picker-${description}-column-initial-${page.getSnapshotSettings()}.png`
@ -31,7 +31,7 @@ export async function testPickerColumn(page: E2EPage, buttonSelector: string, de
await dragElementBy(column, page, 0, -100); await dragElementBy(column, page, 0, -100);
await spy.next(); await spy.next();
await page.waitForTimeout(100); await page.waitForChanges();
screenshots.push({ screenshots.push({
name: `picker-${description}-column-diff-${i}-${page.getSnapshotSettings()}.png`, name: `picker-${description}-column-diff-${i}-${page.getSnapshotSettings()}.png`,

View File

@ -15,7 +15,7 @@ export const openPopover = async (page: E2EPage, buttonID: string, useEvalClick
* the click method on the button directly to avoid this behavior. * the click method on the button directly to avoid this behavior.
*/ */
if (useEvalClick) { if (useEvalClick) {
trigger.evaluate((el: HTMLElement) => el.click()); await trigger.evaluate((el: HTMLElement) => el.click());
} else { } else {
await trigger.click(); await trigger.click();
} }

View File

@ -10,7 +10,9 @@ test.describe('segment: a11y', () => {
expect(results.violations).toEqual([]); expect(results.violations).toEqual([]);
}); });
test('segment buttons should be keyboard navigable', async ({ page, browserName }, testInfo) => { test('segment buttons should be keyboard navigable', async ({ page, browserName, skip }, testInfo) => {
// TODO (FW-2979)
skip.browser('webkit', 'Safari 16 only allows text fields and pop-up menus to be focused.');
const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab'; const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab';
const isRTL = testInfo.project.metadata.rtl === true; const isRTL = testInfo.project.metadata.rtl === true;
const nextKey = isRTL ? 'ArrowLeft' : 'ArrowRight'; const nextKey = isRTL ? 'ArrowLeft' : 'ArrowRight';