Skip to content

Commit 589a309

Browse files
committed
fix rebranching
1 parent 5465d64 commit 589a309

File tree

5 files changed

+186
-274
lines changed

5 files changed

+186
-274
lines changed

src/matchers/browser/toHaveTitle.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ export async function toHaveTitle(
2727
const { expectation = 'title', verb = 'have', isNot } = this
2828
const context = { expectation, verb, isNot, isMultiRemote: browser.isMultiremote }
2929

30-
console.log('toHaveTitle', { expectedValue, isNot, options })
31-
3230
await options.beforeAssertion?.({
3331
matcherName: 'toHaveTitle',
3432
expectedValue,

src/utils.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { WdioElementMaybePromise } from './types.js'
66
import { wrapExpectedWithArray } from './util/elementsUtil.js'
77
import { executeCommand } from './util/executeCommand.js'
88
import { enhanceError, enhanceErrorBe, numberError } from './util/formatMessage.js'
9+
import { toArray } from './util/multiRemoteUtil.js'
910

1011
export type CompareResult<A = unknown, E = unknown> = {
1112
value: A // actual but sometimes modified (e.g. trimmed, lowercased, etc)
@@ -111,19 +112,17 @@ const waitUntilResult = async <A = unknown, E = unknown>(
111112

112113
return { pass, results: allResults }
113114
}
115+
114116
/**
115-
* Wait for condition to succeed
116-
* For multiple remotes, all conditions must be met
117-
* When using negated condition (isNot=true), we wait for all conditions to be true first, then we negate the real value if it takes time to show up.
118-
*
119-
* @param condition function to that should return true when condition is met
117+
* wait for expectation to succeed
118+
* @param condition function
120119
* @param isNot https://jestjs.io/docs/expect#thisisnot
121120
* @param options wait, interval, etc
122121
*/
123122
const waitUntil = async (
124123
condition: () => Promise<boolean>,
125124
isNot = false,
126-
{ wait = DEFAULT_OPTIONS.wait, interval = DEFAULT_OPTIONS.interval } = {},
125+
{ wait = DEFAULT_OPTIONS.wait, interval = DEFAULT_OPTIONS.interval } = {}
127126
): Promise<boolean> => {
128127
// single attempt
129128
if (wait === 0) {

0 commit comments

Comments
 (0)