Ifd_Mobile 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbf6b3f6df0ef5a901dc7507dac92760b0772739
4
- data.tar.gz: 889512b8a1a2fa5710ea40e5f5f252bf0d186af3
3
+ metadata.gz: 5ee675b90713b5589113a7ff21c60674ee7be56c
4
+ data.tar.gz: a5e1efdde2e63fc6618efebfbcbada6cc0d61b15
5
5
  SHA512:
6
- metadata.gz: 0310a2101eddd36154660d0bfd9300587cd5cbdbcad23ea557e546e073121d91ec2cf7ee072af8f45376d42349ec505dd757879e66d230caf5eaf5ce62d7beba
7
- data.tar.gz: 81b7d5b811227742717bc3c41dfc4c03a58777f5aba92c739499d214724ba10b91f8832575e8cdb957c1b71495d3a1b4d5ab43e2c85eb27de938c09c6b29ee64
6
+ metadata.gz: 4e7cb6e8438520a6ec931803e7113f4253151c88585b049b21d5de4b7dba3cae07d5de2ce7b3f3d595821b365322a67c3d3b2ffe2bb814ac431d92407df16554
7
+ data.tar.gz: 847ffee059c626ca87069b7ba087638059ea82ad681a9233b275540e0f77a7b3d86c2e3f8fa9ee9472fa3d0fbc9fecc6fe7e34d740c2995da852731e7cc2aa8a
@@ -1,5 +1,5 @@
1
1
  module Ifd
2
2
  module Mobile
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
@@ -2,54 +2,15 @@ require 'rspec/expectations'
2
2
  require 'appium_lib'
3
3
  require 'cucumber/ast'
4
4
  require 'Ifd_Mobile'
5
-
6
5
  # Define global variables
7
6
  $current_dir = File.expand_path(File.dirname(__FILE__))
8
7
  $base_dir = File.expand_path(File.dirname(__FILE__) + '/../..')
9
-
10
- $_CONFIG = Hash.new
11
- # ###################################################################
12
- # # SYSTEM CONFIGURATION #
13
- # ###################################################################
14
- $_CONFIG['Print Log'] = true
15
- $_CONFIG['Wait Time'] = 20
16
- $_CONFIG['DeviceName'] = 'ios'
17
-
18
-
19
- # require "#{$current_dir}/PolyClaim_env.rb"
8
+ require "#{$current_dir}/project_env.rb"
20
9
 
21
10
  # Create a custom World class so we don't pollute `Object` with Appium methods
22
11
  class AppiumWorld
23
12
  end
24
13
 
25
- def server_url
26
- 'http://127.0.0.1:4723/wd/hub'
27
- end
28
-
29
- IOS_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/TestApp/build/release-iphonesimulator/TestApp.app')
30
- ANDROID_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/polyclaim.cordova.android.201510083238.apk')
31
- def capabilities_ios
32
- {
33
- 'platformName' => 'ios',
34
- 'deviceName' => 'iPad Air',
35
- 'platformVersion' => '8.3',
36
- 'app' => IOS_APP_PATH,
37
- 'rotatable' => true
38
- }
39
- end
40
-
41
- def capabilities_android
42
- {
43
- 'platformName' => 'android',
44
- # 'deviceName' => 'emulator-5554',
45
- 'deviceName' => '4d0079394a1e2129',
46
- 'fullReset' => 'fullReset',
47
- 'noReset' => 'true',
48
- 'platformVersion' => '4.4.2',
49
- 'app' => ANDROID_APP_PATH
50
- }
51
- end
52
-
53
14
  case $_CONFIG['DeviceName'].upcase.to_sym
54
15
  when :IOS
55
16
  Appium::Driver.new({caps: capabilities_ios, appium_lib: {server_url: server_url}}).start_driver
@@ -69,8 +30,8 @@ def selenium
69
30
  return $driver
70
31
  end
71
32
 
72
- Before { $driver.start_driver }
73
-
74
- After do
75
- $driver.driver_quit
76
- end
33
+ # Before { $driver.start_driver }
34
+ #
35
+ # After do
36
+ # $driver.driver_quit
37
+ # end
@@ -1,24 +1,9 @@
1
- # Before do
2
- # begin
3
- # def selenium
4
- # case $_CONFIG['DeviceName'].upcase.to_sym
5
- # when :IOS
6
- # @driver ||= Selenium::WebDriver.for(:remote, :desired_capabilities => capabilities_ios, :url => server_url)
7
- # when :ANDROID
8
- # @driver ||= Selenium::WebDriver.for(:remote, :desired_capabilities => capabilities_android, :url => server_url)
9
- # else
10
- # puts "\nERROR: *** Invalid Device Nane!. Please check the config from $_CONFIG['DeviceName'] = #{$_CONFIG['DeviceName']}"
11
- # end
12
- # end
13
- # rescue StandardError => myStandardError
14
- # put_log "\nERROR: *** #{myStandardError}"
15
- # end
16
- # end
17
- #
18
- # After do
19
- # begin
20
- # selenium.quit
21
- # rescue StandardError => myStandardError
22
- # puts "\nERROR: *** #{myStandardError}"
23
- # end
24
- # end
1
+ Before { $driver.start_driver }
2
+
3
+ After do
4
+ begin
5
+ selenium.quit
6
+ rescue StandardError => myStandardError
7
+ puts "\nERROR: *** #{myStandardError}"
8
+ end
9
+ end
@@ -4,7 +4,8 @@ $_CONFIG = Hash.new
4
4
  ###################################################################
5
5
  $_CONFIG['Print Log'] = true
6
6
  $_CONFIG['Wait Time'] = 30
7
- $_CONFIG['DeviceName'] = 'IOS'
7
+ $_CONFIG['DeviceName'] = 'ios'
8
+
8
9
  ###################################################################
9
10
  # DEVICE CONFIGURATION #
10
11
  ###################################################################
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ifd_Mobile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham