unable to select in production/staging build
See original GitHub issueI’m getting the following errors when running test for production build, while those pass on local dev build.
Error: testcafe-react-selectors supports React version 15.x and newer
1) The specified selector does not match any element in the DOM tree.
Browser: Electron 1.7.5 / Mac OS X 10.12.6
I’m currently using preact
in production, but tested with it disabled as well, where still gets the following errors
1) The specified selector does not match any element in the DOM tree.
The react classname is uglified in my production build, which leads to the selector to be invalid.
Was wondering if there’s a workaround to get it work with production/staging build?
Issue Analytics
- State:
- Created 6 years ago
- Comments:15
Top Results From Across the Web
How to configure independent sets of runtime settings in Xcode
In this case you propose to create new build configurations to select appropriate runtime settings. Build configurations are for the build phase ...
Read more >Sites and Environments - Support Center - WP Engine
Learn how to create and use Sites as well as Production, Staging and Development ... Select the Environment type for this new environment....
Read more >Where Should You Tune Queries: Production, Staging, or ...
The #1 fastest way to tune queries is in the production database, on the production server. I know. Put the knife down.
Read more >Troubleshooting - Strapi Developer Docs
Below are answers and solutions to most common issues that you may experience when working with Strapi. # Why can't I create or...
Read more >Managing Production and Development Settings in ASP.NET ...
ASP.NET Core provides three tools for managing your application's configuration. At a course-grained level, you can select your appsettings file ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
SOLUTION: If you are using
webpack>=4
, add this to your webpack production config:Here is a reproducible example of this:
Errors:
Failing test
See the diff for this here
I am using webpack to package the production build.
UPDATE: works if i change webpack config mode to
'development'
. Also even if i add the recommended uglify settings to the app, that doesn’t fix the issue. I’m thinking the issue has to do with webpack’s default minification in webpack 4. Here is the fixI’m closing this issue because no activity has been encountered for a long time. Feel free to reopen the issue if the problem persists and you can provide an example to reproduce it.