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
path: root/tests
diff options
context:
space:
mode:
authorMatthieu Aubry <mattab@users.noreply.github.com>2017-05-15 08:11:25 +0300
committerGitHub <noreply@github.com>2017-05-15 08:11:25 +0300
commit724119543029ba7af449d06be5b2c8f448346f70 (patch)
treed6825a4edd4d2c1baafadc3be2c883cd829d3838 /tests
parent41e37ae7cb965bf152ee9bd60745f454a356f769 (diff)
parent33d0ae183bab830be51d62eaea2d981f050a08b6 (diff)
Merge pull request #11699 from piwik/3.x-dev3.0.4-rc1
Release Piwik 3.0.4-rc1
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/Framework/TestingEnvironmentManipulator.php20
-rw-r--r--tests/PHPUnit/Framework/TestingEnvironmentVariables.php1
-rw-r--r--tests/PHPUnit/Integration/Application/Kernel/PluginListTest.php113
-rw-r--r--tests/PHPUnit/Integration/DbTest.php15
-rw-r--r--tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrand_month.xml4
-rw-r--r--tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getBrand_day.xml4
-rw-r--r--tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_month.original.html2
-rw-r--r--tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html2
-rw-r--r--tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_month.original.pdfbin552454 -> 552307 bytes
-rw-r--r--tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_week.original.html2
-rw-r--r--tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html2
-rw-r--r--tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_week.original.pdfbin568941 -> 568847 bytes
-rw-r--r--tests/PHPUnit/Unit/DataAccess/LogQueryBuilder/JoinGeneratorTest.php51
-rw-r--r--tests/UI/expected-screenshots/Dashboard_loaded_token_auth.png4
-rw-r--r--tests/UI/expected-screenshots/Dashboard_removed.png4
-rw-r--r--tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png4
-rw-r--r--tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png3
-rw-r--r--tests/UI/expected-screenshots/Overlay_loaded.png4
-rw-r--r--tests/UI/expected-screenshots/Overlay_loaded_with_segment.png4
-rw-r--r--tests/UI/expected-screenshots/Overlay_page_change.png4
-rw-r--r--tests/UI/expected-screenshots/Overlay_page_link_clicks.png4
-rw-r--r--tests/UI/expected-screenshots/Overlay_period_change.png4
-rw-r--r--tests/UI/expected-screenshots/Overlay_row_evolution.png4
-rw-r--r--tests/UI/expected-screenshots/Overlay_transitions.png4
-rw-r--r--tests/UI/expected-screenshots/Theme_home.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_dashboard1.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_fatal_error_safemode.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_segmented_visitorlog.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_visitor_profile_popup.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_visitors_devices.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_visitors_software.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_widgetize_visitor_log.png4
-rw-r--r--tests/UI/expected-screenshots/ViewDataTableTest_related_report_click.png4
-rw-r--r--tests/UI/specs/EmptySite_spec.js7
-rw-r--r--tests/resources/screenshot-override/override.css1
38 files changed, 250 insertions, 65 deletions
diff --git a/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php b/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php
index 1aa1a74de8..59bac60155 100644
--- a/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php
+++ b/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php
@@ -227,16 +227,15 @@ class TestingEnvironmentManipulator implements EnvironmentManipulator
private function getPluginAndRequiredPlugins($pluginName, $plugins)
{
- $pluginJsonPath = $this->makePathToPluginJson($pluginName);
+ $pluginLoader = new Plugin\MetadataLoader($pluginName);
+ $pluginJson = $pluginLoader->loadPluginInfoJson();
- if (file_exists($pluginJsonPath)) {
- $pluginJson = json_decode(trim(file_get_contents($pluginJsonPath)), true);
+ if (!empty($pluginJson['require'])) {
+ foreach ($pluginJson['require'] as $possiblePluginName => $requiredVersion) {
- if (!empty($pluginJson['require'])) {
- foreach ($pluginJson['require'] as $possiblePluginName => $requiredVersion) {
- if (file_exists($this->makePathToPluginJson($possiblePluginName))) {
- $plugins = $this->getPluginAndRequiredPlugins($possiblePluginName, $plugins);
- }
+ $pluginLoader2 = new Plugin\MetadataLoader($possiblePluginName);
+ if (file_exists($pluginLoader2->getPathToPluginJson())) {
+ $plugins = $this->getPluginAndRequiredPlugins($possiblePluginName, $plugins);
}
}
}
@@ -248,11 +247,6 @@ class TestingEnvironmentManipulator implements EnvironmentManipulator
return $plugins;
}
- private function makePathToPluginJson($pluginName)
- {
- return Plugin\Manager::getPluginsDirectory() . $pluginName . '/' . Plugin\MetadataLoader::PLUGIN_JSON_FILENAME;
- }
-
private function classExists($klass)
{
if (class_exists($klass)) {
diff --git a/tests/PHPUnit/Framework/TestingEnvironmentVariables.php b/tests/PHPUnit/Framework/TestingEnvironmentVariables.php
index 596daa82f2..ef4b34449e 100644
--- a/tests/PHPUnit/Framework/TestingEnvironmentVariables.php
+++ b/tests/PHPUnit/Framework/TestingEnvironmentVariables.php
@@ -105,6 +105,7 @@ class TestingEnvironmentVariables
$disabledPlugins = $pluginList->getCorePluginsDisabledByDefault();
$disabledPlugins[] = 'LoginHttpAuth';
$disabledPlugins[] = 'LoginLdap';
+ $disabledPlugins[] = 'MarketingCampaignsReporting';
$disabledPlugins[] = 'ExampleVisualization';
$disabledPlugins = array_diff($disabledPlugins, array(
diff --git a/tests/PHPUnit/Integration/Application/Kernel/PluginListTest.php b/tests/PHPUnit/Integration/Application/Kernel/PluginListTest.php
new file mode 100644
index 0000000000..00f873b2ee
--- /dev/null
+++ b/tests/PHPUnit/Integration/Application/Kernel/PluginListTest.php
@@ -0,0 +1,113 @@
+<?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\Application\Kernel;
+
+use Piwik\Application\Kernel\PluginList;
+use Piwik\Container\StaticContainer;
+use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
+
+/**
+ * @group PluginListTest
+ * @group Core
+ */
+class PluginListTest extends IntegrationTestCase
+{
+
+ /**
+ * @var PluginList
+ */
+ private $pluginList = array();
+
+ public function setUp()
+ {
+ parent::setUp();
+ $this->pluginList = $this->makePluginList();
+ }
+
+ public function test_sortPlugins()
+ {
+ $pluginList = $this->makePluginList();
+ $sorted = $pluginList->sortPlugins(array('UsersManager', 'CoreHome', 'MyCustomPlugin', 'ExampleCommand', 'MyCustomPlugin2', 'Abcdef'));
+ $this->assertSame(array(
+ 'CoreHome', // core plugins loaded first
+ 'UsersManager',
+ 'ExampleCommand', // a "by default disabled plugin" is loaded before custom plugins
+ 'Abcdef', // then we load custom plugins
+ 'MyCustomPlugin',
+ 'MyCustomPlugin2',
+ ), $sorted);
+ }
+
+ public function test_sortPlugins_onlyCorePlugins()
+ {
+ $pluginList = $this->makePluginList();
+ $sorted = $pluginList->sortPlugins(array('UsersManager', 'CoreHome'));
+ $this->assertSame(array('CoreHome','UsersManager'), $sorted);
+ }
+
+ public function test_sortPluginsAndRespectDependencies_sortsPluginsAlphabetically()
+ {
+ $pluginList = $this->makePluginList();
+ $sorted = $pluginList->sortPluginsAndRespectDependencies(array(
+ 'UsersManager', 'MyCustomPlugin', 'ExampleCommand', 'MyCustomPlugin2', 'CoreHome', 'Abcdef'
+ ));
+ $this->assertSame(array(
+ 'CoreHome', // core plugins loaded first
+ 'UsersManager',
+ 'ExampleCommand', // a "by default disabled plugin" is loaded before custom plugins
+ 'Abcdef', // then we load custom plugins
+ 'MyCustomPlugin',
+ 'MyCustomPlugin2',
+ ), $sorted);
+ }
+
+ public function test_sortPluginsAndRespectDependencies_makesSureToListRequiredDependencyFirst()
+ {
+ $pluginJsonInfo = array(
+ 'Abcdef' => array('require' => array('MyCustomPlugin2' => '2.2.1')),
+ 'MyCustomPlugin2' => array('require' => array('CoreHome' => '4.2.1', 'MyCustomPlugin3' => '3.0.3')),
+ 'fooBar' => array('require' => array('Ast' => '1.2.1', 'MyCustomPlugin3' => '3.0.3'))
+ );
+
+ $pluginList = $this->makePluginList();
+ $sorted = $pluginList->sortPluginsAndRespectDependencies(array(
+ 'UsersManager', 'MyCustomPlugin',
+ 'ExampleCommand', 'MyCustomPlugin2', 'Ast',
+ 'Acc', 'MyCustomPlugin3', 'CoreHome', 'Abcdef', 'fooBar',
+ ), $pluginJsonInfo);
+ $this->assertSame(array(
+ 'CoreHome', // core plugins loaded first
+ 'UsersManager',
+ 'ExampleCommand', // a "by default disabled plugin" is loaded before custom plugins
+ 'MyCustomPlugin3',
+ 'MyCustomPlugin2',
+ 'Abcdef',
+ 'Acc',
+ 'Ast',
+ 'fooBar',
+ 'MyCustomPlugin',
+ ), $sorted);
+ }
+
+ public function test_sortPluginsAndRespectDependencies_onlyCorePlugins()
+ {
+ $pluginList = $this->makePluginList();
+ $sorted = $pluginList->sortPluginsAndRespectDependencies(array('UsersManager', 'CoreHome'));
+ $this->assertSame(array('CoreHome','UsersManager'), $sorted);
+ }
+
+ private function makePluginList()
+ {
+ $globalSettingsProvider = StaticContainer::get('Piwik\Application\Kernel\GlobalSettingsProvider');
+ $section = $globalSettingsProvider->getSection('Plugins');
+ // $section['Plugins'] = $pluginsToLoad;
+ $globalSettingsProvider->setSection('Plugins', $section);
+ return new PluginList($globalSettingsProvider);
+ }
+
+}
diff --git a/tests/PHPUnit/Integration/DbTest.php b/tests/PHPUnit/Integration/DbTest.php
index e30de8a062..0ca35122b5 100644
--- a/tests/PHPUnit/Integration/DbTest.php
+++ b/tests/PHPUnit/Integration/DbTest.php
@@ -85,6 +85,21 @@ class DbTest extends IntegrationTestCase
Db::destroyDatabaseObject();
}
+ /**
+ * @dataProvider getDbAdapter
+ */
+ public function test_getRowCount($adapter, $expectedClass)
+ {
+ Db::destroyDatabaseObject();
+ Config::getInstance()->database['adapter'] = $adapter;
+ $db = Db::get();
+ // make sure test is useful and setting adapter works
+ $this->assertInstanceOf($expectedClass, $db);
+
+ $result = $db->query('select 21');
+ $this->assertEquals(1, $db->rowCount($result));
+ }
+
public function getDbAdapter()
{
return array(
diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrand_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrand_month.xml
index 2d1a7bd095..89aca6e48f 100644
--- a/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrand_month.xml
+++ b/tests/PHPUnit/System/expected/test_ImportLogs__DevicesDetection.getBrand_month.xml
@@ -19,7 +19,7 @@
<sum_daily_nb_uniq_visitors>33</sum_daily_nb_uniq_visitors>
<sum_daily_nb_users>2</sum_daily_nb_users>
<nb_visits_converted>0</nb_visits_converted>
- <logo>plugins/Morpheus/icons/dist/brand/Unknown.png</logo>
+ <logo>plugins/Morpheus/icons/dist/brand/unk.png</logo>
<segment>deviceBrand==Unknown</segment>
</row>
<row>
@@ -85,4 +85,4 @@
<logo>plugins/Morpheus/icons/dist/brand/Samsung.png</logo>
<segment>deviceBrand==Samsung</segment>
</row>
-</result> \ No newline at end of file
+</result>
diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getBrand_day.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getBrand_day.xml
index e498a16332..bef5da30d5 100644
--- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getBrand_day.xml
+++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getBrand_day.xml
@@ -23,7 +23,7 @@
</goals>
<nb_conversions>2</nb_conversions>
<revenue>43</revenue>
- <logo>plugins/Morpheus/icons/dist/brand/Unknown.png</logo>
+ <logo>plugins/Morpheus/icons/dist/brand/unk.png</logo>
<segment>deviceBrand==Unknown</segment>
</row>
-</result> \ No newline at end of file
+</result>
diff --git a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_month.original.html b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_month.original.html
index f94bb1df2f..c08c9b38e3 100644
--- a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_month.original.html
+++ b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_month.original.html
@@ -762,7 +762,7 @@
<tr style=";">
<td style="padding:17px 15px;;border-bottom:1px solid rgb(231,231,231);font-size: 15px;padding:17px 15px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, &#039;Segoe UI&#039;, Roboto, Oxygen-Sans, Cantarell, &#039;Helvetica Neue&#039;, sans-serif;">
- <img height="16px" src='http://example.com/piwik/tests/PHPUnit/proxy/plugins/Morpheus/icons/dist/brand/Unknown.png'>
+ <img height="16px" src='http://example.com/piwik/tests/PHPUnit/proxy/plugins/Morpheus/icons/dist/brand/unk.png'>
&nbsp;
Unknown </td>
<td style="padding:17px 15px; text-align:right;;border-bottom:1px solid rgb(231,231,231);font-size: 15px;padding:17px 15px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, &#039;Segoe UI&#039;, Roboto, Oxygen-Sans, Cantarell, &#039;Helvetica Neue&#039;, sans-serif;">
diff --git a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html
index 13af6755f2..4129e19606 100644
--- a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html
+++ b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html
@@ -727,7 +727,7 @@
<tr style=";">
<td style="padding:17px 15px;;border-bottom:1px solid rgb(231,231,231);font-size: 15px;padding:17px 15px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, &#039;Segoe UI&#039;, Roboto, Oxygen-Sans, Cantarell, &#039;Helvetica Neue&#039;, sans-serif;">
- <img height="16px" src='http://example.com/piwik/tests/PHPUnit/proxy/plugins/Morpheus/icons/dist/brand/Unknown.png'>
+ <img height="16px" src='http://example.com/piwik/tests/PHPUnit/proxy/plugins/Morpheus/icons/dist/brand/unk.png'>
&nbsp;
Unknown </td>
<td style="padding:17px 15px; text-align:right;;border-bottom:1px solid rgb(231,231,231);font-size: 15px;padding:17px 15px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, &#039;Segoe UI&#039;, Roboto, Oxygen-Sans, Cantarell, &#039;Helvetica Neue&#039;, sans-serif;">
diff --git a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_month.original.pdf b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_month.original.pdf
index b1c7db1191..f1a9297d72 100644
--- a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_month.original.pdf
+++ b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_month.original.pdf
Binary files differ
diff --git a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_week.original.html b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_week.original.html
index 91b68caf4f..7af97958ce 100644
--- a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_week.original.html
+++ b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__ScheduledReports.generateReport_week.original.html
@@ -905,7 +905,7 @@
<tr style=";">
<td style="padding:17px 15px;;border-bottom:1px solid rgb(231,231,231);font-size: 15px;padding:17px 15px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, &#039;Segoe UI&#039;, Roboto, Oxygen-Sans, Cantarell, &#039;Helvetica Neue&#039;, sans-serif;">
- <img height="16px" src='http://example.com/piwik/tests/PHPUnit/proxy/plugins/Morpheus/icons/dist/brand/Unknown.png'>
+ <img height="16px" src='http://example.com/piwik/tests/PHPUnit/proxy/plugins/Morpheus/icons/dist/brand/unk.png'>
&nbsp;
Unknown </td>
<td style="padding:17px 15px; text-align:right;;border-bottom:1px solid rgb(231,231,231);font-size: 15px;padding:17px 15px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, &#039;Segoe UI&#039;, Roboto, Oxygen-Sans, Cantarell, &#039;Helvetica Neue&#039;, sans-serif;">
diff --git a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html
index 84bff31348..ab685ce1f2 100644
--- a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html
+++ b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html
@@ -863,7 +863,7 @@
<tr style=";">
<td style="padding:17px 15px;;border-bottom:1px solid rgb(231,231,231);font-size: 15px;padding:17px 15px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, &#039;Segoe UI&#039;, Roboto, Oxygen-Sans, Cantarell, &#039;Helvetica Neue&#039;, sans-serif;">
- <img height="16px" src='http://example.com/piwik/tests/PHPUnit/proxy/plugins/Morpheus/icons/dist/brand/Unknown.png'>
+ <img height="16px" src='http://example.com/piwik/tests/PHPUnit/proxy/plugins/Morpheus/icons/dist/brand/unk.png'>
&nbsp;
Unknown </td>
<td style="padding:17px 15px; text-align:right;;border-bottom:1px solid rgb(231,231,231);font-size: 15px;padding:17px 15px;color:#0d0d0d;font-family:-apple-system, BlinkMacSystemFont, &#039;Segoe UI&#039;, Roboto, Oxygen-Sans, Cantarell, &#039;Helvetica Neue&#039;, sans-serif;">
diff --git a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_week.original.pdf b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_week.original.pdf
index 71bbf00529..909cc51c36 100644
--- a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_week.original.pdf
+++ b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_week.original.pdf
Binary files differ
diff --git a/tests/PHPUnit/Unit/DataAccess/LogQueryBuilder/JoinGeneratorTest.php b/tests/PHPUnit/Unit/DataAccess/LogQueryBuilder/JoinGeneratorTest.php
index 746f2e45ff..8e1ead3aec 100644
--- a/tests/PHPUnit/Unit/DataAccess/LogQueryBuilder/JoinGeneratorTest.php
+++ b/tests/PHPUnit/Unit/DataAccess/LogQueryBuilder/JoinGeneratorTest.php
@@ -102,6 +102,57 @@ class JoinGeneratorTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expected, $generator->getJoinString());
}
+ public function test_generate_getJoinString_manuallyJoinedAlreadyWithCustomConditionInArray()
+ {
+ $generator = $this->generate(array(
+ 'log_visit',
+ array('table' => 'log_conversion', 'joinOn' => 'log_visit.idvisit2 = log_conversion.idvisit2'),
+ 'log_conversion'
+ ));
+
+ $expected = 'log_visit AS log_visit ';
+ $expected .= 'LEFT JOIN log_conversion AS log_conversion ON log_visit.idvisit2 = log_conversion.idvisit2';
+ $this->assertEquals($expected, $generator->getJoinString());
+ }
+
+ public function test_generate_getJoinString_manuallyJoinedAlreadyWithCustomConditionInArrayAndFurtherTablesAfterwards()
+ {
+ $generator = $this->generate(array(
+ 'log_visit',
+ array('table' => 'log_conversion', 'joinOn' => 'log_visit.idvisit2 = log_conversion.idvisit2'),
+ 'log_conversion',
+ 'log_link_visit_action'
+ ));
+
+ $expected = 'log_visit AS log_visit ';
+ $expected .= 'LEFT JOIN log_conversion AS log_conversion ON log_visit.idvisit2 = log_conversion.idvisit2 ';
+ $expected .= 'LEFT JOIN log_link_visit_action AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit';
+ $this->assertEquals($expected, $generator->getJoinString());
+ }
+
+ /**
+ * @expectedException \Exception
+ * @expectedExceptionMessage Please reorganize the joined tables as the table log_conversion in {"0":"log_visit","1":"log_conversion","2":"log_link_visit_action","3":{"table":"log_conversion","joinOn":"log_link_visit_action.idvisit2 = log_conversion.idvisit2"}} cannot be joined correctly.
+ */
+ public function test_generate_getJoinString_manuallyJoinedAlreadyWithCustomConditionInArrayInverted()
+ {
+ $generator = $this->generate(array(
+ 'log_visit',
+ 'log_conversion',
+ 'log_link_visit_action',
+ array('table' => 'log_conversion', 'joinOn' => 'log_link_visit_action.idvisit2 = log_conversion.idvisit2'),
+ ));
+
+ $expected = 'log_visit AS log_visit ';
+ $expected .= 'LEFT JOIN log_conversion AS log_conversion ON log_visit.idvisit2 = log_conversion.idvisit2 ';
+ $expected .= 'LEFT JOIN log_link_visit_action AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit ';
+ $expected .= 'LEFT JOIN log_conversion AS log_conversion ON log_conversion.idvisit = log_visit.idvisit ';
+
+ $expected .= 'LEFT JOIN log_conversion AS log_conversion ON log_visit.idvisit2 = log_conversion.idvisit2 ';
+ $expected .= 'LEFT JOIN log_link_visit_action AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit';
+ $this->assertEquals($expected, $generator->getJoinString());
+ }
+
public function test_generate_getJoinString_manuallyJoinedAlreadyPlusCustomJoinButAlsoLeft()
{
$generator = $this->generate(array(
diff --git a/tests/UI/expected-screenshots/Dashboard_loaded_token_auth.png b/tests/UI/expected-screenshots/Dashboard_loaded_token_auth.png
index 4a06725782..ff309ef54d 100644
--- a/tests/UI/expected-screenshots/Dashboard_loaded_token_auth.png
+++ b/tests/UI/expected-screenshots/Dashboard_loaded_token_auth.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:09fb2cbf638ca3671a6382a11eeb292af94d77c1479de082c37b2efaa7034700
-size 538187
+oid sha256:62ffe7dcbec7a3ead69c8e0207626fce141e4b11c08a893a4b776a420f7bc871
+size 538373
diff --git a/tests/UI/expected-screenshots/Dashboard_removed.png b/tests/UI/expected-screenshots/Dashboard_removed.png
index 95eb9f0c59..361fb00ce1 100644
--- a/tests/UI/expected-screenshots/Dashboard_removed.png
+++ b/tests/UI/expected-screenshots/Dashboard_removed.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4881ee29c12b8c00a463d1bcc4d84d422b64bed3c651bb6165ac7db9e4db221b
-size 537830
+oid sha256:6895c2be1eda5182ad1af3399e3568ed1c18232fd128782da34e77a375b4f562
+size 537986
diff --git a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
index 6433c2ab72..25a957f584 100644
--- a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
+++ b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e2c131f981a3d5ac09c7f035a3f855bc35f4e7ec9bf3083c475df5a770ce90f5
-size 217051
+oid sha256:0723f3a7503a471b5432f8b72f0b9fd3f5ceef2ff9e5b3f87175ac2150465ed3
+size 222863
diff --git a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png
new file mode 100644
index 0000000000..4977052015
--- /dev/null
+++ b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c8b3052ed220a9ae9e545542b63266be0dd46d5a8b1038c41a64f9a5b2006dff
+size 285366
diff --git a/tests/UI/expected-screenshots/Overlay_loaded.png b/tests/UI/expected-screenshots/Overlay_loaded.png
index 6f5837aa20..473a526a9b 100644
--- a/tests/UI/expected-screenshots/Overlay_loaded.png
+++ b/tests/UI/expected-screenshots/Overlay_loaded.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:01267d7eb51db12514bf4ea313498fba0aebb7764597044a9e6c67363fc25ada
-size 91622
+oid sha256:e17420367fed1385bb47456181dfbf3769a7967fa7352172b1afc321d934dda7
+size 107726
diff --git a/tests/UI/expected-screenshots/Overlay_loaded_with_segment.png b/tests/UI/expected-screenshots/Overlay_loaded_with_segment.png
index ec9066dd15..1cb242fc95 100644
--- a/tests/UI/expected-screenshots/Overlay_loaded_with_segment.png
+++ b/tests/UI/expected-screenshots/Overlay_loaded_with_segment.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:cb5ed8775d89fad7ee87d8e3dc46bf64b4f78a91c734943a4715342ea75f08eb
-size 88700
+oid sha256:adde7eba47ec565391c12e549cb08166ca0da20199f08bc00d912efb1cbf4081
+size 105001
diff --git a/tests/UI/expected-screenshots/Overlay_page_change.png b/tests/UI/expected-screenshots/Overlay_page_change.png
index b42a1e339c..21ec24ce0c 100644
--- a/tests/UI/expected-screenshots/Overlay_page_change.png
+++ b/tests/UI/expected-screenshots/Overlay_page_change.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:8234317965f6d09a2995ee1d84c61952a4c308f5211287771ee67a6da5436eee
-size 198545
+oid sha256:976b961f96068ff2aca8fefd992782cd58a1a125ff1e34b624022c94d18a7157
+size 214351
diff --git a/tests/UI/expected-screenshots/Overlay_page_link_clicks.png b/tests/UI/expected-screenshots/Overlay_page_link_clicks.png
index f262228d4f..69355f13ff 100644
--- a/tests/UI/expected-screenshots/Overlay_page_link_clicks.png
+++ b/tests/UI/expected-screenshots/Overlay_page_link_clicks.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:153c38995cc0214ddaa366492239d36173f45b430eb6a202691b7b7d0f7f157a
-size 98305
+oid sha256:b0ba26ee0331e7ff22f64e0a1b648569c82dc0eb423236751d81ec71a88a5f75
+size 114248
diff --git a/tests/UI/expected-screenshots/Overlay_period_change.png b/tests/UI/expected-screenshots/Overlay_period_change.png
index 24ecd1ca56..dc37737743 100644
--- a/tests/UI/expected-screenshots/Overlay_period_change.png
+++ b/tests/UI/expected-screenshots/Overlay_period_change.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:edd8fdc92e3c8faf0393abed25c21008dca5411077142ecb5e0727055af8b291
-size 200835
+oid sha256:8e327c3ded16cfa9670b7ec4f533fdb0c071112aa6a655e64873aa67d5191f2b
+size 215961
diff --git a/tests/UI/expected-screenshots/Overlay_row_evolution.png b/tests/UI/expected-screenshots/Overlay_row_evolution.png
index ec63a52016..8703fdc9fa 100644
--- a/tests/UI/expected-screenshots/Overlay_row_evolution.png
+++ b/tests/UI/expected-screenshots/Overlay_row_evolution.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:682c2f7a7ffb8d0ae934986bbce1d8d31ca0c139d7c454bea17fda4cc3d47865
-size 98902
+oid sha256:9e1601ef3021dd0dc7599aa7a414c23d22eb69a64fdb34acd624815f5814d9ca
+size 111440
diff --git a/tests/UI/expected-screenshots/Overlay_transitions.png b/tests/UI/expected-screenshots/Overlay_transitions.png
index 5500e75c65..5c64ad8d3b 100644
--- a/tests/UI/expected-screenshots/Overlay_transitions.png
+++ b/tests/UI/expected-screenshots/Overlay_transitions.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:ebe70f43294f767b92a19dcc72e5be1e97c493f95ade11e775a762fc4f0718b4
-size 119995
+oid sha256:0504da4859be09381341936dee9d2d7c9846ea71d58eb3e33784783eaacb88ac
+size 131445
diff --git a/tests/UI/expected-screenshots/Theme_home.png b/tests/UI/expected-screenshots/Theme_home.png
index 3f7a34e7df..a21b21832b 100644
--- a/tests/UI/expected-screenshots/Theme_home.png
+++ b/tests/UI/expected-screenshots/Theme_home.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:64694774ceca23ba7d665b1991e4c3af953729330b16615e2b1b6cccd761ec62
-size 536680
+oid sha256:24cdccb593c6ba67d2cc860c4158b5aedc330a0f7ac2c217b504d5102f12152a
+size 536808
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png
index 27f9d770e1..8636a11726 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e7fec3803c8cffdc013bfff529662092c3d14519c188342c19a165da15e01620
-size 976409
+oid sha256:05739f4983fadd53b2ef2ccb19fd63ac926a797dbba00a0c1ea4947adcdfcbdd
+size 998448
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png b/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png
index df77d61967..9e9d5b9223 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_api_listing.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:64daa79a981cc4fa26baa2b88a4883bcc23a28e291bfaa14855b1c075a0888e6
-size 4233315
+oid sha256:1978495aeb6ec013d3d192368d2ba129193da25aa4f0d1c0b7aa0f17c6e47ff0
+size 4355323
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard1.png b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard1.png
index e7c292c532..fcc21e542a 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard1.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard1.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:35f8e97101e79b367c1714510be3773a6282e89de071f6c46f60a765169e479f
-size 488137
+oid sha256:e031150dc2301b35ef6152bad026b8e46de58268560c8c73127c7f0ef87c2884
+size 488287
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png
index 1bbe405b57..b0e4bc66d1 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:eabdaf4e0384eb39b23b73f9bf9e7ad6c6424726260a5197ea4f78a0088952b4
-size 1441407
+oid sha256:c40d0c035178428f43c16012a48aba6b9c212228a523c83d862192508d100df3
+size 1441332
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_fatal_error_safemode.png b/tests/UI/expected-screenshots/UIIntegrationTest_fatal_error_safemode.png
index 98ed0d33c2..0fc34b7348 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_fatal_error_safemode.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_fatal_error_safemode.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:ce4997e90ad02cac0b258440b26181a3dab713c9fbabfab71156d37c1ac69d3b
-size 196162
+oid sha256:0928197e1ce7e33e4080043a11add57af4ef0d597d394e0b2370ef6d68cf5896
+size 202320
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_segmented_visitorlog.png b/tests/UI/expected-screenshots/UIIntegrationTest_segmented_visitorlog.png
index 1987d000a5..8d1a585afa 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_segmented_visitorlog.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_segmented_visitorlog.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:8553fea53c171e73d6eb19d5b815f0b25c7fc170b5d66c5e9d21df3bc17e26a9
-size 794032
+oid sha256:da0c046486ba3267e744047e9e8ca98d9a452f8ac6dc1214f1478e0ee6052315
+size 794021
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_visitor_profile_popup.png b/tests/UI/expected-screenshots/UIIntegrationTest_visitor_profile_popup.png
index 0ed1242d77..188bcf0d0d 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_visitor_profile_popup.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_visitor_profile_popup.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e7d312b0af70a079517a677fba00abf962c4e21ff14e334e13ddb02fccef6f46
-size 228875
+oid sha256:b167ae0aa509eed89f1b9fa1104573d808ec0775338bd8e778c9382a5764f36d
+size 243601
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_devices.png b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_devices.png
index fb7836055a..8db5369088 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_devices.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_devices.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e63248f8321005905b35329822a739873a5722d639190acbfc5e6855a0bc6377
-size 93680
+oid sha256:d3ea993fb905140ec9e37c9c8668469415ef0a8c876ffd3f2d01ee52e1f579c8
+size 93832
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_software.png b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_software.png
index ead2ba7ffd..c68ac73bc7 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_software.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_software.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b101a48862ea5eae3db93d279b51ac67ae5c7e15fb6a9a822a4a988e41d2be6c
-size 160676
+oid sha256:544f3d346718775490b8203f26102e8c49ae9ff2189ac73cdd3ab68e136dcef1
+size 160643
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_widgetize_visitor_log.png b/tests/UI/expected-screenshots/UIIntegrationTest_widgetize_visitor_log.png
index 395b8dd15b..aff97fe1f0 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_widgetize_visitor_log.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_widgetize_visitor_log.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:c34486e4ef8423a4b1f7607d57b70e6d8116c254a6de5c5d938fffef63b4ff9e
-size 627836
+oid sha256:216cb48f4299ef58d9c9c2995ce1cbdbda9d2089811b0d96e9aa90eb09a04236
+size 627627
diff --git a/tests/UI/expected-screenshots/ViewDataTableTest_related_report_click.png b/tests/UI/expected-screenshots/ViewDataTableTest_related_report_click.png
index 4954de117c..8eeb243a0e 100644
--- a/tests/UI/expected-screenshots/ViewDataTableTest_related_report_click.png
+++ b/tests/UI/expected-screenshots/ViewDataTableTest_related_report_click.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a1d439e3735718dee9677a43e8fa1c8fa2783c18b0e53062fb2469374d72a735
-size 38749
+oid sha256:03e6dced21f3097b4da767b4c148f25bd2f95a6f4a0470845b655700d8c0e437
+size 38735
diff --git a/tests/UI/specs/EmptySite_spec.js b/tests/UI/specs/EmptySite_spec.js
index 31b8524d6f..b4978ebd20 100644
--- a/tests/UI/specs/EmptySite_spec.js
+++ b/tests/UI/specs/EmptySite_spec.js
@@ -19,4 +19,11 @@ describe("EmptySite", function () {
page.load(urlToTest);
}, done);
});
+
+ it('should be possible to ignore this screen for one hour', function (done) {
+ expect.screenshot('emptySiteDashboard_ignored').to.be.captureSelector('.page', function (page) {
+ page.click('.ignoreSitesWithoutData');
+ page.wait(1000)
+ }, done);
+ });
});
diff --git a/tests/resources/screenshot-override/override.css b/tests/resources/screenshot-override/override.css
index a38e0ed84d..bda7f2a260 100644
--- a/tests/resources/screenshot-override/override.css
+++ b/tests/resources/screenshot-override/override.css
@@ -10,6 +10,7 @@
display:none;
}
+.piwik-version .itemValue,
span.piwik-version,
span.plugin-version {
visibility:hidden;