Skip to content

Commit

Permalink
Discard idGoal parameter for row evolution in goal visualizations (ma…
Browse files Browse the repository at this point in the history
…tomo-org#12378)

* Discard idGoal parameter for row evolution in goal visualizations

* Adds UI test
  • Loading branch information
sgiehl authored and InfinityVoid committed Oct 11, 2018
1 parent 603bcfe commit e61c632
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/CoreHome/javascripts/dataTable_rowactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,13 @@ DataTable_RowActions_RowEvolution.prototype.showRowEvolution = function (apiMeth
}
}

if (self.dataTable.jsViewDataTable === 'tableGoals') {
// remove idGoal param, when it's set for goal visualizations
if (extraParams['idGoal']) {
delete(extraParams['idGoal']);
}
}

$.extend(requestParams, extraParams);

var ajaxRequest = new ajaxHelper();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions tests/UI/specs/UIIntegration_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,16 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
}, done);
});

// should load the row evolution [see #11526]
it('should show rov evolution for goal tables', function (done) {
expect.screenshot('goals_individual_row_evolution').to.be.captureSelector('.ui-dialog', function (page) {
page.mouseMove('table.dataTable tbody tr:first-child');
page.mouseMove('a.actionRowEvolution:visible'); // necessary to get popover to display
page.click('a.actionRowEvolution:visible');
page.wait(2000);
}, done);
});

// Events pages
it('should load the Events > index page correctly', function (done) {
expect.screenshot('events_overview').to.be.captureSelector('.pageWrap,.dataTable', function (page) {
Expand Down

0 comments on commit e61c632

Please sign in to comment.