Skip to content
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

Fixes #7859, add image graph UI tests. #7870

Merged
merged 6 commits into from May 10, 2015
Merged

Conversation

diosmosis
Copy link
Member

#7859

This PR adds UI tests for the ImageGraph plugin. It also includes an addition to the UI test system that allows UI tests to compare if images are similar (for some comparison threshold), rather than exactly the same.

@diosmosis diosmosis added the Needs Review PRs that need a code review label May 9, 2015
@diosmosis diosmosis added this to the 2.14.0 milestone May 9, 2015
@mnapoli
Copy link
Contributor

mnapoli commented May 10, 2015

👍 I think there are merge conflicts because of the UI tests submodule

Regarding .to.be.similar(.95)… do you think it would make sense to hardcode 95% in the function instead of providing it every time? E.g. this instead: .to.be.similar()…. Also this is necessary because those screenshots are not reliable?

@diosmosis
Copy link
Member Author

Regarding .to.be.similar(.95)… do you think it would make sense to hardcode 95% in the function instead of providing it every time?

I think it's clearer to specify the percent similarity required. It could default to 95%, but the number's pretty arbitrary, I just threw it in there because I knew the tests would pass w/ it.

Also this is necessary because those screenshots are not reliable?

ImageGraph uses php-gd, and different versions of php-gd render differently (though very slightly). This is why we disable sparklines in UI tests.

diosmosis added a commit that referenced this pull request May 10, 2015
Fixes #7859, add image graph UI tests. Includes new chainable chai method that allows testing whether a screenshot is similar to a capture (within a certain %).
@diosmosis diosmosis merged commit 2ce341d into master May 10, 2015
@diosmosis diosmosis deleted the ImageGraph_ui_tests branch May 10, 2015 21:27
@diosmosis diosmosis added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label May 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants