test: attempt to unflake inspector tests (#19845)
On headed bots, we might get `locator('body')` from initial mouse
position.
This commit is contained in:
parent
599ae30313
commit
f58015281a
|
|
@ -19,6 +19,7 @@ import type { Page } from 'playwright-core';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import type { Source } from '../../../packages/recorder/src/recorderTypes';
|
import type { Source } from '../../../packages/recorder/src/recorderTypes';
|
||||||
import type { CommonFixtures, TestChildProcess } from '../../config/commonFixtures';
|
import type { CommonFixtures, TestChildProcess } from '../../config/commonFixtures';
|
||||||
|
import { expect } from '@playwright/test';
|
||||||
export { expect } from '@playwright/test';
|
export { expect } from '@playwright/test';
|
||||||
|
|
||||||
type CLITestArgs = {
|
type CLITestArgs = {
|
||||||
|
|
@ -154,6 +155,8 @@ class Recorder {
|
||||||
await action();
|
await action();
|
||||||
await this.page.locator('x-pw-highlight').waitFor();
|
await this.page.locator('x-pw-highlight').waitFor();
|
||||||
await this.page.locator('x-pw-tooltip').waitFor();
|
await this.page.locator('x-pw-tooltip').waitFor();
|
||||||
|
await expect(this.page.locator('x-pw-tooltip')).not.toHaveText('');
|
||||||
|
await expect(this.page.locator('x-pw-tooltip')).not.toHaveText(`locator('body')`);
|
||||||
return this.page.locator('x-pw-tooltip').textContent();
|
return this.page.locator('x-pw-tooltip').textContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue