diff options
author | Ben Burgess <88810029+bx80@users.noreply.github.com> | 2021-12-22 23:26:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 23:26:51 +0300 |
commit | d68dc6dd06606e8a7611c53d8ee63da8afbf99f7 (patch) | |
tree | b0363d254677ec77d42ff75352992405b41aef81 /tests | |
parent | 10afd46db0e033e67127fb4e50eea986ed5296e6 (diff) |
Show a summary of new features (#18065)
* Added "What is new" notification display, populated by a new event
* Removed test example event hook
* Added support for applying a link attribute to menu items, fixes layout issue for mobile with html menu items
* Updated UI test screenshots
* Revert accidental edit
* Hide the "What's new" icon if there are no new features to show
* Changed to use changes.json, track user last viewed, added ui test
* Fix UserManager unit tests broken by new ts_changes_viewed user field
* Moved getChanges to separate helper class, added unit test, added user view access check
* Updated to add new changes table and populate only on plugin update/install
* Added missing fixture class, updated UI screenshots
* Updated matomo font to add ringing bell and new releases icons
* Fix for integration test
* Reworked class structure, removed unnecessary angular directive, merged templates, other tidy ups
* built vue files
* built vue files
* Added null user check, missing table exception handling, show plugin name in change title, better handling of missing change fields
* Added sample changes file, moved UserChanges db code to changes model, added return type hints, better db error code handling, various other improvements
* Revert accidental UI screenshot commit
* Fix for incorrect link name parameter in sample changes, switched back to using $db->query for INSERT IGNORE
* Integration test fix, UI screenshot updates
* Test fix
* Added link styling, show CoreHome changes without plugin prefix in title
* Update UI test screenshot
* Added styles to the popover, added event for filtering changes
* Test fix
* UI test screenshot updates
Co-authored-by: sgiehl <stefan@matomo.org>
Co-authored-by: bx80 <bx80@users.noreply.github.com>
Diffstat (limited to 'tests')
8 files changed, 89 insertions, 14 deletions
diff --git a/tests/PHPUnit/Fixtures/CreateChanges.php b/tests/PHPUnit/Fixtures/CreateChanges.php new file mode 100644 index 0000000000..e6e60f0f2d --- /dev/null +++ b/tests/PHPUnit/Fixtures/CreateChanges.php @@ -0,0 +1,75 @@ +<?php +/** + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ +namespace Piwik\Tests\Fixtures; + +use Piwik\Changes\Model as ChangesModel; +use Piwik\Tests\Framework\Fixture; + +class CreateChanges extends Fixture +{ + + private $file; + + public function setUp(): void + { + parent::setUp(); + Fixture::createSuperUser(); + if (!self::siteCreated($idSite = 1)) { + self::createWebsite('2021-01-01'); + } + + $this->file = PIWIK_DOCUMENT_ROOT . '/plugins/CoreAdminHome/changes.json'; + $this->createChanges(); + } + + public function tearDown(): void + { + parent::tearDown(); + self::cleanup(); + } + + protected function cleanup(): void + { + if (file_exists($this->file)) { + unlink($this->file); + } + } + + private function createChanges() + { + + $changes = [ + [ + 'version' => '4.6.0b5', + 'title' => 'New feature x added', + 'description' => 'Now you can do a with b like this', + 'link_name' => 'For more information go here', + 'link' => 'https://www.matomo.org', + ], + [ + 'version' => '4.5.0', + 'title' => 'New feature y added', + 'description' => 'Now you can do c with d like this', + ], + [ + 'version' => '4.4.0', + 'title' => 'New feature z added', + 'description' => 'Now you can do e with f like this', + 'link_name' => 'For more information go here', + 'link' => 'https://www.matomo.org', + ], + ]; + + $changes = array_reverse($changes); + $changesModel = new ChangesModel(); + foreach ($changes as $change) { + $changesModel->addChange('CoreHome', $change); + } + + } +}
\ No newline at end of file diff --git a/tests/UI/expected-screenshots/Menus_mobile_top.png b/tests/UI/expected-screenshots/Menus_mobile_top.png index d51bbfba9b..a173dc3054 100644 --- a/tests/UI/expected-screenshots/Menus_mobile_top.png +++ b/tests/UI/expected-screenshots/Menus_mobile_top.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b87b0c8bd337a99464014b0a99b3e607e124ed3c70b8a8974b5866c9d8d5263b -size 174132 +oid sha256:d5b18d38809efa5cf2049e16bbfbb678881935a2989ef6520e1536017803f4c4 +size 175268 diff --git a/tests/UI/expected-screenshots/QuickAccess_search_1.png b/tests/UI/expected-screenshots/QuickAccess_search_1.png index d2ae098328..895191d38f 100644 --- a/tests/UI/expected-screenshots/QuickAccess_search_1.png +++ b/tests/UI/expected-screenshots/QuickAccess_search_1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:154290d86575f2861311d257ac9754b40bbcd8b866c321dbdc37bc535fa22cd0 -size 96894 +oid sha256:a04a68423308765304ca4305beac97456fd0ae1481275c195df0beb54e2439d8 +size 98090 diff --git a/tests/UI/expected-screenshots/QuickAccess_search_category.png b/tests/UI/expected-screenshots/QuickAccess_search_category.png index 8a0244ec83..cf82eca9ef 100644 --- a/tests/UI/expected-screenshots/QuickAccess_search_category.png +++ b/tests/UI/expected-screenshots/QuickAccess_search_category.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af5ae97b912562fe5f3daa9b32217ca52dc8a593568134effb4e0092ee6481c7 -size 10465 +oid sha256:2e18787f8044686c830662062f3b86994d5783624c67cff1ab2f7c66f9a759d3 +size 11629 diff --git a/tests/UI/expected-screenshots/SupportedBrowser_page_loads_when_browser_supported.png b/tests/UI/expected-screenshots/SupportedBrowser_page_loads_when_browser_supported.png index e2058b08cf..57006282e6 100644 --- a/tests/UI/expected-screenshots/SupportedBrowser_page_loads_when_browser_supported.png +++ b/tests/UI/expected-screenshots/SupportedBrowser_page_loads_when_browser_supported.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec902360a743e685e6ec1be4c282d1d1899770ddb2ef36c9e0ffae07a64d9e3f -size 222617 +oid sha256:7f9b628e5c37e01dc10af37aaeaa7f2a91b8d282cf12481b9ffad53a6c867c0e +size 222819 diff --git a/tests/UI/expected-screenshots/Theme_home.png b/tests/UI/expected-screenshots/Theme_home.png index 11b817d7c1..ff26ed3032 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:413b48a024571196fceeca8803d81794a77b530abb47d675e078921f0dba661d -size 735228 +oid sha256:5ad33baa44477a58683767d44692c625be460155b756b6abe6817c0373d2cbe4 +size 735431 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_period_select_date_range_click.png b/tests/UI/expected-screenshots/UIIntegrationTest_period_select_date_range_click.png index 55e343e653..ce92fa62e6 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_period_select_date_range_click.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_period_select_date_range_click.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82d7c48108c493e541906efb8ac619ac0f50a050691abb0c387bc403a150b5b1 -size 78449 +oid sha256:138f85c40e777ba2b9e4033fb208f24dacfb22269027be347b0fac445a52fa92 +size 78672 diff --git a/tests/UI/expected-screenshots/enable_framed_pages_embed_whole_app.png b/tests/UI/expected-screenshots/enable_framed_pages_embed_whole_app.png index 6f09a3ddf8..63a5311a98 100644 --- a/tests/UI/expected-screenshots/enable_framed_pages_embed_whole_app.png +++ b/tests/UI/expected-screenshots/enable_framed_pages_embed_whole_app.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aedf10314cc1f6703831baf47e78c784e2823f0aaa96246668fbc725c2991aaa -size 232997 +oid sha256:76acc87a7c120390773ca82174da4da29b2408c39d24c6794032f68488ab343e +size 233201 |