add importString and refactor (#283)

* add importString and refactor

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* update tests and minor changes

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* update importImage

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
Varun Gupta
2018-06-07 06:51:53 +05:30
committed by Jeffrey Warren
parent 2b07ecdb36
commit a0f7e6c766
6 changed files with 114 additions and 36 deletions

View File

@@ -14,10 +14,7 @@ function DefaultHtmlSequencerUi(_sequencer, options) {
var hash = getUrlHashParameter("steps");
if (hash) {
var stepsFromHash = _sequencer.importStringtoJson(hash);
stepsFromHash.forEach(function eachStep(stepObj) {
_sequencer.addSteps(stepObj.name,stepObj.options);
});
_sequencer.importString(hash);
_sequencer.run();
}
setUrlHashParameter("steps", sequencer.toString());