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:
Diffstat (limited to 'plugins/TestRunner/Commands/TestsRunUI.php')
-rw-r--r--plugins/TestRunner/Commands/TestsRunUI.php24
1 files changed, 22 insertions, 2 deletions
diff --git a/plugins/TestRunner/Commands/TestsRunUI.php b/plugins/TestRunner/Commands/TestsRunUI.php
index faf436a8af..3a9a06c080 100644
--- a/plugins/TestRunner/Commands/TestsRunUI.php
+++ b/plugins/TestRunner/Commands/TestsRunUI.php
@@ -26,7 +26,7 @@ class TestsRunUI extends ConsoleCommand
\nRun one spec:
\n./console tests:run-ui UIIntegrationTest
");
- $this->addArgument('specs', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Run only a specific test spec. Separate multiple specs by comma, for instance core,integration', array());
+ $this->addArgument('specs', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Run only a specific test spec. Separate multiple specs by a space, for instance UIIntegrationTest ', array());
$this->addOption("persist-fixture-data", null, InputOption::VALUE_NONE, "Persist test data in a database and do not execute tear down.");
$this->addOption('keep-symlinks', null, InputOption::VALUE_NONE, "Keep recursive directory symlinks so test pages can be viewed in a browser.");
$this->addOption('print-logs', null, InputOption::VALUE_NONE, "Print webpage logs even if tests succeed.");
@@ -35,6 +35,9 @@ class TestsRunUI extends ConsoleCommand
$this->addOption('plugin', null, InputOption::VALUE_REQUIRED, "Execute all tests for a plugin.");
$this->addOption('core', null, InputOption::VALUE_NONE, "Execute only tests for Piwik core & core plugins.");
$this->addOption('skip-delete-assets', null, InputOption::VALUE_NONE, "Skip deleting of merged assets (will speed up a test run, but not by a lot).");
+ $this->addOption('screenshot-repo', null, InputOption::VALUE_NONE, "For tests");
+ $this->addOption('store-in-ui-tests-repo', null, InputOption::VALUE_NONE, "For tests");
+ $this->addOption('extra-options', null, InputOption::VALUE_REQUIRED, "Extra options to pass to phantomjs.");
}
protected function execute(InputInterface $input, OutputInterface $output)
@@ -48,6 +51,9 @@ class TestsRunUI extends ConsoleCommand
$plugin = $input->getOption('plugin');
$skipDeleteAssets = $input->getOption('skip-delete-assets');
$core = $input->getOption('core');
+ $extraOptions = $input->getOption('extra-options');
+ $storeInUiTestsRepo = $input->getOption('store-in-ui-tests-repo');
+ $screenshotRepo = $input->getOption('screenshot-repo');
if (!$skipDeleteAssets) {
AssetManager::getInstance()->removeMergedAssets();
@@ -84,6 +90,18 @@ class TestsRunUI extends ConsoleCommand
$options[] = "--core";
}
+ if ($storeInUiTestsRepo) {
+ $options[] = "--store-in-ui-tests-repo";
+ }
+
+ if ($screenshotRepo) {
+ $options[] = "--screenshot-repo";
+ }
+
+ if ($extraOptions) {
+ $options[] = $extraOptions;
+ }
+
$options = implode(" ", $options);
$specs = implode(" ", $specs);
@@ -93,7 +111,9 @@ class TestsRunUI extends ConsoleCommand
$output->writeln('Executing command: <info>' . $cmd . '</info>');
$output->writeln('');
- passthru($cmd);
+ passthru($cmd, $returnCode);
+
+ return $returnCode;
}
/**