mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
chore: add flaky tests and enable retries
This commit is contained in:
@ -65,7 +65,7 @@ const config: PlaywrightTestConfig = {
|
||||
/* Fail fast on CI */
|
||||
maxFailures: process.env.CI ? 1 : 0,
|
||||
/* Flaky test should be either addressed or disabled until we can address them */
|
||||
retries: 0,
|
||||
retries: 3,
|
||||
/* Opt out of parallel tests on CI. */
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
|
@ -1,6 +1,16 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { configs, test } from '@utils/test/playwright';
|
||||
|
||||
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
||||
test.describe.only(title('my describe block'), () => {
|
||||
test('test', () => {
|
||||
if (Math.random() > 0.6) {
|
||||
throw new Error('flaky')
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
configs().forEach(({ config, screenshot, title }) => {
|
||||
test.describe(title('button: basic'), () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
|
Reference in New Issue
Block a user