chore: flaky tests fixes (#26714)
This commit is contained in:
parent
0ecd561db2
commit
376f2850b3
|
|
@ -77,7 +77,7 @@ export function dumpTestTree(page: Page, options: { time?: boolean } = {}): () =
|
|||
const selected = listItem.classList.contains('selected') ? ' <=' : '';
|
||||
const title = listItem.querySelector('.ui-mode-list-item-title').textContent;
|
||||
const timeElement = options.time ? listItem.querySelector('.ui-mode-list-item-time') : undefined;
|
||||
const time = timeElement ? ' ' + timeElement.textContent.replace(/\d+m?s/, 'XXms') : '';
|
||||
const time = timeElement ? ' ' + timeElement.textContent.replace(/[.\d]+m?s/, 'XXms') : '';
|
||||
result.push(' ' + ' '.repeat(indent) + treeIcon + ' ' + statusIcon + ' ' + title + time + watch + selected);
|
||||
}
|
||||
return '\n' + result.join('\n') + '\n ';
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ test('should show screenshots', async ({ runUITest }) => {
|
|||
await expect(
|
||||
page.locator('.CodeMirror .source-line-running'),
|
||||
).toContainText(`test('test 1', async ({ page }) => {`);
|
||||
await expect(page.locator('.film-strip-frame')).toBeVisible();
|
||||
await expect(page.locator('.film-strip-frame').first()).toBeVisible();
|
||||
|
||||
await page.getByText('test 2', { exact: true }).click();
|
||||
await expect(
|
||||
page.locator('.CodeMirror .source-line-running'),
|
||||
).toContainText(`test('test 2', async ({ page }) => {`);
|
||||
await expect(page.locator('.film-strip-frame')).toBeVisible();
|
||||
await expect(page.locator('.film-strip-frame').first()).toBeVisible();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue