-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add configurable parameter for blend module to chose image #424
Conversation
This seems to be a problem |
This is the second error. Is it becoue my code messed up with something? |
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.
This is super, thanks for your hard work! I made a suggestion for a specific test to demonstrate this functionality. I hope it makes sense! Great problem solving!
@@ -184,7 +184,7 @@ test('getStep(offset) returns the step at offset distance relative to current st | |||
}); | |||
|
|||
test('toCliString() returns the CLI command for the sequence', function(t) { | |||
t.deepEqual(sequencer.toCliString(), `sequencer -i [PATH] -s "channel channel channel channel channel invert blend" -d '{"channel":"green"}'`, "works correctly"); | |||
t.deepEqual(sequencer.toCliString(), `sequencer -i [PATH] -s "channel channel channel channel channel invert blend" -d '{"channel":"green","offset":-2}'`, "works correctly"); |
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.
Here, perhaps we should introduce a new test for offsets, and we could do a test demonstrating that the default offset and -3
don't return the same result. You can run a sequence that inverts repeatedly a few times, then does blend, and this kind of test should work. You could say -3
isn't the same as -2
, but -4
is the same, you know? And create a new test specifically for this functionality.
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'll think about it and try to add new test soon.
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.
Is there some kind of documentation on how to do tests? It's time consuming by doing a lot of trials, espiecially when I can't run it locally, and each time I have to run in on Travis Ci, becouse there are some errors on the windows.
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.
ah, have you had trouble running tests locally? I think you should be able to with npm test
-- but if you did something like:
t.notDeepEqual(sequencer.toCliString(), `sequencer -i [PATH] -s "invert invert blend" -d '{"channel":"green","offset":-2}'`, "works correctly");
Docs are here: https://github.com/substack/tape
Tutorial: https://ponyfoo.com/articles/testing-javascript-modules-with-tape
But you're right, we should add these to a Testing
section of the README -- would you be interested in adding a section like that? Otherwise I can open an issue for someone new to try it out.
Thanks @KusioDev !! This is going to be awesome.
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 wanted to write test that invert twice first, and then blend.
It saves the first output to variable, change the offset to -3, and re-run drawing the blend.
However, when I run sequencer.run()
after changing the offset, the outuput is set to undefined, and so the test is not correct, becouse I can't read property of .output.src
if output is not set.
Hmm, have you pushed up a commit with this in it? That way we can take a
look and try running it ourselves?
…On Tue, Oct 23, 2018 at 12:24 PM KusioDev ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In test/modules/image-sequencer.js
<#424 (comment)>
:
> @@ -184,7 +184,7 @@ test('getStep(offset) returns the step at offset distance relative to current st
});
test('toCliString() returns the CLI command for the sequence', function(t) {
- t.deepEqual(sequencer.toCliString(), `sequencer -i [PATH] -s "channel channel channel channel channel invert blend" -d '{"channel":"green"}'`, "works correctly");
+ t.deepEqual(sequencer.toCliString(), `sequencer -i [PATH] -s "channel channel channel channel channel invert blend" -d '{"channel":"green","offset":-2}'`, "works correctly");
I wanted to write test that invert twice first, and then blend.
It saves the first output to variable, change the offset to -3, and re-run
drawing the blend.
However, when I run sequencer.run() after changing the offset, the
outuput is set to undefined, and so the test is not correct, becouse I
can't read property of .output.src if output is not set.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#424 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ3grl7-Q5aXYjDzmrhBlG5YjGzw9ks5un0KcgaJpZM4XvP89>
.
|
I did it on different branch so each update won't be send here. I'll send the new version in a minute. |
Hm, interesting, it does seem to be passing? |
Yes, but it doesnt even start the |
It should be working right now 👍 Can you check if everything is ok 😄 |
This looks awesome. Thanks so much!!!!! |
Hi, @KusioDev -- this great addition would be good on the "Overlay" module too, but it doesn't seem to be working there. Would you be interested in trying to debug this? Based on your work in this PR i think it should be pretty easy for you. See it malfunctioning here in the final step: |
Ok, I'll take care of it 😄 |
Oh that's awesome. Thanks!! |
#421
Uploading again.
Last time there was a problem with Travis Ci.