Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PieGraph_spec.js « specs « UI « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c1b498c65af6305324c91ae7273fd8ca556e4d2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*!
 * Piwik - free/libre analytics platform
 *
 * Pie graph screenshot tests.
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */

describe("PieGraph", function () {
    this.timeout(0);

    var url = "?module=Widgetize&action=iframe&moduleToWidgetize=Referrers&idSite=1&period=year&date=2012-08-09&"
            + "actionToWidgetize=getKeywords&viewDataTable=graphPie&isFooterExpandedInDashboard=1";

    it("should load correctly", function (done) {
        expect.screenshot("load").to.be.capture(function (page) {
            page.load(url);
        }, done);
    });

    it("should show tooltip on hover", function (done) {
        expect.screenshot("pie_segment_tooltip").to.be.capture(function (page) {
            page.mouseMove('.piwik-graph');
        }, done);
    });

    it("should display the metric picker on hover of metric picker icon", function (done) {
        expect.screenshot('metric_picker_shown').to.be.capture(function (page) {
            page.mouseMove('.jqplot-seriespicker');
        }, done);
    });

    it("should change displayed metric when another metric picked", function (done) {
        expect.screenshot('other_metric').to.be.capture(function (page) {
            page.click('.jqplot-seriespicker-popover input:not(:checked):first + label');
        }, done);
    });
});