-
Notifications
You must be signed in to change notification settings - Fork 54
@W-11494080@ Fix survey request formatting issue #773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| /** | ||
| * Common steps that should be run before every command | ||
| */ | ||
| protected runCommonSteps(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A place to put common steps so that we don't have to modify each command every time we change things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This being its own method feels excessive. You could just do these things in run() before invoking runInternal()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runCommonSteps() behaves as a hook that would continue to keep run() more readable as the common steps expand.
Also, we may have a subgroup of commands that require to do a variation of the common steps and override it to their convenience. For example, in an abstract class like ScannerRunCommand.
In near future, if we decide to remove the survey link, I'd still recommend leaving the hook with a marker comment on what can possibly be added there.
3d19af0 to
51284f4
Compare
| /** | ||
| * Common steps that should be run before every command | ||
| */ | ||
| protected runCommonSteps(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This being its own method feels excessive. You could just do these things in run() before invoking runInternal()
| expect(ctxJson.result.length).to.equal(0, 'Should be no results'); | ||
| expect(ctxJson.warnings.length).to.equal(1, 'Should be one warning'); | ||
| expect(ctxJson.warnings[0]).to.equal(formattedWarning, 'Warning message should match'); | ||
| expect(ctxJson.warnings.length).to.equal(2, 'Should be one warning'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failure text says "one" instead of "two".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix this
No description provided.