Skip to content

Added support for user define custom actions#376

Merged
AndreasArvidsson merged 9 commits intomainfrom
custom_actions
Dec 14, 2021
Merged

Added support for user define custom actions#376
AndreasArvidsson merged 9 commits intomainfrom
custom_actions

Conversation

@AndreasArvidsson
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/actions/CommandAction.ts Outdated
Comment thread src/actions/CommandAction.ts Outdated
Comment thread src/actions/index.ts Outdated
@pokey pokey added this to the 0.24.0 milestone Dec 12, 2021
Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

@pokey
Copy link
Copy Markdown
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
Copy Markdown
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