Skip to content
Extraits de code Groupes Projets
Valider 395c40bd rédigé par Matthieu Napoli's avatar Matthieu Napoli Validation de sgiehl
Parcourir les fichiers

ref #7726 Enable git-lfs for UI screenshots

parent 025de644
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
tests/UI/expected-screenshots/*.png filter=lfs diff=lfs merge=lfs -crlf
# auto detect text files and perform LF normalization
* text eol=lf
......@@ -40,4 +42,4 @@
*.WOFF2 binary
# Custom for Visual Studio
*.cs diff=csharp
*.cs diff=csharp
\ No newline at end of file
......@@ -156,8 +156,8 @@ class GenerateTest extends GeneratePluginBase
'/tests',
'/tests/UI',
'/tests/UI/.gitignore',
'/tests/UI/expected-ui-screenshots',
'/tests/UI/expected-ui-screenshots/.gitkeep',
'/tests/UI/expected-screenshots',
'/tests/UI/expected-screenshots/.gitkeep',
'/tests/UI/SimpleUITest_spec.js',
);
}
......
......@@ -47,7 +47,7 @@ class SyncScreenshots extends ConsoleCommand
$this->setName('tests:sync-ui-screenshots');
$this->setAliases(array('development:sync-ui-test-screenshots'));
$this->setDescription('For Piwik core devs. Copies screenshots '
. 'from travis artifacts to the tests/UI/expected-ui-screenshots/ folder');
. 'from travis artifacts to the tests/UI/expected-screenshots/ folder');
$this->addArgument('buildnumber', InputArgument::REQUIRED, 'Travis build number you want to sync.');
$this->addArgument('screenshotsRegex', InputArgument::OPTIONAL,
'A regex to use when selecting screenshots to copy. If not supplied all screenshots are copied.', '.*');
......@@ -149,7 +149,7 @@ git push";
$commands .= "
cd ..
git pull
git add expected-ui-screenshots/
git add expected-screenshots/
git status
git commit -m 'UI tests: ...' # Copy paste the good commit message
echo -e \"\n--> Check the commit above is correct... <---\n\"
......@@ -169,10 +169,10 @@ cd ../../../../../";
$plugin = $this->getPluginName($repository);
if (empty($plugin)) {
return PIWIK_DOCUMENT_ROOT . '/tests/UI/expected-ui-screenshots/';
return PIWIK_DOCUMENT_ROOT . "/tests/UI/expected-screenshots/";
}
$downloadTo = PIWIK_DOCUMENT_ROOT . "/plugins/$plugin/tests/UI/expected-ui-screenshots/";
$downloadTo = PIWIK_DOCUMENT_ROOT . "/plugins/$plugin/tests/UI/expected-screenshots/";
if(is_dir($downloadTo)) {
return $downloadTo;
}
......
......@@ -33,12 +33,12 @@ To fix a broken build, follow these steps:
* If a change is not wanted, revert or fix your commit.
* If a change is correct, then you can set the new screenshot as the expected screenshot.
To do so, in the diffviewer.html page click on the "Processed" link for this screenshot.
Then "Save this file as" and save it in the piwik/tests/UI/expected-ui-screenshots/ directory.
Then "Save this file as" and save it in the piwik/tests/UI/expected-screenshots/ directory.
(If the screenshot test is for a plugin and not Piwik Core, the expected screenshot should be added to the
plugin's expected screenshot directory. For example: piwik/plugins/DBStats/tests/UI/expected-ui-screenshots.)
plugin's expected screenshot directory. For example: piwik/plugins/DBStats/tests/UI/expected-screenshots.)
_Note: When determining whether a screenshot is correct, the data displayed is not important. Report data correctness is verified through System and other PHP tests. The UI tests should only test UI behavior._
* Push the changes (to your code and/or to the expected-ui-screenshots directory.
* Push the changes (to your code and/or to the expected-screenshots directory).
* Wait for next Test build [on travis](https://travis-ci.org/piwik/piwik). Hopefully, the build should be green!
_Note: the `tests:sync-ui-screenshots` console command can be used to speed up the process. Run `./console tests:sync-ui-screenshots -h` to learn more._
......
......@@ -45,7 +45,7 @@ exports.reporter = "spec";
/**
* The directory that stores expected screenshots. Relative to the UI repo's root directoriy.
*/
exports.expectedScreenshotsDir = "./expected-ui-screenshots";
exports.expectedScreenshotsDir = "./expected-screenshots";
/**
* The directory that stores processed screenshots. Relative to the UI repo's root directory.
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter