Skip to content

Commit

Permalink
[snapshot] Add Support for New Apple Devices in Snapshot Generator (#…
Browse files Browse the repository at this point in the history
…21554)

* feat(snapshot): Add support for new Apple devices

- Introduce iPhone 14 & 15 series
- Add Apple Watch Series 5, 6, 7, 9, and Ultra 2
- Incorporate iPad Pro 4th & 6th gen
- Include Apple TV 4K 3rd gen

* feat(snapshot): Add iPhone 14 Pro support and update tests

* Revert "feat(snapshot): Add iPhone 14 Pro support and update tests"

This reverts commit e11dd08.
  • Loading branch information
isandeepj committed Oct 6, 2023
1 parent c4ed1a4 commit eb37c5a
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion snapshot/lib/snapshot/reports_generator.rb
Expand Up @@ -84,6 +84,15 @@ def xcode_9_and_above_device_name_mappings
{
# snapshot in Xcode 9 saves screenshots with the SIMULATOR_DEVICE_NAME
# which includes spaces
'iPhone 15 Pro Max' => "iPhone 15 Pro Max",
'iPhone 15 Pro' => "iPhone 15 Pro",
'iPhone 15 Plus' => "iPhone 15 Plus",
'iPhone 15' => "iPhone 15",
'iPhone 14 Pro Max' => "iPhone 14 Pro Max",
'iPhone 14 Pro' => "iPhone 14 Pro",
'iPhone 14 Plus' => "iPhone 14 Plus",
'iPhone 14' => "iPhone 14",
'iPhone SE (3rd generation)' => "iPhone SE (3rd generation)",
'iPhone 13 Pro Max' => "iPhone 13 Pro Max",
'iPhone 13 Pro' => "iPhone 13 Pro",
'iPhone 13 mini' => "iPhone 13 mini",
Expand Down Expand Up @@ -112,9 +121,11 @@ def xcode_9_and_above_device_name_mappings
'iPhone SE' => "iPhone SE",
'iPhone 4s' => "iPhone 4s (3.5-Inch)",
'iPad 2' => 'iPad 2',
'iPad Air (5th generation)' => 'iPad Air (5th generation)',
'iPad Air (3rd generation)' => 'iPad Air (3rd generation)',
'iPad Air 2' => 'iPad Air 2',
'iPad Air' => 'iPad Air',
'iPad (10th generation)' => 'iPad (10th generation)',
'iPad (5th generation)' => 'iPad (5th generation)',
'iPad (7th generation)' => 'iPad (7th generation)',
'iPad mini 2' => 'iPad mini 2',
Expand All @@ -124,8 +135,10 @@ def xcode_9_and_above_device_name_mappings
'iPad Pro (9.7-inch)' => 'iPad Pro (9.7-inch)',
'iPad Pro (9.7 inch)' => 'iPad Pro (9.7-inch)', # iOS 10.3.1 simulator
'iPad Pro (10.5-inch)' => 'iPad Pro (10.5-inch)',
'iPad Pro (11-inch) (4th generation)' => 'iPad Pro (11-inch) (4th generation)',
'iPad Pro (11-inch) (2nd generation)' => 'iPad Pro (11-inch) (2nd generation)',
'iPad Pro (11-inch)' => 'iPad Pro (11-inch)',
'iPad Pro (12.9-inch) (6th generation)' => 'iPad Pro (12.9-inch) (6th generation)',
'iPad Pro (12.9-inch) (4th generation)' => 'iPad Pro (12.9-inch) (4th generation)',
'iPad Pro (12.9-inch) (3rd generation)' => 'iPad Pro (12.9-inch) (3rd generation)',
'iPad Pro (12.9-inch) (2nd generation)' => 'iPad Pro (12.9-inch) (2nd generation)',
Expand All @@ -134,12 +147,27 @@ def xcode_9_and_above_device_name_mappings
'iPad Pro' => 'iPad Pro (12.9-inch)', # iOS 9.3 simulator
'iPod touch (7th generation)' => 'iPod touch (7th generation)',
'Apple TV 1080p' => 'Apple TV',
'Apple TV 4K (3rd generation)' => 'Apple TV 4K (3rd generation)',
'Apple TV 4K (3rd generation) (at 1080p)' => 'Apple TV 4K (3rd generation) (at 1080p)',
'Apple TV 4K (at 1080p)' => 'Apple TV 4K (at 1080p)',
'Apple TV 4K' => 'Apple TV 4K',
'Apple TV' => 'Apple TV',
'Mac' => 'Mac',
'Apple Watch Series 5 - 44mm' => 'Apple Watch Series 5 - 44mm',
'Apple Watch Series 6 - 44mm' => 'Apple Watch Series 6 - 44mm'
'Apple Watch Series 6 - 44mm' => 'Apple Watch Series 6 - 44mm',
'Apple Watch Series 5 (40mm)' => 'Apple Watch Series 5 (40mm)',
'Apple Watch Series 5 (44mm)' => 'Apple Watch Series 5 (44mm)',
'Apple Watch Series 6 (40mm)' => 'Apple Watch Series 6 (40mm)',
'Apple Watch Series 6 (44mm)' => 'Apple Watch Series 6 (44mm)',
'Apple Watch Series 7 (41mm)' => 'Apple Watch Series 7 (41mm)',
'Apple Watch Series 7 (45mm)' => 'Apple Watch Series 7 (45mm)',
'Apple Watch Series 8 (41mm)' => 'Apple Watch Series 8 (41mm)',
'Apple Watch Series 8 (45mm)' => 'Apple Watch Series 8 (45mm)',
'Apple Watch Series 9 (41mm)' => 'Apple Watch Series 9 (41mm)',
'Apple Watch Series 9 (45mm)' => 'Apple Watch Series 9 (45mm)',
'Apple Watch SE (40mm)' => 'Apple Watch SE (40mm)',
'Apple Watch SE (44mm)' => 'Apple Watch SE (44mm)',
'Apple Watch Ultra 2 (49mm)' => 'Apple Watch Ultra 2 (49mm)'
}
end

Expand Down

0 comments on commit eb37c5a

Please sign in to comment.