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:
authorPeter Zhang <peter@innocraft.com>2021-11-13 02:49:08 +0300
committerGitHub <noreply@github.com>2021-11-13 02:49:08 +0300
commitbf341b7c0ba46691bf3e475ebaa58391363cd7ec (patch)
tree232d4a0ec7aa3b8c801592872eb2d2523dc66f0e /plugins/Feedback/tests/Integration/ReferBannerTest.php
parent9c58f4e71db9133b2c83d51cf700e818ec5ff7e4 (diff)
add feedback question, remove other related. (#18262)
* remove feedback links remove feedback links * update screen shot update screen shot * add feedback question add feedback question * update close to icon update close to icon * built vue files * remove in line css remove in line css, change to less file * move translation key to plugin move translation key to plugin * remove feedback popup remove feedback popup * update remove some test and feedback related update remove some test and feedback related * add draft tests add draft tests * update feedback add php and UI tests update feedback add php and UI tests * update test screen shots update test screen shots * Update demo.twig add heart to demo page * add feedback back in extend the modal add feedback back in extend the modal * update coreHome update coreHome * update screen shots update screen shots * Update FeedbackQuestion_spec.js update js tests * update test update test * built vue files * update screenshot and js tests update screenshot and js tests * Update FeedbackQuestion_spec.js test success * update screenshot update screenshot * update tests update tests * fix test error fix test error * Removing the refer us popup * Readding accidentally removed language files * update test * update test * remove refer us * update feedback umd js update feedback umd js * merge Andy branch merge Andy branch and update screen shots * revert language changes revert language changes * revert language changes revert language changes * revert language file revert language file * revert unrelated lang change revert unrelated lang change * revert lang change revert lang change * revert lang change revert lang change * Delete ControllerTest.php remove controller test not in used * Update core/Piwik.php Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com> * Update plugins/Morpheus/javascripts/piwikHelper.js Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com> * update a big that cancel and reopen it again update a bug that cancel and reopen it again * update compare error update compare error * Update plugins/Feedback/FeedbackReminder.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * update feedback show logic update feedback show logic * Update FeedbackQuestion_spec.js update tests * Update Feedback.php remove comments * Update .gitignore * update vue build file update vue build file * built vue files * update vue build file update vue build file * add close button add close button * add close button add close button * update screenshot update screenshot * remove umd remove umd * git add corehome git add corehome * revert all the umd file revert all the umd file * built vue files * built vue files * Update plugins/Feedback/lang/en.json Co-authored-by: Stefan Giehl <stefan@matomo.org> * update per review update per review * built vue files * set auto focus on modal open set auto focus on modal open * built vue files * Update FeedbackQuestion.vue add please write in english * built vue files * remove please write in English remove please write in English * built vue files * update tests and question tests update tests and question tests * set cookie in the test set cookie in the test * Update page-renderer.js add setCookie to tests * update test only load 1 update test only load 1 * built vue files * Update FeedbackQuestion_feedback_popup.png update screen shot * Update piwikHelper.js update button css * update screen shot update screen shot * Update plugins/Feedback/Feedback.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update plugins/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update plugins/Feedback/API.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update plugins/Feedback/API.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update core/Plugin/API.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * update cookie and tests update cookie and tests * built vue files * test setcookie in tests test setcookie in tests * update tests update tests * update tests update tests * Update FeedbackQuestion_spec.js update cookie test * extend setCookie in test extend setCookie in test * update elints format update elints format * built vue files * test set cookie test set cookie * built vue files * Update FeedbackQuestion_spec.js set cookie after goto URL * Update FeedbackQuestion_spec.js int to string * update set cookie update set cookie * update test URL update test URL Co-authored-by: peterhashair <peterhashair@users.noreply.github.com> Co-authored-by: Andrew Davis <andrew.affinity@gmail.com> Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com> Co-authored-by: Stefan Giehl <stefan@matomo.org>
Diffstat (limited to 'plugins/Feedback/tests/Integration/ReferBannerTest.php')
-rw-r--r--plugins/Feedback/tests/Integration/ReferBannerTest.php119
1 files changed, 0 insertions, 119 deletions
diff --git a/plugins/Feedback/tests/Integration/ReferBannerTest.php b/plugins/Feedback/tests/Integration/ReferBannerTest.php
deleted file mode 100644
index b57377ee68..0000000000
--- a/plugins/Feedback/tests/Integration/ReferBannerTest.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/**
- * Matomo - free/libre analytics platform
- *
- * @link http://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-namespace Piwik\Plugins\Feedback\tests\Integration;
-
-use Piwik\Date;
-use Piwik\Option;
-use Piwik\Plugins\Feedback\Feedback;
-use Piwik\Plugins\UsersManager\Model;
-use Piwik\Tests\Framework\Mock\FakeAccess;
-use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
-
-class ReferBannerTest extends IntegrationTestCase
-{
- /** @var Feedback */
- private $feedback;
-
- /** @var Model */
- private $userModel;
-
- public function setUp(): void
- {
- parent::setUp();
-
- $this->feedback = $this->createPartialMock(Feedback::class, ['isDisabledInTestMode']);
- $this->feedback->method('isDisabledInTestMode')->willReturn(false);
-
- $this->userModel = new Model();
- $this->userModel->addUser(
- 'user1',
- 'a98732d98732',
- 'user1@example.com',
- '2019-03-03',
- 'super'
- );
- FakeAccess::$identity = 'user1';
- FakeAccess::$superUser = false;
- }
-
- public function tearDown(): void
- {
- Option::deleteLike('Feedback.nextReferReminder.%');
- try {
- $this->userModel->deleteUserOnly('user1');
- } catch (\Exception $e) {
- // ignore possible errors triggered when the delete user event is posted
- }
-
- parent::tearDown();
- }
-
- public function provideContainerConfig()
- {
- return array(
- 'Piwik\Access' => new FakeAccess()
- );
- }
-
-
- public function test_shouldNotShowReferBannerTo_AnonymousUser()
- {
- FakeAccess::$identity = '';
-
- $this->assertFalse($this->feedback->showReferBanner());
- }
-
- public function test_shouldNotShowReferBannerTo_NotSuperUser()
- {
- FakeAccess::$identity = 'user1';
-
- $this->assertFalse($this->feedback->showReferBanner());
- }
-
- public function test_shouldNotShowReferBannerTo_SuperUser_First()
- {
- FakeAccess::$identity = 'super';
- FakeAccess::$superUser = true;
-
- $this->assertFalse($this->feedback->showReferBanner());
- }
-
- public function test_shouldNotShowReferBanner_ifNeverRemindOn()
- {
- FakeAccess::$identity = 'super';
- FakeAccess::$superUser = true;
- Option::set('Feedback.nextReferReminder.super', '-1');
-
- $this->assertFalse($this->feedback->showReferBanner());
- }
-
- public function test_shouldNotShowReferBanner_ifNextReminderDateInTheFuture()
- {
- FakeAccess::$identity = 'super';
- FakeAccess::$superUser = true;
-
- Date::$now = strtotime('2021-01-01');
- $futureDate = Date::factory('2021-02-01')->toString('Y-m-d');
- Option::set('Feedback.nextReferReminder.super', $futureDate);
-
- $this->assertFalse($this->feedback->showReferBanner());
- }
-
- public function test_shouldShowReferBanner_ifNextReminderDateInThePast()
- {
- FakeAccess::$identity = 'super';
- FakeAccess::$superUser = true;
-
- Date::$now = strtotime('2021-01-01');
- $pastDate = Date::factory('2020-01-01')->toString('Y-m-d');
- Option::set('Feedback.nextReferReminder.super', $pastDate);
-
- $this->assertTrue($this->feedback->showReferBanner());
- }
-}