Skip to content
Extraits de code Groupes Projets
Valider d1a1cc08 rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Add UI tests for ImageGraph plugin.

parent 61f436b6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
/*!
* Piwik - free/libre analytics platform
*
* ImageGraph plugin screenshot tests.
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
describe("ImageGraph", function () {
this.timeout(0);
function getImageGraphUrl(apiModule, apiAction, graphType, period, date) {
return "index.php?module=API&method=ImageGraph.get&idSite=1&width=500&height=250&apiModule=" + apiModule + "&apiAction=" + apiAction
+ "&graphType=" + graphType + "&period=" + period + "&date=" + date;
}
it("should render evolution graphs correctly", function (done) {
expect.screenshot('evolution_graph').to.be.capture(function (page) {
page.load(getImageGraphUrl('VisitsSummary', 'get', 'evolution', 'month', '2011-06-01,2012-06-01'));
}, done);
});
it("should render horizontal bar graphs correctly", function (done) {
expect.screenshot('horizontal_bar').to.be.capture(function (page) {
page.load(getImageGraphUrl('DevicesDetection', 'getBrowsers', 'horizontalBar', 'year', '2012-01-01'));
}, done);
});
it("should render vertical bar graphs correctly", function (done) {
expect.screenshot('vertical_bar').to.be.capture(function (page) {
page.load(getImageGraphUrl('UserCountry', 'getCountry', 'verticalBar', 'year', '2012-01-01'));
}, done);
});
it("should render pie graphs correctly", function (done) {
expect.screenshot('pie').to.be.capture(function (page) {
page.load(getImageGraphUrl('DevicesDetection', 'getOsVersions', 'pie', 'year', '2012-01-01'));
}, done);
});
});
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter