lib/testcentricity_web/environment.rb in testcentricity_web-2.0.20.1 vs lib/testcentricity_web/environment.rb in testcentricity_web-2.0.21
- old
+ new
@@ -26,13 +26,16 @@
@test_environment = ENV['TEST_ENVIRONMENT']
@screen_shots = []
attr_accessor :test_environment
attr_accessor :browser
+ attr_accessor :browser_size
attr_accessor :os
attr_accessor :device
attr_accessor :device_type
+ attr_accessor :device_os
+ attr_accessor :device_orientation
attr_accessor :platform
attr_accessor :signed_in
attr_accessor :portal_status
attr_accessor :portal_context
@@ -101,10 +104,18 @@
def self.browser
@browser
end
+ def self.browser_size=(size)
+ @browser_size = size
+ end
+
+ def self.browser_size
+ @browser_size
+ end
+
# @deprecated Please use {#Environ.os =} instead
def self.set_os(os)
warn "[DEPRECATION] 'TestCentricity::Environ.set_os' is deprecated. Please use 'Environ.os =' instead."
@os = os
end
@@ -141,9 +152,25 @@
@device_type = type.downcase
end
def self.device_type
@device_type
+ end
+
+ def self.device_os=(os)
+ @device_os = os.downcase.to_sym
+ end
+
+ def self.device_os
+ @device_os
+ end
+
+ def self.device_orientation=(orientation)
+ @device_orientation = orientation.downcase.to_sym
+ end
+
+ def self.device_orientation
+ @device_orientation
end
# @deprecated Please use {#Environ.platform =} instead
def self.set_platform(platform)
warn "[DEPRECATION] 'TestCentricity::Environ.set_platform' is deprecated. Please use 'Environ.platform =' instead."