Comments (1)
Hi @bewatts, we talked a little about this off-github - and I think you got things working correctly by switching to our NativeLoader and by adjusting gulp to compile the CSS to disk.
We've since released an update to the percy-capybara gem, that adds a FilesystemLoader. If you do have your css and images etc being compiled into a folder as part of your build process, then I'd recommend switching to the FilesystemLoader (it's faster, and solves a few other problems related to asset identification).
You configure it like this, where you're currently initializing your build:
assets_dir = File.expand_path("../../dist_assets", __FILE__)
Percy::Capybara.use_loader(:filesystem, assets_dir: assets_dir, base_url: '/assets')
Percy::Capybara.initialize_build
You will also need to specify an assets_dir
. assets_dir
is the absolute path where Percy can find your assets, and should contain your compiled static assets rather than your source assets.
You can also optionally provide a base_url
if your web-server serves assets with a path prefix.
If you try this, let me know how you get on?
Also, I'd love to understand a little more about your setup so we can better cater to this in the future. How are you embedding react in rails / serving html? Are you using react-rails or something similar?
Thanks Ben!
from percy-capybara.
Related Issues (20)
- Firefox autofocus HOT 3
- Styles not rendering in the screenshots HOT 4
- Canvas elements appear empty HOT 4
- Support for iFrames HOT 4
- broken snapshots dealing with DOM changes & responsiveness HOT 8
- Calling Percy.snapshot without a javascript driver silently does nothing HOT 2
- Error for duplicate snapshot name when retrying test HOT 4
- PercyAgent not defined HOT 6
- Issues with Apparition driver in 4.3.x HOT 7
- Dependabot couldn't find a package.json for this project
- 5.0.0.pre.3 breaks with `have_current_path` Capybara matcher HOT 2
- Per-snapshot widths not respected in 5.0.0.pre.4 HOT 5
- Node version requirement HOT 1
- percy-capybara 5.0.0 doesn't seem to work with cucumber
- «percy/healthcheck» does not return «x-percy-core-version»
- Global Configuration HOT 2
- What is the preferred way to define/use custom loaders? HOT 2
- Documentation around loaders HOT 15
- Webpacker 4 HOT 8
- Breaking change moving to Percy-Capybara v4 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from percy-capybara.