Closed blakebyrnes closed 2 years ago
It’s not needed since domstate implements IDomState
On Mar 6, 2022, at 6:06 AM, Caleb Clark @.***> wrote:
@calebjclark commented on this pull request.
In client/lib/Hero.ts:
- exitState?: IDomState | DomState | IDomStateAllFn,
- options?: IFlowCommandOptions,
- optionsOrExitState?: IDomStateAllFn | IFlowCommandOptions, Shouldn't optionsOrExitState also accept an instance of DomState?
I'm going to go ahead and merge. We can figure this out later, but I wanted to at least put it out there.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
Although this is allowed:
await hero.flowCommand(async () => {
const field = await hero.querySelector('#text').$waitForVisible();
await field.$type('test');
}, {
maxRetries: 2,
exitState: new DomState({...}),
});
This does not seem to be allowed:
await hero.flowCommand(async () => {
const field = await hero.querySelector('#text').$waitForVisible();
await field.$type('test');
}, new DomState({...}));
FlowCommands now take only 2 parameters. You can either provide 2 parameters where the exitState is a callback:
or 2 parameters where the second parameter is an object with options: