Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .ado/stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ stages:
buildEnvironment: ${{ parameters.buildEnvironment }}
AgentPool: ${{ parameters.AgentPool }}

# - template: jobs/node-tests.yml
# parameters:
# buildEnvironment: ${{ parameters.buildEnvironment }}
# AgentPool: ${{ parameters.AgentPool }}
- template: jobs/node-tests.yml
parameters:
buildEnvironment: ${{ parameters.buildEnvironment }}
AgentPool: ${{ parameters.AgentPool }}

- template: jobs/macos-tests.yml

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Fix broken CLI tests",
"packageName": "@react-native-windows/cli",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,10 @@ export function getRnwConfig(
root: string,
projectFile: string,
): Record<string, any> | undefined {
const pkgJson = require(path.join(root, 'package.json'));
const pkgPath = path.join(root, 'package.json');
const pkgJson = fs.existsSync(pkgPath)
? require(path.join(root, 'package.json'))
: {};

const config: Record<string, any> = pkgJson['react-native-windows'] ?? {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ exports[`dependencyConfig - SimpleCSharpLib (Ignore react-native.config.js) 1`]
"projectName": "SimpleCSharpLib",
},
],
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cs-lib",
},
},
"solutionFile": "SimpleCSharpLib.sln",
"sourceDir": "windows",
}
Expand Down Expand Up @@ -107,6 +112,11 @@ exports[`dependencyConfig - SimpleCSharpLib (Use react-native.config.js) 1`] = `
"projectName": "SimpleCSharpLib",
},
],
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cs-lib",
},
},
"solutionFile": "SimpleCSharpLib.sln",
"sourceDir": "windows",
}
Expand Down Expand Up @@ -165,6 +175,11 @@ exports[`dependencyConfig - SimpleCppLib (Ignore react-native.config.js) 1`] = `
"projectName": "SimpleCppLib",
},
],
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-lib",
},
},
"solutionFile": "SimpleCppLib.sln",
"sourceDir": "windows",
}
Expand Down Expand Up @@ -195,6 +210,11 @@ exports[`dependencyConfig - SimpleCppLib (Use react-native.config.js) 1`] = `
"projectName": "SimpleCppLib",
},
],
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-lib",
},
},
"solutionFile": "SimpleCppLib.sln",
"sourceDir": "windows",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ exports[`projectConfig - MissingProjectFilesApp (Ignore react-native.config.js)
"project": {
"projectFile": "Error: No app project file found, please specify in react-native.config.",
},
"rnwConfig": {
"init-windows": {},
},
"solutionFile": "Error: No app solution file found, please specify in react-native.config.",
"sourceDir": "windows",
}
Expand All @@ -21,6 +24,9 @@ exports[`projectConfig - MissingProjectFilesApp (Use react-native.config.js) 1`]
"project": {
"projectFile": "Error: Project is required but not specified in react-native.config.",
},
"rnwConfig": {
"init-windows": {},
},
"solutionFile": "Error: Solution file is required but not specified in react-native.config.",
"sourceDir": "windows",
}
Expand All @@ -32,7 +38,6 @@ exports[`projectConfig - SimpleCSharpApp (Ignore react-native.config.js) 1`] = `
"ReactExperimentalFeaturesSet": "true",
"UseExperimentalNuget": "false",
"UseHermes": "false",
"UseWinUI3": "false",
},
"folder": StringContaining "SimpleCSharpApp",
"project": {
Expand All @@ -41,6 +46,11 @@ exports[`projectConfig - SimpleCSharpApp (Ignore react-native.config.js) 1`] = `
"projectLang": "cs",
"projectName": "SimpleCSharpApp",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cs-app",
},
},
"solutionFile": "SimpleCSharpApp.sln",
"sourceDir": "windows",
}
Expand All @@ -52,7 +62,6 @@ exports[`projectConfig - SimpleCSharpApp (Use react-native.config.js) 1`] = `
"ReactExperimentalFeaturesSet": "true",
"UseExperimentalNuget": "false",
"UseHermes": "false",
"UseWinUI3": "false",
},
"folder": StringContaining "SimpleCSharpApp",
"project": {
Expand All @@ -61,6 +70,11 @@ exports[`projectConfig - SimpleCSharpApp (Use react-native.config.js) 1`] = `
"projectLang": "cs",
"projectName": "SimpleCSharpApp",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cs-app",
},
},
"solutionFile": "SimpleCSharpApp.sln",
"sourceDir": "windows",
}
Expand All @@ -72,7 +86,6 @@ exports[`projectConfig - SimpleCppApp (Ignore react-native.config.js) 1`] = `
"ReactExperimentalFeaturesSet": "true",
"UseExperimentalNuget": "false",
"UseHermes": "false",
"UseWinUI3": "false",
},
"folder": StringContaining "SimpleCppApp",
"project": {
Expand All @@ -81,6 +94,11 @@ exports[`projectConfig - SimpleCppApp (Ignore react-native.config.js) 1`] = `
"projectLang": "cpp",
"projectName": "SimpleCppApp",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-app",
},
},
"solutionFile": "SimpleCppApp.sln",
"sourceDir": "windows",
}
Expand All @@ -92,7 +110,6 @@ exports[`projectConfig - SimpleCppApp (Use react-native.config.js) 1`] = `
"ReactExperimentalFeaturesSet": "true",
"UseExperimentalNuget": "false",
"UseHermes": "false",
"UseWinUI3": "false",
},
"folder": StringContaining "SimpleCppApp",
"project": {
Expand All @@ -101,6 +118,11 @@ exports[`projectConfig - SimpleCppApp (Use react-native.config.js) 1`] = `
"projectLang": "cpp",
"projectName": "SimpleCppApp",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-app",
},
},
"solutionFile": "SimpleCppApp.sln",
"sourceDir": "windows",
}
Expand All @@ -112,7 +134,6 @@ exports[`projectConfig - WithExperimentalNuget (Ignore react-native.config.js) 1
"ReactExperimentalFeaturesSet": "true",
"UseExperimentalNuget": "true",
"UseHermes": "false",
"UseWinUI3": "false",
},
"folder": StringContaining "WithExperimentalNuget",
"project": {
Expand All @@ -121,6 +142,11 @@ exports[`projectConfig - WithExperimentalNuget (Ignore react-native.config.js) 1
"projectLang": "cpp",
"projectName": "WithExperimentalNuGet",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-app",
},
},
"solutionFile": "WithExperimentalNuGet.sln",
"sourceDir": "windows",
}
Expand All @@ -132,7 +158,6 @@ exports[`projectConfig - WithExperimentalNuget (Use react-native.config.js) 1`]
"ReactExperimentalFeaturesSet": "true",
"UseExperimentalNuget": "true",
"UseHermes": "false",
"UseWinUI3": "false",
},
"folder": StringContaining "WithExperimentalNuget",
"project": {
Expand All @@ -141,6 +166,11 @@ exports[`projectConfig - WithExperimentalNuget (Use react-native.config.js) 1`]
"projectLang": "cpp",
"projectName": "WithExperimentalNuGet",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-app",
},
},
"solutionFile": "WithExperimentalNuGet.sln",
"sourceDir": "windows",
}
Expand All @@ -152,7 +182,6 @@ exports[`projectConfig - WithHermes (Ignore react-native.config.js) 1`] = `
"ReactExperimentalFeaturesSet": "true",
"UseExperimentalNuget": "false",
"UseHermes": "true",
"UseWinUI3": "false",
},
"folder": StringContaining "WithHermes",
"project": {
Expand All @@ -161,6 +190,11 @@ exports[`projectConfig - WithHermes (Ignore react-native.config.js) 1`] = `
"projectLang": "cpp",
"projectName": "WithHermes",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-app",
},
},
"solutionFile": "WithHermes.sln",
"sourceDir": "windows",
}
Expand All @@ -172,7 +206,6 @@ exports[`projectConfig - WithHermes (Use react-native.config.js) 1`] = `
"ReactExperimentalFeaturesSet": "true",
"UseExperimentalNuget": "false",
"UseHermes": "true",
"UseWinUI3": "false",
},
"folder": StringContaining "WithHermes",
"project": {
Expand All @@ -181,6 +214,11 @@ exports[`projectConfig - WithHermes (Use react-native.config.js) 1`] = `
"projectLang": "cpp",
"projectName": "WithHermes",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-app",
},
},
"solutionFile": "WithHermes.sln",
"sourceDir": "windows",
}
Expand All @@ -197,6 +235,9 @@ exports[`projectConfig - WithIndirectDependency (Ignore react-native.config.js)
"project": {
"projectFile": "Error: Too many app project files found, please specify in react-native.config.",
},
"rnwConfig": {
"init-windows": {},
},
"solutionFile": "WithIndirectDependency.sln",
"sourceDir": "windows",
}
Expand All @@ -216,6 +257,11 @@ exports[`projectConfig - WithIndirectDependency (Use react-native.config.js) 1`]
"projectLang": "cpp",
"projectName": "WithIndirectDependency",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-app",
},
},
"solutionFile": "WithIndirectDependency.sln",
"sourceDir": "windows",
"useWinUI3": false,
Expand All @@ -228,7 +274,6 @@ exports[`projectConfig - WithWinUI3 (Ignore react-native.config.js) 1`] = `
"ReactExperimentalFeaturesSet": "true",
"UseExperimentalNuget": "false",
"UseHermes": "false",
"UseWinUI3": "true",
},
"folder": StringContaining "WithWinUI3",
"project": {
Expand All @@ -237,6 +282,11 @@ exports[`projectConfig - WithWinUI3 (Ignore react-native.config.js) 1`] = `
"projectLang": "cpp",
"projectName": "WithWinUI3",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-app",
},
},
"solutionFile": "WithWinUI3.sln",
"sourceDir": "windows",
}
Expand All @@ -248,7 +298,6 @@ exports[`projectConfig - WithWinUI3 (Use react-native.config.js) 1`] = `
"ReactExperimentalFeaturesSet": "true",
"UseExperimentalNuget": "false",
"UseHermes": "false",
"UseWinUI3": "true",
},
"folder": StringContaining "WithWinUI3",
"project": {
Expand All @@ -257,6 +306,11 @@ exports[`projectConfig - WithWinUI3 (Use react-native.config.js) 1`] = `
"projectLang": "cpp",
"projectName": "WithWinUI3",
},
"rnwConfig": {
"init-windows": {
"template": "old/uwp-cpp-app",
},
},
"solutionFile": "WithWinUI3.sln",
"sourceDir": "windows",
}
Expand All @@ -281,14 +335,6 @@ exports[`useWinUI3=true in react-native.config.js, UseWinUI3=false in Experiment
-->
<UseHermes>false</UseHermes>

<!--
Changes compilation to assume use of WinUI 3 instead of System XAML.
Requires creation of new project.

See https://microsoft.github.io/react-native-windows/docs/winui3
-->
<UseWinUI3>false</UseWinUI3>

<!--
Changes compilation to assume use of Microsoft.ReactNative NuGet packages
instead of building the framework from source.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ test.each(projects)(
},
);

test('useWinUI3=true in react-native.config.js, UseWinUI3=false in ExperimentalFeatures.props', async () => {
// Skipping this test as the feature is broken and needs to be removed, see https://github.com/microsoft/react-native-windows/issues/14601
test.skip('useWinUI3=true in react-native.config.js, UseWinUI3=false in ExperimentalFeatures.props', async () => {
const folder = path.resolve('src/e2etest/projects/WithWinUI3');

// Create project with UseWinUI3 == false in ExperimentalFeatures.props
Expand Down
Loading