test: unflake codegen tests waiting for highlight (#18518)
Clear existing highlights to avoid resolving with the old highlight value.
This commit is contained in:
parent
c3cff485d1
commit
20f2e0049c
|
|
@ -149,6 +149,8 @@ class Recorder {
|
|||
}
|
||||
|
||||
async waitForHighlight(action: () => Promise<void>): Promise<string> {
|
||||
await this.page.$$eval('x-pw-highlight', els => els.forEach(e => e.remove()));
|
||||
await this.page.$$eval('x-pw-tooltip', els => els.forEach(e => e.remove()));
|
||||
await action();
|
||||
await this.page.locator('x-pw-highlight').waitFor();
|
||||
await this.page.locator('x-pw-tooltip').waitFor();
|
||||
|
|
|
|||
Loading…
Reference in a new issue