diff --git a/packages/react-native/src/generators/application/lib/add-detox.ts b/packages/react-native/src/generators/application/lib/add-detox.ts index 61cdc400cada1..981a118169afc 100644 --- a/packages/react-native/src/generators/application/lib/add-detox.ts +++ b/packages/react-native/src/generators/application/lib/add-detox.ts @@ -11,8 +11,9 @@ export async function addDetox(host: Tree, options: NormalizedSchema) { return detoxApplicationGenerator(host, { ...options, linter: Linter.EsLint, - e2eName: `${options.name}-e2e`, - e2eDirectory: options.directory, + e2eName: `${options.projectName}-e2e`, + e2eDirectory: `${options.appProjectRoot}-e2e`, + projectNameAndRootFormat: 'as-provided', appProject: options.projectName, appDisplayName: options.displayName, appName: options.name,