Open aliu145 opened 6 years ago
Do you have an example of your configuration?
@emilyrohrbough @zinserjan She already provided an example linked in her comment. The issue occurs when you use the deepmerge package to inherit default configs. For whatever reason it runs the tests, but it doesn't produce any screenshots and compare functions are not attached to the browser instance causing them to be undefined.
But if I create the same exact config without using deepmerge, it works fine. Just kind of a bummer that a special case has to be made for this package.
I've run into this last week after I had to refactor to support visual regressions and multiremote style configs. I created a base config and then modify it for once for single browser tests and once for multi-browser. Now the single can't do screen compares because of the deepmerge issue. If I leave it in the base config, it errors out when running the multiremote setup.
I don't want to make two big config files just combat this issue when only 1 things changes between the config files. I might do that for the time being, though it would be nice if wdio-v-r supported both formats for capabilities styles or worked with deepmerge. Maybe the real issue is hidden in deepmerge and we need to merge config files a different way.
@tnypxl what package did you use instead of deepmerge? facing exact same issue.
@soduor I didn't use an alternative or anything. I basically just made a contraption with Object.assign
. I have one "default" and then just import and overwrite them in subsequent config files. Its not as elegant as deepmerge and I lose some of the DRYness, but it saves enough copying and pasting that I don't mind it.
I have 2 config files which "inherit" from a main config file that contain certain specific specs (i.e. setup like here). When I run from these "inherited" config files, even if I copy the required wdio-visual-regression config into these files, the browser.check____ do not produce screenshots (return undefined). However, if I run from the main "parent" config file, it does work. Do you know why this may be and how I can make the visual regression service work with inheriting from a main config file?