Newer
Older
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
40
/*!
* Piwik - free/libre analytics platform
*
* PivotByDimension UI tests
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
describe("PivotByDimension", function () {
this.timeout(0);
var eventsUrl = "?module=CoreHome&action=index&idSite=1&period=year&date=2012-08-09#/idSite=1&period=year&date=2012-08-09&module=Events&action=index",
actionsUrl = "?module=CoreHome&action=index&idSite=1&period=year&date=2012-08-09#/idSite=1&period=year&date=2012-08-09&module=Actions&action=menuGetPageUrls",
cvarsUrl = "?module=CoreHome&action=index&idSite=1&period=year&date=2012-08-09#/idSite=1&period=year&date=2012-08-09&module=CustomVariables&action=menuGetCustomVariables"
;
it("should pivot a report correctly when the pivot cog option is selected", function (done) {
expect.screenshot('pivoted').to.be.captureSelector('.dataTable,.expandDataTableFooterDrawer', function (page) {
page.load(eventsUrl);
page.click('.dimension:contains(Event Names)');
page.click('.expandDataTableFooterDrawer');
page.mouseMove('.tableConfiguration');
page.click('.dataTablePivotBySubtable');
}, done);
});
it("should not display the pivot option on actions reports", function (done) {
expect.page(actionsUrl).not.contains('.dataTablePivotBySubtable', function () {}, done);
});
it("should display the pivot option on reports that set a custom columns_to_display", function (done) {
expect.screenshot('pivoted_columns_report').to.be.captureSelector('.dataTable,.expandDataTableFooterDrawer', function (page) {
page.load(cvarsUrl);
page.click('.expandDataTableFooterDrawer');
page.mouseMove('.tableConfiguration');
page.click('.dataTablePivotBySubtable');
}, done);
});
});