rework debugprint to ts#5074
rework debugprint to ts#5074cnishina merged 7 commits intoangular:selenium4from CrispusDH:debugprint-to-ts
Conversation
|
@cnishina , could you take a look at this PR, please |
|
Reference #5061 |
|
@cnishina any updates? |
cnishina
left a comment
There was a problem hiding this comment.
We might need to also update RunResults. Please see requested changes. Other than that, this looks pretty good.
| import * as util from 'util'; | ||
| import {Logger} from '../logger'; | ||
| import {Runner} from '../runner'; | ||
|
|
There was a problem hiding this comment.
`import {RunResults} from '../taskRunner';
We might need to update the RunResults to be more flexible:
https://github.com/angular/protractor/blob/selenium4/lib/taskRunner.ts#L9
export interface RunResults {
taskId?: number;
specs?: Array<string>;
...
lib/frameworks/debugprint.ts
Outdated
| * @return {Promise} Promise resolved with the test results | ||
| */ | ||
| exports.run = (runner, specs) => { | ||
| export const run = (runner: Runner, specs: Array<string>) => { |
There was a problem hiding this comment.
export const run = (runner: Runner, specs: Array<string>): Promise<RunResults> => {
| failedCount: 0 | ||
| }); | ||
| logger.info(`Resolved spec files: ${util.inspect(specs)}`); | ||
| resolve({failedCount: 0}); |
There was a problem hiding this comment.
Once the changes are made to RunResults you probably do not need to cast. If for some reason there are type errors, you might need to cast this to resolve({failedCount: 0} as RunResults);
|
@cnishina I did not update RunResults. Probably, it is not necessary. |
|
Hmmm I guess not. Awesome! |
No description provided.