Skip to content
Extraits de code Groupes Projets
Valider d53dba6f rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Remove --use-github-expected option and use new --assume-artifacts option in...

Remove --use-github-expected option and use new --assume-artifacts option in screenshot testrunner so diffviewer output will be accurate when uploaded to artifacts server.
parent 2568598f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -52,8 +52,8 @@ Application.prototype.printHelpAndExit = function () {
console.log(" --print-logs: Prints webpage logs even if tests succeed.");
console.log(" --store-in-ui-tests-repo: Stores processed screenshots within the UI tests repository even if");
console.log(" the tests are in another plugin. For use with travis build.");
console.log(" --use-github-expected: Only show the github expected file links in diffviewer.html output.");
console.log(" For use with travis build.");
console.log(" --assume-artifacts: Assume the diffviewer and processed screenshots will be stored on the.");
console.log(" builds artifacts server. For use with travis build.");
phantom.exit(0);
};
......
......@@ -71,7 +71,7 @@ DiffViewerGenerator.prototype.generate = function (callback) {
+ entry.name + '.png';
var expectedHtml = '';
if (!options['use-github-expected']) {
if (!options['assume-artifacts']) {
expectedHtml += '<a href="' + expectedUrl + '">Expected</a>&nbsp;';
}
expectedHtml += '<a href="' + expectedUrlGithub + '">[Github]</a>';
......@@ -80,7 +80,11 @@ DiffViewerGenerator.prototype.generate = function (callback) {
}
if (entry.processed) {
entry.processedUrl = self.getUrlForPath(entry.processed);
if (options['assume-artifacts']) {
entry.processedUrl = path.join("../processed-ui-screenshots", path.basename(entry.processed));
} else {
entry.processedUrl = self.getUrlForPath(entry.processed);
}
}
var entryLocationHint = '',
......
......@@ -16,6 +16,11 @@ exports.dirname = function (path) {
return lastSeparator == -1 ? path : path.substring(0, lastSeparator);
};
exports.basename = function (path) {
var lastSeparator = path.lastIndexOf("/");
return lastSeparator == -1 ? path : path.substring(lastSeparator + 1);
};
exports.resolve = function (path) {
if (path.charAt(0) != '/') {
path = exports.join(__dirname, path);
......
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