From 3aa9ab88efa1fc505406e548930528900f2317a6 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Sun, 16 May 2021 19:01:14 -0700 Subject: [PATCH] api(dotnet): introduce WaitFor*(action) (#6610) --- utils/doclint/generateDotnetApi.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/utils/doclint/generateDotnetApi.js b/utils/doclint/generateDotnetApi.js index 20d3600062..55f480b23d 100644 --- a/utils/doclint/generateDotnetApi.js +++ b/utils/doclint/generateDotnetApi.js @@ -573,10 +573,16 @@ function renderMethod(member, parent, output, name) { .sort((a, b) => b.alias === 'options' ? -1 : 0) //move options to the back to the arguments list .forEach(parseArg); + if (name.includes('WaitFor') && !['WaitForTimeoutAsync', 'WaitForFunctionAsync', 'WaitForLoadStateAsync', 'WaitForURLAsync', 'WaitForSelectorAsync', 'WaitForElementStateAsync'].includes(name)) { + args.push('Func action = default'); + argTypeMap.set('Func action = default', 'action'); + addParamsDoc('action', ['Action to perform while waiting']); + } + let printArgDoc = function (val, ind) { - if (val && val.length === 1) + if (val && val.length === 1) { output(`/// ${val}`); - else { + } else { output(`/// `); output(val.map(l => `/// ${l}`)); output(`/// `);