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

Complete rendering even if capture selector cannot be found so failing tests...

Complete rendering even if capture selector cannot be found so failing tests can be better debugged. In screenshot testing lib.
parent 1fedbbd0
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -280,7 +280,8 @@ PageRenderer.prototype.capture = function (outputPath, callback, selector) {
}, selector);
if (!result) {
throw new Error("Cannot find element " + selector);
console.log("Cannot find element " + selector);
return;
}
if (result && result.__isCallError) {
......@@ -290,8 +291,10 @@ PageRenderer.prototype.capture = function (outputPath, callback, selector) {
if (null === result.left
|| null === result.top
|| null === result.bottom
|| null === result.right) {
throw new Error("Element(s) " + selector + " found but none is visible");
|| null === result.right
) {
console.log("Element(s) " + selector + " found but none is visible");
return;
}
page.clipRect = result;
......
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