@@ -249,81 +249,7 @@ test('one valid cs autolink dependency', () => {
249249 ) ;
250250} ) ;
251251
252- test ( 'ensureXAMLDialect - useWinUI3=true in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props' , async ( ) => {
253- const folder = path . resolve ( 'src/e2etest/projects/WithWinUI3' ) ;
254-
255- // Create project with UseWinUI3 == false in ExperimentalFeatures.props
256- await ensureCppAppProject ( folder , 'WithWinUI3' , false , false , false ) ;
257-
258- const rnc = require ( path . join ( folder , 'react-native.config.js' ) ) ;
259-
260- const config = projectConfigWindows ( folder , rnc . project . windows ) ! ;
261- // Set useWinUI3=true in react-native.config.js
262- config . useWinUI3 = true ;
263-
264- const al = new AutoLinkTest (
265- { windows : config } ,
266- { } ,
267- {
268- check : false ,
269- logging : false ,
270- } ,
271- ) ;
272- al . experimentalFeaturesProps = `<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><UseWinUI3>false</UseWinUI3></PropertyGroup></Project>` ;
273- al . packagesConfig = `<packages><package id="SuperPkg" version="42"/></packages>` ;
274-
275- const exd = await al . ensureXAMLDialect ( ) ;
276- expect ( exd ) . toBeTruthy ( ) ;
277-
278- const expectedExperimentalFeatures =
279- '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><UseWinUI3>true</UseWinUI3></PropertyGroup></Project>' ;
280- expect ( al . experimentalFeaturesProps ) . toEqual ( expectedExperimentalFeatures ) ;
281-
282- // example packages.config:
283- // <packages>
284- // <package id="SuperPkg" version="42"/>
285- // <package id="Microsoft.WindowsAppSDK" version="1.0.0" targetFramework="native"/>
286- // </packages>
287- //
288- expect ( al . packagesConfig ) . toContain ( 'Microsoft.WindowsAppSDK' ) ;
289- expect ( al . packagesConfig ) . toContain ( '<package id="SuperPkg" version="42"/>' ) ;
290- expect ( al . packagesConfig ) . not . toContain ( 'Microsoft.UI.Xaml' ) ;
291- } ) ;
292-
293- test ( 'ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props' , async ( ) => {
294- const folder = path . resolve ( 'src/e2etest/projects/WithWinUI3' ) ;
295- const rnc = require ( path . join ( folder , 'react-native.config.js' ) ) ;
296-
297- const config = projectConfigWindows ( folder , rnc . project . windows ) ! ;
298- config . useWinUI3 = false ;
299- const al = new AutoLinkTest (
300- { windows : config } ,
301- { } ,
302- {
303- check : false ,
304- logging : false ,
305- } ,
306- ) ;
307- al . experimentalFeaturesProps = `<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><UseWinUI3>true</UseWinUI3></PropertyGroup></Project>` ;
308- al . packagesConfig = `<packages><package id="SuperPkg" version="42"/></packages>` ;
309252
310- const exd = await al . ensureXAMLDialect ( ) ;
311- expect ( exd ) . toBeTruthy ( ) ;
312-
313- const expectedExperimentalFeatures =
314- '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><UseWinUI3>false</UseWinUI3></PropertyGroup></Project>' ;
315- expect ( al . experimentalFeaturesProps ) . toEqual ( expectedExperimentalFeatures ) ;
316-
317- // example packages.config:
318- // <packages>
319- // <package id="SuperPkg" version="42"/>
320- // <package id="Microsoft.WindowsAppSDK" version="1.0.0" targetFramework="native"/>
321- // </packages>
322- //
323- expect ( al . packagesConfig ) . not . toContain ( 'Microsoft.WindowsAppSDK' ) ;
324- expect ( al . packagesConfig ) . toContain ( '<package id="SuperPkg" version="42"/>' ) ;
325- expect ( al . packagesConfig ) . toContain ( 'Microsoft.UI.Xaml' ) ;
326- } ) ;
327253
328254test ( 'ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props' , async ( ) => {
329255 const folder = path . resolve ( 'src/e2etest/projects/WithWinUI3' ) ;
0 commit comments