Skip to content
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

Added support for user define custom actions #376

Merged
merged 9 commits into from
Dec 14, 2021
Merged

Conversation

AndreasArvidsson
Copy link
Member

No description provided.

@AndreasArvidsson AndreasArvidsson changed the title Added support for custom command actions Added support for user define custom actions Dec 9, 2021
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with some minor comments

src/actions/CommandAction.ts Outdated Show resolved Hide resolved
src/actions/CommandAction.ts Outdated Show resolved Hide resolved
src/actions/index.ts Outdated Show resolved Hide resolved
@pokey pokey added this to the 0.24.0 milestone Dec 12, 2021
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but could use a couple tests for the new executeCommand, esp exercising a couple args such as restoreSelection

@AndreasArvidsson
Copy link
Member Author

Paste and copy use restore selection so already tested that way. I can add some more if you like?

@pokey
Copy link
Member

pokey commented Dec 14, 2021

Paste and copy use restore selection so already tested that way. I can add some more if you like?

Just meant having a couple tests which use executeCommand. If I'm not mistaken, there are no tests for that action, right? Just have tests for actions which use the internal base class CommandAction

@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Dec 14, 2021

I added a test for a custom command. More than that I don't know how to do. We do not support different arguments in custom command csv yet and none of the makeshift actions do anything that our test recorder can use.

I guess I can hand craft a test case?

Edit: I think a solved it. You can use define to actually move selection within the same file. Now we have two test cases one that restore selection and one that don't

@AndreasArvidsson AndreasArvidsson merged commit 3a83bdc into main Dec 14, 2021
@AndreasArvidsson AndreasArvidsson deleted the custom_actions branch December 14, 2021 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants