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

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Aubry <mattab@users.noreply.github.com>2016-12-15 06:45:44 +0300
committerGitHub <noreply@github.com>2016-12-15 06:45:44 +0300
commitd5377a5149e58457a5d064bece11d7d7aaef4b7a (patch)
tree9f3b53621c27f6163d12ca7d6ba7d51ef582ba20
parent8df19d1532ec5e38a0033353cd827795f2737e86 (diff)
parent9786728fa4e4a0373eea0d77c740d82489050f6b (diff)
Merge pull request #11019 from piwik/3.x-dev
Piwik 3.0.0-rc4 release
-rw-r--r--core/Site.php39
-rw-r--r--core/Version.php2
-rw-r--r--core/Widget/WidgetContainerConfig.php10
-rw-r--r--plugins/API/ProcessedReport.php2
-rw-r--r--plugins/CoreAdminHome/lang/en.json4
-rw-r--r--plugins/SegmentEditor/javascripts/Segmentation.js44
-rw-r--r--plugins/TestRunner/Commands/SyncScreenshots.php4
-rw-r--r--plugins/UserCountryMap/javascripts/visitor-map.js22
-rw-r--r--tests/PHPUnit/Fixtures/UITestFixture.php3
-rw-r--r--tests/PHPUnit/Integration/SiteTest.php81
-rw-r--r--tests/PHPUnit/Unit/Widget/WidgetContainerConfigTest.php18
-rw-r--r--tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png4
-rw-r--r--tests/UI/expected-screenshots/ActionsDataTable_flattened.png4
-rw-r--r--tests/UI/expected-screenshots/ActionsDataTable_unflattened.png4
-rw-r--r--tests/UI/expected-screenshots/MeasurableManager_add_measurable_view.png4
-rw-r--r--tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_dialog.png4
-rw-r--r--tests/UI/expected-screenshots/SegmentSelectorEditorTest_dimension_drag_drop.png4
-rw-r--r--tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_and_condition.png4
-rw-r--r--tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_or_condition.png4
-rw-r--r--tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png4
-rw-r--r--tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_details.png4
-rw-r--r--tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_reload.png4
-rw-r--r--tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png4
-rw-r--r--tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png4
-rw-r--r--tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_reload.png4
-rw-r--r--tests/UI/expected-screenshots/Theme_demo.png4
-rw-r--r--tests/UI/expected-screenshots/ViewDataTableTest_12_aggregate_shown.png4
-rw-r--r--tests/UI/specs/Overlay_spec.js2
-rw-r--r--tests/UI/specs/Theme_spec.js2
29 files changed, 224 insertions, 73 deletions
diff --git a/core/Site.php b/core/Site.php
index 97381cab04..78e010bf7e 100644
--- a/core/Site.php
+++ b/core/Site.php
@@ -55,20 +55,33 @@ class Site
*/
protected static $infoSites = array();
+ private $site = array();
+
/**
* Constructor.
*
* @param int $idsite The ID of the site we want data for.
+ * @throws UnexpectedWebsiteFoundException
*/
public function __construct($idsite)
{
- $this->id = (int)$idsite;
- if (!isset(self::$infoSites[$this->id])) {
+ $this->id = (int) $idsite;
+
+ if (!empty(self::$infoSites[$this->id])) {
+ $site = self::$infoSites[$this->id];
+ } else {
$site = API::getInstance()->getSiteFromId($this->id);
- $sites = array(&$site);
- self::triggerSetSitesEvent($sites);
- self::setSiteFromArray($this->id, $site);
+
+ if (empty($site)) {
+ throw new UnexpectedWebsiteFoundException('The requested website id = ' . (int)$this->id . ' couldn\'t be found');
+ }
}
+
+ $sites = array(&$site);
+ self::triggerSetSitesEvent($sites);
+ self::setSiteFromArray($this->id, $site);
+
+ $this->site = $site;
}
/**
@@ -251,19 +264,11 @@ class Site
*/
protected function get($name)
{
- if (!isset(self::$infoSites[$this->id])) {
- $site = API::getInstance()->getSiteFromId($this->id);
-
- if (empty($site)) {
- throw new UnexpectedWebsiteFoundException('The requested website id = ' . (int)$this->id . ' couldn\'t be found');
- }
-
- self::setSiteFromArray($this->id, $site);
+ if (isset($this->site[$name])) {
+ return $this->site[$name];
}
- if (!isset(self::$infoSites[$this->id][$name])) {
- throw new Exception("The property $name could not be found on the website ID " . (int)$this->id);
- }
- return self::$infoSites[$this->id][$name];
+
+ throw new Exception("The property $name could not be found on the website ID " . (int)$this->id);
}
/**
diff --git a/core/Version.php b/core/Version.php
index b427fd2298..3f8ba3758d 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -20,7 +20,7 @@ final class Version
* The current Piwik version.
* @var string
*/
- const VERSION = '3.0.0-rc3';
+ const VERSION = '3.0.0-rc4';
public function isStableVersion($version)
{
diff --git a/core/Widget/WidgetContainerConfig.php b/core/Widget/WidgetContainerConfig.php
index 258d182ab4..ffbb028cd7 100644
--- a/core/Widget/WidgetContainerConfig.php
+++ b/core/Widget/WidgetContainerConfig.php
@@ -96,6 +96,16 @@ class WidgetContainerConfig extends WidgetConfig
}
/**
+ * Set (overwrite) widget configs.
+ *
+ * @param WidgetConfig[] $configs
+ */
+ public function setWidgetConfigs($configs)
+ {
+ $this->widgets = $configs;
+ }
+
+ /**
* Get all added widget configs.
*
* @return WidgetConfig[]
diff --git a/plugins/API/ProcessedReport.php b/plugins/API/ProcessedReport.php
index d4fc8b7cba..b37bd7ea51 100644
--- a/plugins/API/ProcessedReport.php
+++ b/plugins/API/ProcessedReport.php
@@ -197,7 +197,7 @@ class ProcessedReport
* For example, Goals reports depend on the site IDs being
* request. Contains the following information:
*
- * - **idSites**: The array of site IDs we are getting reports for.
+ * - **idSite**: The site ID we are getting reports for.
* - **period**: The period type, eg, `'day'`, `'week'`, `'month'`,
* `'year'`, `'range'`.
* - **date**: A string date within the period or a date range, eg,
diff --git a/plugins/CoreAdminHome/lang/en.json b/plugins/CoreAdminHome/lang/en.json
index a5ee59a280..8047345eb4 100644
--- a/plugins/CoreAdminHome/lang/en.json
+++ b/plugins/CoreAdminHome/lang/en.json
@@ -45,7 +45,7 @@
"JSTracking_VisitorCustomVarsDesc": "For example, with variable name \"Type\" and value \"Customer\".",
"JSTrackingIntro1": "You can track visitors to your website many different ways. The recommended way to do it is through JavaScript. To use this method you must make sure every webpage of your website has some JavaScript code, which you can generate here.",
"JSTrackingIntro2": "Once you have the JavaScript tracking code for your website, copy and paste it to all the pages you want to track with Piwik.",
- "JSTrackingIntro3": "In most websites, blogs, CMS, etc. you can use a pre-made plugin to do the technical work for you. (See our %1$slist of plugins used to integrate Piwik%2$s.) If no plugin exists you can edit your website templates and add this code in the \"footer\" file.",
+ "JSTrackingIntro3": "In most websites, blogs, CMS, etc. you can use a pre-made plugin to do the technical work for you. (See our %1$slist of plugins used to integrate Piwik%2$s.) If no plugin exists you can edit your website templates and add this code to the \"header\" file.",
"JSTrackingIntro4": "If you don't want to use JavaScript to track visitors, %1$sgenerate an image tracking link below%2$s.",
"JSTrackingIntro5": "If you want to do more than track page views, please check out the %1$sPiwik Javascript Tracking documentation%2$s for the list of available functions. Using these functions you can track goals, custom variables, ecommerce orders, abandoned carts and more.",
"LogoNotWriteableInstruction": "To use your custom logo instead of the default Piwik logo, give write permission to this directory: %1$s Piwik needs write access for your logos stored in the files %2$s.",
@@ -96,4 +96,4 @@
"ProtocolNotDetectedCorrectly": "You are currently viewing Piwik over a secure SSL connection (using https), but Piwik could only detect a non secure connection on the server. ",
"ProtocolNotDetectedCorrectlySolution": "To make sure Piwik securely requests and serves your content over HTTPS, you may edit your %1$s file and either configure your proxy settings, or you may add the line %2$s below the %3$s section. %4$sLearn more%5$s"
}
-} \ No newline at end of file
+}
diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js
index 7930ae8c0e..88596ea184 100644
--- a/plugins/SegmentEditor/javascripts/Segmentation.js
+++ b/plugins/SegmentEditor/javascripts/Segmentation.js
@@ -271,7 +271,8 @@ Segmentation = (function($) {
if( checkSelected == self.currentSegmentStr
|| checkSelected == decodeURIComponent(self.currentSegmentStr)
- || checkSelected == decodeURIComponent(decodeURIComponent(self.currentSegmentStr))){
+ || checkSelected == unescape(decodeURIComponent(self.currentSegmentStr))
+ ) {
injClass = 'class="segmentSelected"';
}
listHtml += '<li data-idsegment="'+segment.idsegment+'" data-definition="'+ (segment.definition).replace(/"/g, '&quot;') +'" '
@@ -1274,10 +1275,41 @@ $(document).ready(function() {
}
var self = this;
- this.changeSegment = function(segmentDefinition) {
+
+ this.uriEncodeSegmentDefinition = function (segmentDefinition) {
segmentDefinition = cleanupSegmentDefinition(segmentDefinition);
segmentDefinition = encodeURIComponent(segmentDefinition);
+ return segmentDefinition;
+ };
+
+ this.changeSegment = function(segmentDefinition) {
+ if (piwikHelper.isAngularRenderingThePage()) {
+ segmentDefinition = this.uriEncodeSegmentDefinition(segmentDefinition);
+
+ angular.element(document).injector().invoke(function ($location, $rootScope) {
+ var $search = $location.search();
+
+ if (segmentDefinition !== $search.segment) {
+ // eg when using back button the date might be actually already changed in the URL and we do not
+ // want to change the URL again
+ $search.segment = segmentDefinition.replace(/%$/, '%25').replace(/%([^\d].)/g, "%25$1");
+ $location.search($search);
+ setTimeout(function () {
+ try {
+ $rootScope.$apply();
+ } catch (e) {}
+ }, 1);
+ }
+
+ });
+ return false;
+ } else {
+ return this.forceSegmentReload(segmentDefinition);
+ }
+ };
+ this.forceSegmentReload = function (segmentDefinition) {
+ segmentDefinition = this.uriEncodeSegmentDefinition(segmentDefinition);
return broadcast.propagateNewPage('segment=' + segmentDefinition, true);
};
@@ -1311,7 +1343,7 @@ $(document).ready(function() {
self.impl.markCurrentSegment();
self.$element.find('a.close').click();
- self.changeSegment(params.definition);
+ self.forceSegmentReload(params.definition);
self.changeSegmentList(self.props.availableSegments);
}
@@ -1349,7 +1381,7 @@ $(document).ready(function() {
self.impl.markCurrentSegment();
self.$element.find('a.close').click();
- self.changeSegment(params.definition);
+ self.forceSegmentReload(params.definition);
self.changeSegmentList(self.props.availableSegments);
}
@@ -1387,7 +1419,7 @@ $(document).ready(function() {
self.rebuild();
self.$element.find('a.close').click();
- self.changeSegment('');
+ self.forceSegmentReload('');
$('.ui-dialog-content').dialog('close');
@@ -1431,7 +1463,7 @@ $(document).ready(function() {
"addMethod": addSegment,
"updateMethod": updateSegment,
"deleteMethod": deleteSegment,
- "segmentSelectMethod": function () { self.changeSegment.apply(this, arguments); },
+ "segmentSelectMethod": function () { self.changeSegment.apply(self, arguments); },
"currentSegmentStr": segmentFromRequest,
"translations": this.props.segmentTranslations
});
diff --git a/plugins/TestRunner/Commands/SyncScreenshots.php b/plugins/TestRunner/Commands/SyncScreenshots.php
index fe032c1fe7..b0f7616598 100644
--- a/plugins/TestRunner/Commands/SyncScreenshots.php
+++ b/plugins/TestRunner/Commands/SyncScreenshots.php
@@ -85,7 +85,7 @@ class SyncScreenshots extends ConsoleCommand
$response = Http::sendHttpRequest(
$url,
- $timeout = 60,
+ $timeout = 160,
$userAgent = null,
$destinationPath = null,
$followDepth = 0,
@@ -116,7 +116,7 @@ class SyncScreenshots extends ConsoleCommand
Http::sendHttpRequest(
$url,
- $timeout = 60,
+ $timeout = 160,
$userAgent = null,
$downloadTo,
$followDepth = 0,
diff --git a/plugins/UserCountryMap/javascripts/visitor-map.js b/plugins/UserCountryMap/javascripts/visitor-map.js
index 07b5710259..a3bc0041b7 100644
--- a/plugins/UserCountryMap/javascripts/visitor-map.js
+++ b/plugins/UserCountryMap/javascripts/visitor-map.js
@@ -517,8 +517,10 @@
}
}
- // Apply the color scale to the map.
- map.getLayer('countries')
+ var countryLayer = map.getLayer('countries');
+ if(countryLayer) {
+ // Apply the color scale to the map.
+ countryLayer
.style('fill', countryFill)
.on('mouseenter', function (d, path, evt) {
if (evt.shiftKey) { // highlight on mouseover with shift pressed
@@ -531,13 +533,15 @@
}
});
- // Update the map tooltips.
- map.getLayer('countries').tooltips(function (data) {
- var metric = $$('.userCountryMapSelectMetrics').val(),
- country = UserCountryMap.countriesByIso[data.iso];
- return '<h3>' + country.name + '</h3>' +
- formatValueForTooltips(country, metric, target);
- });
+ // Update the map tooltips.
+ countryLayer.tooltips(function (data) {
+ var metric = $$('.userCountryMapSelectMetrics').val(),
+ country = UserCountryMap.countriesByIso[data.iso];
+ return '<h3>' + country.name + '</h3>' +
+ formatValueForTooltips(country, metric, target);
+ });
+ }
+
}
// if the view hasn't changed (but probably the selected metric),
diff --git a/tests/PHPUnit/Fixtures/UITestFixture.php b/tests/PHPUnit/Fixtures/UITestFixture.php
index 7b7517a14f..403abac8d5 100644
--- a/tests/PHPUnit/Fixtures/UITestFixture.php
+++ b/tests/PHPUnit/Fixtures/UITestFixture.php
@@ -17,6 +17,7 @@ use Piwik\Db;
use Piwik\DbHelper;
use Piwik\FrontController;
use Piwik\Option;
+use Piwik\Piwik;
use Piwik\Plugins\PrivacyManager\IPAnonymizer;
use Piwik\Plugins\SegmentEditor\API as APISegmentEditor;
use Piwik\Plugins\UserCountry\LocationProvider;
@@ -231,7 +232,7 @@ class UITestFixture extends SqlDump
$oldGet = $_GET;
$_GET['idSite'] = 1;
- $_GET['token_auth'] = Fixture::getTokenAuth();
+ $_GET['token_auth'] = Piwik::getCurrentUserTokenAuth();
// collect widgets & sort them so widget order is not important
$allWidgets = Request::processRequest('API.getWidgetMetadata', array(
diff --git a/tests/PHPUnit/Integration/SiteTest.php b/tests/PHPUnit/Integration/SiteTest.php
new file mode 100644
index 0000000000..498884d681
--- /dev/null
+++ b/tests/PHPUnit/Integration/SiteTest.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+namespace Piwik\Tests\Integration;
+
+use Piwik\Piwik;
+use Piwik\Plugins\SitesManager\API;
+use Piwik\Site;
+use Piwik\Tests\Framework\Fixture;
+use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
+
+/**
+ * @group Core
+ */
+class SiteTest extends IntegrationTestCase
+{
+ private $idSite;
+
+ public $siteAppendix = ' foo';
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->idSite = Fixture::createWebsite('2014-01-02 03:04:05');
+
+ $self = $this;
+
+ Piwik::addAction('Site.setSites', function (&$sites) use ($self) {
+ foreach ($sites as &$site) {
+ if (strpos($site['name'], $self->siteAppendix) !== 0) {
+ $site['name'] .= $self->siteAppendix;
+ }
+ }
+ });
+ }
+
+ /**
+ * @expectedException \Piwik\Exception\UnexpectedWebsiteFoundException
+ * @expectedExceptionMessage An unexpected website was found in the request
+ */
+ public function test_constructor_throwsException_ifSiteDoesNotExist()
+ {
+ $this->makeSite(9999);
+ }
+
+ public function test_constructor_enrichesSite()
+ {
+ $site = $this->makeSite($this->idSite);
+ $this->assertSame('Piwik test' . $this->siteAppendix, $site->getName());
+ }
+
+ public function test_construct_enrichesSiteEvenIfSiteWasSetToCachePreviously()
+ {
+ $site = API::getInstance()->getSiteFromId($this->idSite);
+ Site::setSiteFromArray($this->idSite, $site);
+
+ $site = $this->makeSite($this->idSite);
+ $this->assertSame('Piwik test' . $this->siteAppendix, $site->getName());
+ }
+
+ public function test_construct_whenRemovingSiteFromGlobalSitesArray_TheObjectItselfStillworks()
+ {
+ $site = $this->makeSite($this->idSite);
+ $this->assertSame('Piwik test' . $this->siteAppendix, $site->getName());
+
+ Site::clearCache();
+
+ $this->assertSame('Piwik test' . $this->siteAppendix, $site->getName());
+ $this->assertSame(array(), Site::getSites()); // make sure data was not fetched again
+ }
+
+ private function makeSite($idSite)
+ {
+ return new Site($idSite);
+ }
+}
diff --git a/tests/PHPUnit/Unit/Widget/WidgetContainerConfigTest.php b/tests/PHPUnit/Unit/Widget/WidgetContainerConfigTest.php
index 7a2d3fedae..8e834934d6 100644
--- a/tests/PHPUnit/Unit/Widget/WidgetContainerConfigTest.php
+++ b/tests/PHPUnit/Unit/Widget/WidgetContainerConfigTest.php
@@ -270,6 +270,24 @@ class WidgetContainerConfigTest extends \PHPUnit_Framework_TestCase
), $this->config->getWidgetConfigs());
}
+ public function test_setWidgetConfigs_canOverwriteWidgets()
+ {
+ $this->assertSame(array(), $this->config->getWidgetConfigs());
+
+ $this->config->addWidgetConfig($widget1 = $this->createWidgetConfig('widget1'));
+ $this->config->addWidgetConfig($widget2 = $this->createWidgetConfig('widget2'));
+ $this->assertSame(array($widget1,$widget2), $this->config->getWidgetConfigs());
+
+ $widget3 = $this->createWidgetConfig('widget3');
+ $widget4 = new WidgetContainerConfig();
+ $this->config->setWidgetConfigs(array($widget2, $widget3, $widget4));
+ $this->assertSame(array(
+ $widget2,
+ $widget3,
+ $widget4
+ ), $this->config->getWidgetConfigs());
+ }
+
private function createWidgetConfig($widgetName)
{
$config = new WidgetConfig();
diff --git a/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png b/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png
index 7997df77b0..4740073997 100644
--- a/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png
+++ b/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:0999cd61bcce57fe3453611102d841e15d90d8af103e0dba00a47638ce16b889
-size 34110
+oid sha256:da1db467a8bbc45b3a2e9ce95f107a3c713ee92f8d5dfe8b49944a5c23775a41
+size 75675
diff --git a/tests/UI/expected-screenshots/ActionsDataTable_flattened.png b/tests/UI/expected-screenshots/ActionsDataTable_flattened.png
index 537fbb7573..556117b6ef 100644
--- a/tests/UI/expected-screenshots/ActionsDataTable_flattened.png
+++ b/tests/UI/expected-screenshots/ActionsDataTable_flattened.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:1002e0d2d99b5eab85b05cef9a8a421d1cb7cf04c9da25ea6a7543afc490ed4b
-size 460911
+oid sha256:34730a4c9f17b4275060578d9fe1cbaec47a80a408d1740af144fe6ae6fe1706
+size 473965
diff --git a/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png b/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png
index b531efc68e..eb6eaf5f2f 100644
--- a/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png
+++ b/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:af948fd79ca8d47539b1a5e0ca87be0a66822a6f2c6bfe877661d616c3f037df
-size 57594
+oid sha256:e531838635df4fcb3eacf0c50996ccabd6cb3d10d6fb5111b8e5bff0ac26e332
+size 57382
diff --git a/tests/UI/expected-screenshots/MeasurableManager_add_measurable_view.png b/tests/UI/expected-screenshots/MeasurableManager_add_measurable_view.png
index 9cf685119a..7f27f96eed 100644
--- a/tests/UI/expected-screenshots/MeasurableManager_add_measurable_view.png
+++ b/tests/UI/expected-screenshots/MeasurableManager_add_measurable_view.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:33eb462f5935f7cb533446ae5d186c7d2c0458612eb9a5389a79fa792260ec20
-size 429891
+oid sha256:743b8d4260a5f7759ef5965a4313f7e4224035bb7a186c2db3ecad6876d8aabf
+size 429673
diff --git a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_dialog.png b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_dialog.png
index 9ad2ecee25..a9f7b5e861 100644
--- a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_dialog.png
+++ b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_dialog.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4aef06fd5a18355693a9dd414da9d8afc1286073ac9b182da0b5381ca190db61
-size 8367
+oid sha256:9655da5134da6faa4fe83d724f3082ef1e561a18984fb22e31f7ef80e061f5c2
+size 8368
diff --git a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_dimension_drag_drop.png b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_dimension_drag_drop.png
index c7b010fd40..92f6acedd6 100644
--- a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_dimension_drag_drop.png
+++ b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_dimension_drag_drop.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:41d5c6ee8682ef3897e2755eefec4dda16eb776df2abcfb0b8ab7b8cf5cd4fb6
-size 46932
+oid sha256:f70824336d7d9c0a1c8a14a7403b6db3f58da8d43a0c27bc6b29bc81e443eb8f
+size 46992
diff --git a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_and_condition.png b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_and_condition.png
index 60a7754879..75b8683897 100644
--- a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_and_condition.png
+++ b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_and_condition.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:2e9dd815db59ec90daec51a9d00ed99178e81d3d7092717a6ec657a9a42bd2d9
-size 72354
+oid sha256:1d2128e676dc819478dc335cf3bf0dba57d319253c63db395b1c31ed9a17469b
+size 72886
diff --git a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_or_condition.png b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_or_condition.png
index e14e078cb3..72bf4942cb 100644
--- a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_or_condition.png
+++ b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_or_condition.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:27309c2f25449fe677cd9b08ac5da3c63d24e8e2dc9f534d12bcf49df60e5843
-size 55681
+oid sha256:cafa8d1220332631af64551a1fedf0c53465143fce357dd52e380ee59be07b97
+size 55733
diff --git a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png
index 1b58e18a7f..a127cc1de8 100644
--- a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png
+++ b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4e8587632885c96c3724139138b53c3312b8e88a3c9aa5601adf9f804c43c29d
-size 17711
+oid sha256:2cc95675231eebaa66d97bc5b23cecf8ad6cf688a68b0b4127d82cb3f25a2f46
+size 17406
diff --git a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_details.png b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_details.png
index feae962dd4..405309fdbd 100644
--- a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_details.png
+++ b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_details.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:be01ac50440e82eae133586a3a8e24cd5f4bede3e10b98059bf9936ee5abfece
-size 59110
+oid sha256:ca5729bb552eb7b66a2560350440cc011fc5a8cf6deff2b40d29cafb64720058
+size 59151
diff --git a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_reload.png b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_reload.png
index 1b58e18a7f..a127cc1de8 100644
--- a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_reload.png
+++ b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_reload.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4e8587632885c96c3724139138b53c3312b8e88a3c9aa5601adf9f804c43c29d
-size 17711
+oid sha256:2cc95675231eebaa66d97bc5b23cecf8ad6cf688a68b0b4127d82cb3f25a2f46
+size 17406
diff --git a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png
index 574efc3106..ab1f78f5a7 100644
--- a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png
+++ b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e83d070472b21ab34d9dd1ea5b6d6d0503575f48a8c7088bc463a57868198d99
-size 17684
+oid sha256:a8c00557145a34fc48374e5315f0e9c42618aaa7266295682f2778897a79c17b
+size 17110
diff --git a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png
index b3729ee931..239a6fda47 100644
--- a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png
+++ b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4649440c0d3b0d832b7e8134816ace5df728f162b49abfc41470146d5af3800e
-size 61406
+oid sha256:a42b505a2246f54f55189c2ca8e78e44fb027accd0dd7b7b9dbc044d183c931b
+size 61411
diff --git a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_reload.png b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_reload.png
index b1d743c4cd..ab1f78f5a7 100644
--- a/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_reload.png
+++ b/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_reload.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a0a4c3bd7e42558eaf5ebe40693845d2e3954ab84bc6ce3cce5e3cf6b0e7d326
-size 17801
+oid sha256:a8c00557145a34fc48374e5315f0e9c42618aaa7266295682f2778897a79c17b
+size 17110
diff --git a/tests/UI/expected-screenshots/Theme_demo.png b/tests/UI/expected-screenshots/Theme_demo.png
index 67496e76ab..14dd153fd6 100644
--- a/tests/UI/expected-screenshots/Theme_demo.png
+++ b/tests/UI/expected-screenshots/Theme_demo.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d2a4ba81d3dfa658279c2edc483fa3529c00353d6eaab60434b598ddc84a10c7
-size 1151389
+oid sha256:5f9eb743a3d2aa85938ac1bfbd25a236fdaea36e49fcbe0daa456b1310d1c30b
+size 1151342
diff --git a/tests/UI/expected-screenshots/ViewDataTableTest_12_aggregate_shown.png b/tests/UI/expected-screenshots/ViewDataTableTest_12_aggregate_shown.png
index 80b2c8730b..fb947262e4 100644
--- a/tests/UI/expected-screenshots/ViewDataTableTest_12_aggregate_shown.png
+++ b/tests/UI/expected-screenshots/ViewDataTableTest_12_aggregate_shown.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:1cb7d45eabca181f966428cbe80350989d2d790132f4bee191cf0e2d23a65980
-size 40615
+oid sha256:44a3fbe7628cb93eeddafd3d4efb8a1d538c2c1ef40d74343c53311c37c182d2
+size 51194
diff --git a/tests/UI/specs/Overlay_spec.js b/tests/UI/specs/Overlay_spec.js
index 53888b14ac..a0a7eb38dc 100644
--- a/tests/UI/specs/Overlay_spec.js
+++ b/tests/UI/specs/Overlay_spec.js
@@ -69,7 +69,7 @@ describe("Overlay", function () {
});
it("should show stats for new links when dropdown opened", function (done) {
- expect.screenshot("page_new_links").to.be.capture(function (page) {
+ expect.screenshot("page_new_links").to.be.similar(0.002).to.be.capture(function (page) {
var pos = page.webpage.evaluate(function () {
var iframe = $('iframe'),
innerOffset = $('.dropdown-toggle', iframe.contents()).offset();
diff --git a/tests/UI/specs/Theme_spec.js b/tests/UI/specs/Theme_spec.js
index eb9b9dfff3..93e56fcadc 100644
--- a/tests/UI/specs/Theme_spec.js
+++ b/tests/UI/specs/Theme_spec.js
@@ -40,7 +40,7 @@ describe("Theme", function () {
});
it("should theme the UI demo page", function (done) {
- expect.screenshot("demo").to.be.capture(function (page) {
+ expect.screenshot("demo").to.be.similar(0.002).to.be.capture(function (page) {
page.load("?module=Morpheus&action=demo");
}, done);
});