Skip to content
Extraits de code Groupes Projets
Valider f17a3c12 rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

Merge pull request #9472 from piwik/7219

Fixes calculation of fillup columns for subtables
parents fc3d13d7 25b43c1a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -318,7 +318,12 @@ ...@@ -318,7 +318,12 @@
$('tr#' + idToReplace, root).after(response).remove(); $('tr#' + idToReplace, root).after(response).remove();
var missingColumns = (response.prev().find('td').size() - response.find('td').size()); var requiredColumnCount = 0, availableColumnCount = 0;
response.prev().find('td').each(function(){ requiredColumnCount += $(this).attr('colspan') || 1; });
response.find('td').each(function(){ availableColumnCount += $(this).attr('colspan') || 1; });
var missingColumns = requiredColumnCount - availableColumnCount;
for (var i = 0; i < missingColumns; i++) { for (var i = 0; i < missingColumns; i++) {
// if the subtable has fewer columns than the parent table, add some columns. // if the subtable has fewer columns than the parent table, add some columns.
// this happens for example, when the parent table has performance metrics and the subtable doesn't. // this happens for example, when the parent table has performance metrics and the subtable doesn't.
......
...@@ -38,8 +38,7 @@ describe("ActionsDataTable", function () { ...@@ -38,8 +38,7 @@ describe("ActionsDataTable", function () {
}, done); }, done);
}); });
// Test is skipped as it randomly fails http://builds-artifacts.piwik.org/ui-tests.master/2433.1/screenshot-diffs/diffviewer.html it("should exclude low population rows when exclude low population link clicked", function (done) {
it.skip("should exclude low population rows when exclude low population link clicked", function (done) {
expect.screenshot('exclude_low_population').to.be.capture(function (page) { expect.screenshot('exclude_low_population').to.be.capture(function (page) {
page.mouseMove('.tableConfiguration'); page.mouseMove('.tableConfiguration');
page.click('.dataTableExcludeLowPopulation'); page.click('.dataTableExcludeLowPopulation');
...@@ -48,10 +47,6 @@ describe("ActionsDataTable", function () { ...@@ -48,10 +47,6 @@ describe("ActionsDataTable", function () {
it("should load normal view when switch to view hierarchical view link is clicked", function (done) { it("should load normal view when switch to view hierarchical view link is clicked", function (done) {
expect.screenshot('unflattened').to.be.capture(function (page) { expect.screenshot('unflattened').to.be.capture(function (page) {
// exclude low population (copied from exclude_low_population test above as it was 'skipped')
page.mouseMove('.tableConfiguration');
page.click('.dataTableExcludeLowPopulation');
page.mouseMove('.tableConfiguration'); page.mouseMove('.tableConfiguration');
page.click('.dataTableFlatten'); page.click('.dataTableFlatten');
}, done); }, done);
......
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