Module: AndroidDeviceName
Constant Summary
AndroidDeviceNameGenerated::Galaxy_Note_10, AndroidDeviceNameGenerated::Galaxy_Note_10_Plus, AndroidDeviceNameGenerated::Galaxy_S10, AndroidDeviceNameGenerated::Galaxy_S10_Plus, AndroidDeviceNameGenerated::Galaxy_S20, AndroidDeviceNameGenerated::Galaxy_S20_PLUS, AndroidDeviceNameGenerated::Galaxy_S20_Plus, AndroidDeviceNameGenerated::Galaxy_S21, AndroidDeviceNameGenerated::Galaxy_S21_PLUS, AndroidDeviceNameGenerated::Galaxy_S21_Plus, AndroidDeviceNameGenerated::Galaxy_S21_ULTRA, AndroidDeviceNameGenerated::Galaxy_S21_Ultra, AndroidDeviceNameGenerated::Galaxy_S22, AndroidDeviceNameGenerated::Galaxy_S22_Plus, AndroidDeviceNameGenerated::Galaxy_S9, AndroidDeviceNameGenerated::Galaxy_Tab_S7, AndroidDeviceNameGenerated::Galaxy_Tab_S8, AndroidDeviceNameGenerated::Huawei_P30_Lite, AndroidDeviceNameGenerated::Pixel_3_XL, AndroidDeviceNameGenerated::Pixel_4, AndroidDeviceNameGenerated::Pixel_4_XL, AndroidDeviceNameGenerated::Pixel_5, AndroidDeviceNameGenerated::Pixel_6, AndroidDeviceNameGenerated::Sony_Xperia_10_II, AndroidDeviceNameGenerated::Sony_Xperia_1_II, AndroidDeviceNameGenerated::Sony_Xperia_Ace_II, AndroidDeviceNameGenerated::Xiaomi_Redmi_Note_10_JE, AndroidDeviceNameGenerated::Xiaomi_Redmi_Note_11, AndroidDeviceNameGenerated::Xiaomi_Redmi_Note_11_Pro
Instance Method Summary
collapse
#enum_values
Instance Method Details
#const_missing(name) ⇒ Object
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/applitools/selenium/visual_grid/android_device_name.rb', line 36
def const_missing(name)
if pascal_android_device_name.include?(name)
puts "Warning: constant AndroidDeviceName::#{name} is deprecated use #{pascal_android_device_name[name]} instead."
const_get(pascal_android_device_name[name])
elsif support_drop_for_android_device_name.include?(name)
raise Applitools::EyesIllegalArgument, 'support dropped for Android 9/10 specific devices, try to use more modern device'
else
super
end
end
|
#pascal_android_device_name ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/applitools/selenium/visual_grid/android_device_name.rb', line 18
def pascal_android_device_name
{
Pixel3XL: 'AndroidDeviceName::Pixel_3_XL'.freeze,
Pixel4: 'AndroidDeviceName::Pixel_4'.freeze,
Pixel4XL: 'AndroidDeviceName::Pixel_4_XL'.freeze,
GalaxyS9: 'AndroidDeviceName::Galaxy_S9'.freeze,
GalaxyS10: 'AndroidDeviceName::Galaxy_S10'.freeze,
GalaxyS10Plus: 'AndroidDeviceName::Galaxy_S10_Plus'.freeze,
GalaxyNote10: 'AndroidDeviceName::Galaxy_Note_10'.freeze,
GalaxyNote10Plus: 'AndroidDeviceName::Galaxy_Note_10_Plus'.freeze,
GalaxyS20: 'AndroidDeviceName::Galaxy_S20'.freeze,
GalaxyS20Plus: 'AndroidDeviceName::Galaxy_S20_Plus'.freeze,
GalaxyS21: 'AndroidDeviceName::Galaxy_S21'.freeze,
GalaxyS21Plus: 'AndroidDeviceName::Galaxy_S21_Plus'.freeze,
GalaxyS21Ultra: 'AndroidDeviceName::Galaxy_S21_Ultra'.freeze,
}
end
|
#support_drop_for_android_device_name ⇒ Object
8
9
10
11
12
13
14
15
16
|
# File 'lib/applitools/selenium/visual_grid/android_device_name.rb', line 8
def support_drop_for_android_device_name
{
GalaxyNote8: 'Galaxy Note 8'.freeze,
GalaxyNote9: 'Galaxy Note 9'.freeze,
GalaxyS8: 'Galaxy S8'.freeze,
GalaxyS8Plus: 'Galaxy S8 Plus'.freeze,
GalaxyS9Plus: 'Galaxy S9 Plus'.freeze,
}
end
|