fix(dotnet): follow up, add WaitFor(action) in order

This commit is contained in:
Pavel Feldman 2021-05-16 19:02:22 -07:00
parent 3aa9ab88ef
commit c497c32ec9

View File

@ -574,7 +574,8 @@ function renderMethod(member, parent, output, name) {
.forEach(parseArg);
if (name.includes('WaitFor') && !['WaitForTimeoutAsync', 'WaitForFunctionAsync', 'WaitForLoadStateAsync', 'WaitForURLAsync', 'WaitForSelectorAsync', 'WaitForElementStateAsync'].includes(name)) {
args.push('Func<Task> action = default');
const firstOptional = args.find(a => a.includes('='));
args.splice(args.indexOf(firstOptional), 0, 'Func<Task> action = default');
argTypeMap.set('Func<Task> action = default', 'action');
addParamsDoc('action', ['Action to perform while waiting']);
}