-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Tests background gradient #70
Conversation
It doesn't test whether the steps are correct or whether the correct colors are drawn though? |
Of curse, this will need to rewrite Generator.Canvas code. Would be the next step i will do. Than it´s possible to write new tests. But this one will check if it renders "something" or fails (blank image). Is this ok by now? |
I think the test should first check whether it should even be generating a gradient. For example, if you use an IE<=9 browser, it shouldn't even be drawing a gradient, so it should just pass by not doing anything. Something similar to (which would be lot better done in regexp to be fair... i'll need to update that check in preload.js :->) It could be moved to its own file/module as well. Other than that, so far so good :) |
Ok, will look into this a bit more |
regexp could be: if (/^(-webkit|-o|-moz|-ms|linear)-/.test(background_image)) { |
I updated the tests/preload accordingly. It skips the test now for browsers that don't support gradients |
moved Generate tests into own module and fixed some small things: Will look into color-stops this week (+ add some tests) |
Is this the right way to test gradient generation? Did I miss something?