-
Notifications
You must be signed in to change notification settings - Fork 323
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
Adds command pa app permission remove
, Closes #4655
#5169
Conversation
Thank you @nicodecleyre! Will try to review it ASAP! |
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.
I've reviewed your PR and found some areas that need attention before we can proceed. Could you have a look at it, please?
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.
Good work on this PR! Before we continue, I think a few changes are needed.
Could you have a look at them, please?
c109385
to
cd28028
Compare
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.
Ready to go! Made a few changes while merging.
} | ||
|
||
public async commandAction(logger: Logger, args: CommandArgs): Promise<void> { | ||
if (this.verbose) { |
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.
Let's move this verbose log to the method that is fired after the prompt is confirmed.
sinon.stub(pid, 'getProcessName').returns(''); | ||
sinon.stub(session, 'getId').returns(''); | ||
auth.service.connected = true; | ||
if (!auth.service.accessTokens[auth.defaultResource]) { |
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.
We should always clear this value when the testing has been done, so let's remove the if and clear it after running the tests.
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.
It's sufficient to just have 1 test where we mock the prompt confirmation to true
. If it works for one option, we can assume it works for all.
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.
We're missing a test where we test if the prompt is actually fired.
Merged manually, great work adding this command! |
Closes #4655