From aab520c539f4398f089f7ae841af5611f6356ee9 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 16 Apr 2024 15:32:20 -0700 Subject: [PATCH] Add comment --- packages/playwright/src/matchers/expect.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/playwright/src/matchers/expect.ts b/packages/playwright/src/matchers/expect.ts index 6a962b2345..ef521ffc44 100644 --- a/packages/playwright/src/matchers/expect.ts +++ b/packages/playwright/src/matchers/expect.ts @@ -285,6 +285,8 @@ class ExpectMetaInfoProxyHandler implements ProxyHandler { try { const callback = () => matcher.call(target, ...args); + // toPass and poll matchers can contain other steps, expects and API calls, + // so they behave like a retriable step. const result = (matcherName === 'toPass' || this._info.isPoll) ? zones.run('stepZone', step, callback) : zones.run('expectZone', { title, wallTime }, callback);