Skip to content

Commit

Permalink
Reintroduce tvOS as valid simulator version when matching for simulat…
Browse files Browse the repository at this point in the history
…ors (#1929) (#1969)

* reintroduce tvOS as valid target when matching simulators

* reintroduce matching of Apple TV devices test

Co-authored-by: Marcin Grzywaczewski <killavus@gmail.com>
  • Loading branch information
thymikee and Killavus authored Jun 16, 2023
1 parent 0f4bf8e commit 060eeba
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1027,4 +1027,41 @@ describe('findMatchingSimulator', () => {
version: 'iOS 16.0',
});
});

it('should return AppleTV devices if in the list', () => {
expect(
findMatchingSimulator(
{
devices: {
'com.apple.CoreSimulator.SimRuntime.tvOS-11-2': [
{
state: 'Booted',
availability: '(available)',
name: 'Apple TV',
udid: '816C30EA-38EA-41AC-BFDA-96FB632D522E',
},
{
state: 'Shutdown',
availability: '(available)',
name: 'Apple TV 4K',
udid: 'BCBB7E4B-D872-4D61-BC61-7C9805551075',
},
{
state: 'Shutdown',
availability: '(available)',
name: 'Apple TV 4K (at 1080p)',
udid: '1DE12308-1C14-4F0F-991E-A3ADC41BDFFC',
},
],
},
},
{simulator: 'Apple TV'},
),
).toEqual({
udid: '816C30EA-38EA-41AC-BFDA-96FB632D522E',
name: 'Apple TV',
booted: true,
version: 'tvOS 11.2',
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function findMatchingSimulator(
}

// Making sure the version of the simulator is an iOS or tvOS (Removes Apple Watch, etc)
if (!version.includes('iOS')) {
if (!version.includes('iOS') && !version.includes('tvOS')) {
continue;
}
if (simulatorVersion && !version.endsWith(simulatorVersion)) {
Expand Down

0 comments on commit 060eeba

Please sign in to comment.