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:
authordiosmosis <diosmosis@users.noreply.github.com>2018-06-01 21:44:31 +0300
committerStefan Giehl <stefan@piwik.org>2018-06-01 21:44:31 +0300
commit89715269ed0ba616e2f508ef4cf6d43367cc8b1b (patch)
tree22e08461f8ce072c44c9e8060af5d28ac49a7a21 /plugins/TestRunner
parent4eb38fd6eaaef6643a794aba4457143434a68e14 (diff)
Fix some UI tests, including random failure + allow --piwik-domain use in tests:run-ui (#13027)
* Forward --piwik-domain to sub-commands from tests:run-ui. * temp commit debugging * Predictable screenshots for realtime map in dashboard. * Fix translation regression. * Update UI test case & screenshots. * Remove it.only * update screenshot * removes unused use statements
Diffstat (limited to 'plugins/TestRunner')
-rw-r--r--plugins/TestRunner/Commands/TestsRunUI.php6
-rw-r--r--plugins/TestRunner/Commands/TestsSetupFixture.php2
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/TestRunner/Commands/TestsRunUI.php b/plugins/TestRunner/Commands/TestsRunUI.php
index dc31162929..69b512b8aa 100644
--- a/plugins/TestRunner/Commands/TestsRunUI.php
+++ b/plugins/TestRunner/Commands/TestsRunUI.php
@@ -56,6 +56,7 @@ class TestsRunUI extends ConsoleCommand
$storeInUiTestsRepo = $input->getOption('store-in-ui-tests-repo');
$screenshotRepo = $input->getOption('screenshot-repo');
$debug = $input->getOption('debug');
+ $piwikDomain = $input->getOption('piwik-domain');
if (!$skipDeleteAssets) {
AssetManager::getInstance()->removeMergedAssets();
@@ -65,6 +66,11 @@ class TestsRunUI extends ConsoleCommand
$options = array();
$phantomJsOptions = array();
+
+ if ($piwikDomain) {
+ $options[] = "--piwik-domain=$piwikDomain";
+ }
+
if ($persistFixtureData) {
$options[] = "--persist-fixture-data";
}
diff --git a/plugins/TestRunner/Commands/TestsSetupFixture.php b/plugins/TestRunner/Commands/TestsSetupFixture.php
index f6263fafee..1d8c4cd186 100644
--- a/plugins/TestRunner/Commands/TestsSetupFixture.php
+++ b/plugins/TestRunner/Commands/TestsSetupFixture.php
@@ -162,7 +162,7 @@ class TestsSetupFixture extends ConsoleCommand
// setting symlink might fail when the symlink already exists but pointing to a no longer existing path/file
// eg when sometimes running it on a VM and sometimes on the VM's host itself.
if (!$success) {
- unlink($target);
+ unlink($linkPath);
symlink($target, $linkPath);
}
}