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:
authorStefan Giehl <stefan@matomo.org>2021-09-21 23:20:13 +0300
committerGitHub <noreply@github.com>2021-09-21 23:20:13 +0300
commit8c3f495c64a5209f0110f49588c4840ff2cd07fe (patch)
treef25173b9c49143889412040eefd7e2099b7c8bc7 /tests/PHPUnit/Fixtures
parent85d46c82c7f8a409505bd2ca0474365bf75dbbd4 (diff)
Improves Overlay UI tests (#17920)
Diffstat (limited to 'tests/PHPUnit/Fixtures')
-rw-r--r--tests/PHPUnit/Fixtures/UITestFixture.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/PHPUnit/Fixtures/UITestFixture.php b/tests/PHPUnit/Fixtures/UITestFixture.php
index 64972ea701..a862e3eef5 100644
--- a/tests/PHPUnit/Fixtures/UITestFixture.php
+++ b/tests/PHPUnit/Fixtures/UITestFixture.php
@@ -40,6 +40,7 @@ use Piwik\Plugins\UsersManager\Model;
use Piwik\Plugins\UsersManager\UserUpdater;
use Piwik\Plugins\VisitsSummary\API as VisitsSummaryAPI;
use Piwik\ReportRenderer;
+use Piwik\Tests\Framework\TestCase\SystemTestCase;
use Piwik\Tests\Framework\XssTesting;
use Piwik\Plugins\ScheduledReports\API as APIScheduledReports;
use Psr\Container\ContainerInterface;
@@ -311,7 +312,11 @@ class UITestFixture extends SqlDump
public static function getLocalTestSiteUrl()
{
- return self::getRootUrl() . "tests/resources/overlay-test-site-real/";
+ $url = self::getRootUrl() . "tests/resources/overlay-test-site-real/";
+
+ // when running tests on localhost we use 127.0.0.1 as url instead, so we have a different host in the iframe
+ // otherwise we would only test on the same host, which causes a lot less issues
+ return str_replace('localhost', '127.0.0.1', $url);
}
private function addNewSitesForSiteSelector()