fix(trace): don't replace unknown braces in action title#36920
fix(trace): don't replace unknown braces in action title#36920Skn0tt merged 7 commits intomicrosoft:mainfrom
Conversation
| title.push(chunk); | ||
|
|
||
| const param = formatProtocolParam(action.params, quotedText); | ||
| if (!param) { |
There was a problem hiding this comment.
Let's make formatProtocolParam return undefined for failures, so we can differentiate between an empty string and a missing param.
We should also update renderTitleForCall.
There was a problem hiding this comment.
Done. I also had to change the title in protocol.yml to remove our "{a}{b}" syntax of optionality, since it's clashing with this change.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
packages/protocol/src/protocol.yml
Outdated
|
|
||
| clockFastForward: | ||
| title: Fast forward clock "{ticksNumber}{ticksString}" | ||
| title: Fast forward clock "{ticks}" |
There was a problem hiding this comment.
How about {ticksNumber|ticksString}?
| if (param === undefined) { | ||
| elements.push(fullMatch); | ||
| title.push(fullMatch); | ||
| currentIndex = match.index + fullMatch.length; |
There was a problem hiding this comment.
nit: I'd prefer this line to not be repeated, perhaps if () {} else if () {} else {} would be better?
| return params[name]; | ||
| return urlObject.pathname + urlObject.search; | ||
| } catch (error) { | ||
| return params[name]; |
There was a problem hiding this comment.
| return params[name]; | |
| if (params[name] !== undefined) | |
| return params[name]; |
| if (name === 'timeNumber') { | ||
| // eslint-disable-next-line no-restricted-globals | ||
| return new Date(params[name]).toString(); | ||
| return new Date(params[name]).toString(); |
There was a problem hiding this comment.
| return new Date(params[name]).toString(); | |
| if (params[name] !== undefined) | |
| return new Date(params[name]).toString(); |
Test results for "tests 1"1 failed 7 flaky46578 passed, 806 skipped Merge workflow run. |
Closes #36483