Tengo un código de frontend basado en mecanografiado de reacción sin htaccess o inicio de sesión ejecutándose en mi localhost. También instalé con éxito Ruby y Wraith en este proyecto para probar las regresiones visuales entre el servidor de desarrollo y mi servidor local. Parece que todo funciona bien, Wraith se ejecuta sin errores, pero las imágenes de mi localhost están en blanco, dev env se captura bien.
Esta es mi captura.yaml:
#Headless browser option browser: phantomjs: "phantomjs" # slimerjs: "slimerjs" #If you want to have multiple snapping files, set the file name her # Type the name of the directory that shots will be stored in directory: 'shots' # Add only 2 domains, key will act as a label domains: english: "http://localhost:3000" russian: "http://www.live.bbc.co.uk/" #Type screen widths below, here are a couple of examples screen_widths: - 1280 #Type page URL paths below, here are a couple of examples paths: home: / #Amount of fuzz ImageMagick will use fuzz: '20%' #Set the number of days to keep the site spider file spider_days: - 10 #Choose how results are displayed, by default alphanumeric. Different screen widths are always grouped. #alphanumeric - all paths (with, and without, a difference) are shown, sorted by path #diffs_first - all paths (with, and without, a difference) are shown, sorted by difference size (largest first) #diffs_only - only paths with a difference are shown, sorted by difference size (largest first) mode: diffs_first before_capture: "javascript/wait--phantom.js"Este es mi archivo wait--phantom.js:
// ###################################################### // This is an example module provided by Wraith. // Feel free to amend for your own requirements. // ###################################################### module.exports = function (phantom, ready) { // make Wraith wait a bit longer before taking the screenshot setTimeout(ready, 10000); // you MUST call the ready() callback for Wraith to continue }Traté de hacerlo funcionar con ngrok o host virtual, pero sigue siendo el mismo problema.