on xenial help sign in
Fix 2 failing color-related tests
5ca186eLukáš Tinkl
tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml+1−1
@@ -409,7 +409,7 @@ Item {
409 menuData.sensitive = data.enabled;
409 menuData.sensitive = data.enabled;
410 menuData.icon = data.icon;
410 menuData.icon = data.icon;
411 menuData.ext = {
411 menuData.ext = {
412− 'xCanonicalColor': data.colour,
412+ 'xCanonicalColor': data.color,
413 'xCanonicalTime': data.time.getTime() / 1000 // expected in seconds
413 'xCanonicalTime': data.time.getTime() / 1000 // expected in seconds
414 };
414 };
415
415
tests/qmltests/Panel/tst_IndicatorItem.qml+4−3
@@ -190,9 +190,10 @@ Rectangle {
190
190
191 indicatorItem.expanded = true;
191 indicatorItem.expanded = true;
192 tryCompare(findChild(indicatorItem, "icon0"), "color", theme.palette.disabled.backgroundText);
192 tryCompare(findChild(indicatorItem, "icon0"), "color", theme.palette.disabled.backgroundText);
193+ // WORKAROUND for a Qt bug in comparing colors: https://bugs.launchpad.net/ubuntu/+source/qtdeclarative-opensource-src/+bug/1619281
193− tryCompare(findChild(indicatorItem, "leftLabel"), "color", theme.palette.disabled.backgroundText);
194+ fuzzyCompare(findChild(indicatorItem, "leftLabel").color, theme.palette.disabled.backgroundText, 0.001);
194− tryCompare(findChild(indicatorItem, "rightLabel"), "color", theme.palette.disabled.backgroundText);
195+ fuzzyCompare(findChild(indicatorItem, "rightLabel").color, theme.palette.disabled.backgroundText, 0.001);
195− tryCompare(findChild(indicatorItem, "indicatorName"), "color", theme.palette.disabled.backgroundText);
196+ fuzzyCompare(findChild(indicatorItem, "indicatorName").color, theme.palette.disabled.backgroundText, 0.001);
196
197
197 indicatorItem.selected = true;
198 indicatorItem.selected = true;
198 tryCompare(findChild(indicatorItem, "icon0"), "color", theme.palette.normal.backgroundText);
199 tryCompare(findChild(indicatorItem, "icon0"), "color", theme.palette.normal.backgroundText);