`e2e/tests/utils/openApp.js` too specific
- Dominant language
- Java
- Stars
- 34
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
The openApp.js utility file is a great work around for local development; however, when [bootstrapping](https://wix.github.io/Detox/docs/next/introduction/project-setup#step-1-bootstrap) / [setting up Detox](https://docs.expo.dev/build-reference/e2e-tests/#3-set-up-detox), the `detoxrc.js` file can refer to a config format such as `ios.sim.debug` or some other intermediate nomenclature between & .
As such, the conditional designed to check for a `debug` environment, only passes if it is the 2nd element of a "." split array.
I propose checking to see if the configuration name contains the word "debug" instead.
```
module.exports.openApp = async function openApp() {
const config = await resolveConfig();
if (config.configurationName.split(".").includes("debug")) {
return await openAppForDebugBuild(platform);
} else {
return await device.launchApp({
newInstance: true,
});
}
};
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.