You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
@SwinX I'm interested in contributing support for this. Do you have any idea of the kind of API you'd want for this?
My use case is that my application has multiple themes, and I want to write one .capture() and have it run multiple times based on the theme. Ideally I would be able to decorate .capture() to do this, or I could add a custom command like captureThemes().
@fenduru thank you for your intent! This may be a really nice feature.
I may propose following way to do this:
As you may know gemini has plugins support. Gemini instance is being passed to plugin. You may want to add there some method like addCommand(name, action), where action will be smth like function() {...};.
So we have entry point where command may be added.
Now we need to pass command to suites. This may be done by collecting new commands in some hash at tests-api.js:
varcommands={};
Then in SuiteBuilder constructor we need to add something like:
Seems this is all we need to modify to get custom commands feature. In this implementation you will be able to access all available SuiteBuilder API and other custom commands using this keyword.
If you see a better way please let me know, will be happy to discuss it.
Activity
fenduru commentedon Sep 11, 2015
👍 this would be very useful
fenduru commentedon Oct 29, 2015
@SwinX I'm interested in contributing support for this. Do you have any idea of the kind of API you'd want for this?
My use case is that my application has multiple themes, and I want to write one
.capture()and have it run multiple times based on the theme. Ideally I would be able to decorate.capture()to do this, or I could add a custom command likecaptureThemes().SwinX commentedon Nov 2, 2015
@fenduru thank you for your intent! This may be a really nice feature.
I may propose following way to do this:
As you may know gemini has plugins support. Gemini instance is being passed to plugin. You may want to add there some method like
addCommand(name, action), where action will be smth likefunction() {...};.So we have entry point where command may be added.
Now we need to pass command to suites. This may be done by collecting new commands in some hash at tests-api.js:
Then in SuiteBuilder constructor we need to add something like:
Seems this is all we need to modify to get custom commands feature. In this implementation you will be able to access all available SuiteBuilder API and other custom commands using
thiskeyword.If you see a better way please let me know, will be happy to discuss it.
/cc @j0tunn @sipayRT
fenduru commentedon Nov 2, 2015
@SwinX 👍 I'll try something like that out. Thanks for the guidance