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:
authordiosmosis <diosmosis@users.noreply.github.com>2018-08-03 01:57:13 +0300
committerGitHub <noreply@github.com>2018-08-03 01:57:13 +0300
commitcb1d83db863938ace3ebdafd072dfd32e434fded (patch)
tree32d8e98d500b2167dcd9d04d92edfec21da9f5e9 /tests
parent59e6f48c9d9112b7335e078f05d405264b46f0c5 (diff)
Add reusable widget to display single metric w/ sparkline & evolution percent (+ other changes) (#13101)
* Add empty metric for single metric view. * Add new isReusable property to widget metadata & if set to true, do not grey out the widget in the dashboard manager, even if the widget is used in the dashboard. * Initial working version of single metric view. * Get single metric view widget to work and look correctly (no series picker). * Add series picker to single metric widget and add filter_last_period_evolution parameter. * Persist metric change through dashboard widget parameter saving. * Loading state for single metric view. * Make new evolution param work on processed reports + tweak component implementation. * Tweak CSS and make sure angular components are compiled in widget preview. * Make component work with widget preview and avoid unnecessary widget reloads when multiple widgets of the same type are shown. * Generalize JS lastN range period computing and use to create standalone sparkline angular component and get rid of need for "past-period" argument to single metric view. * Add format_metrics: "1" to API.get method. * Add escaping to _angularComponent.twig. * hacky fix for formatting revenue columns * Format past data values & allow evolution to be calculated for processed metrics. * filter evolution changes * Fix issue in subtable recursion for processed metric computation & metric formatting + add new processed metric compute hooks to fix bug in evolution calculation on subtables. * remove isReusable property. * attempting to change strategy * simpler solution that does not require backend changes * remove unneeded code + fix issue w/ formatted metrics * remove some more unneeded code * write UI test * add new screenshots * Add all goals to single metric view picker. * move category * fix test * fixing more tests * Fixing some UI tests. * Update more screenshots. * update two more screenshots
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/Integration/Category/CategoryListTest.php1
-rw-r--r--tests/PHPUnit/Integration/WidgetsListTest.php9
-rw-r--r--tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getWidgetMetadata.xml20
-rw-r--r--tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png4
-rw-r--r--tests/UI/expected-screenshots/Theme_home.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.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_dashboard3.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_dashboard4.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_widgets_listing.png4
14 files changed, 48 insertions, 26 deletions
diff --git a/tests/PHPUnit/Integration/Category/CategoryListTest.php b/tests/PHPUnit/Integration/Category/CategoryListTest.php
index 1a663c1918..9adf91d00d 100644
--- a/tests/PHPUnit/Integration/Category/CategoryListTest.php
+++ b/tests/PHPUnit/Integration/Category/CategoryListTest.php
@@ -35,6 +35,7 @@ class CategoryListTest extends IntegrationTestCase
$this->assertSame(array(
'General_Actions',
+ 'General_Generic',
'General_Visitors',
'Dashboard_Dashboard',
'General_MultiSitesSummary',
diff --git a/tests/PHPUnit/Integration/WidgetsListTest.php b/tests/PHPUnit/Integration/WidgetsListTest.php
index f775b60dfa..92658fb48a 100644
--- a/tests/PHPUnit/Integration/WidgetsListTest.php
+++ b/tests/PHPUnit/Integration/WidgetsListTest.php
@@ -42,6 +42,7 @@ class WidgetsListTest extends IntegrationTestCase
$numberOfWidgets = array(
'Dashboard_Dashboard' => 1,
'General_Actions' => 15,
+ 'General_Generic' => 1,
'General_Visitors' => 35,
'SEO' => 2,
'Goals_Goals' => 3,
@@ -91,7 +92,7 @@ class WidgetsListTest extends IntegrationTestCase
$perCategory = $this->getWidgetsPerCategory(WidgetsList::get());
// number of main categories
- $this->assertEquals(10, count($perCategory));
+ $this->assertEquals(11, count($perCategory));
$this->assertEquals($initialGoalsWidgets + 2, count($perCategory['Goals_Goals'])); // make sure widgets for that goal were added
}
@@ -105,7 +106,7 @@ class WidgetsListTest extends IntegrationTestCase
$perCategory = $this->getWidgetsPerCategory(WidgetsList::get());
// number of main categories
- $this->assertEquals(11, count($perCategory));
+ $this->assertEquals(12, count($perCategory));
// check if each category has the right number of widgets
$numberOfWidgets = array(
@@ -127,12 +128,12 @@ class WidgetsListTest extends IntegrationTestCase
$list = WidgetsList::get();
- $this->assertCount(11, $this->getWidgetsPerCategory($list));
+ $this->assertCount(12, $this->getWidgetsPerCategory($list));
$list->remove('SEO', 'NoTeXiStInG');
$perCategory = $this->getWidgetsPerCategory($list);
- $this->assertCount(11, $perCategory);
+ $this->assertCount(12, $perCategory);
$this->assertArrayHasKey('SEO', $perCategory);
$this->assertCount(2, $perCategory['SEO']);
diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getWidgetMetadata.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getWidgetMetadata.xml
index a9d6028b21..3001779c4c 100644
--- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getWidgetMetadata.xml
+++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getWidgetMetadata.xml
@@ -2998,6 +2998,26 @@
</widgets>
</row>
<row>
+ <name>Metric</name>
+ <category>
+ <id>General_Generic</id>
+ <name>Generic</name>
+ <order>70</order>
+ <icon />
+ </category>
+ <subcategory />
+ <module>CoreVisualizations</module>
+ <action>singleMetricView</action>
+ <order>99</order>
+ <parameters>
+ <module>CoreVisualizations</module>
+ <action>singleMetricView</action>
+ <column />
+ </parameters>
+ <uniqueId>widgetCoreVisualizationssingleMetricViewcolumn</uniqueId>
+ <isWide>0</isWide>
+ </row>
+ <row>
<name>Pie graph</name>
<category>
<id>ExampleUI_UiFramework</id>
diff --git a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png
index 24c95541b5..1f9ba7033a 100644
--- a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png
+++ b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard_ignored.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:40820c2899444f4032ce07bbb9eec646c6ccbe096651e93812fb482898bf2e7b
-size 334580
+oid sha256:a70c48449966095dd010775096d364a43ca8c5da932ac770b9799dd46799c098
+size 325028
diff --git a/tests/UI/expected-screenshots/Theme_home.png b/tests/UI/expected-screenshots/Theme_home.png
index 0d4cb8bf90..d3081f7378 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:3806904114450a57479a3f705d252d69e1a441025eb4dc767e829ea0495e45a9
-size 635944
+oid sha256:68db279e2f011563cf4bb50a1020520ea2d993b86917cbb73c35a35cde490243
+size 619743
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png
index fcb1929342..a090cbfaa5 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:9135dfd13e06c4e6317e3d2660924e7a1dbc6dc73a9d2e0f684d4feecc159929
-size 3939232
+oid sha256:24aa51619de3fa59baa671e9a1df7e7c2e7a6459777f87836a464c4d50c5362b
+size 4009728
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png
index e2dcd20c2e..71cc492140 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:a3c13f917f3dd4719c3384440f0ffbd843820295e3d5d4a4589b53c49a0bef3a
-size 1026966
+oid sha256:5eed1b04841b1aeb985d5de66ac36527fc0209da9d11b3403dca30b5c11be02c
+size 1028028
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png
index 5d6d7475c1..ff0100ba35 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:36973a63d9f611e245f8fc008f05e8d0087568e3333797a0fd110c12482f4ce1
-size 1026395
+oid sha256:ce3e381230d857d7928d8e13e3c2e712375ad615471d534374be314ca458186f
+size 1027505
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png
index 5cba62a8cc..422f4334f6 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:211305b8120858bbfe934dc9dfa9a4a1bafe8acb71cdc0b362503c7e423ca20f
-size 739196
+oid sha256:7b8a3607abdd6c5086e0593c28fe4a861c4b3dba17572244d969e4eb8ec60662
+size 796811
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard1.png b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard1.png
index dbf125ee72..bb95db9a58 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:3201441f000c294b9abf3c12a61953acddc90097bbf65cb5e76d3784681e34f4
-size 587779
+oid sha256:083aa10f4b121cd5ef0656a315b78647d17d9ec2cc7275fd4df25c3064bac4a4
+size 569781
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png
index 44257d964d..3b3428fc28 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:1cee56aa2d6879d8c934efac917b243e86e13db53a0ceebe347bf10a60676ff6
-size 1527381
+oid sha256:aa54cdc4eb158a1eb174407a0a3f9cf3bb2fbf0fa2549ee99c8f43bfad0d2b5a
+size 1510200
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard3.png b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard3.png
index 1178965c86..55e42c75b6 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard3.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard3.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f07b1425e746481c9715c441935b814f7cfd47b768b7d6dc0d27440e49447df8
-size 511392
+oid sha256:50edcaec01cb532d20168b518aaf5b494bbc6873379830c9a7edfa52f507e8d1
+size 540096
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard4.png b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard4.png
index 9649ad72f1..544fecfcbf 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard4.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard4.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b349a6a50a60880a23abe83acbeb42c46e70b733493e8fc14889bad83006aadc
-size 289658
+oid sha256:3952943bd7d4822ebf480a447460d2b39b85ad2be8e2a2166d718a7ad23ee18f
+size 297681
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_widgets_listing.png b/tests/UI/expected-screenshots/UIIntegrationTest_widgets_listing.png
index 5b91cab99c..48af2fca63 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_widgets_listing.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_widgets_listing.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:af6c68a115d937e62cb6133f3978e003a2ef0c6b9d43202c3964d086ed8028f4
-size 184981
+oid sha256:7e63927e6f0a64a307ba38ec05d1dc8bd84a42537bdac307ba3e9552599235de
+size 185756