Ifd_Mobile 1.3.0 → 1.4.0

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: ebf02a91d4bc143e107f2165f94649ad1368fa99
4
- data.tar.gz: 55fb906311c926f7f0b989356c0c6889f657e2f6
3
+ metadata.gz: 74caf4eb4c6ace66b3f9eebc6b1786e352289b97
4
+ data.tar.gz: 811c713cbdfa71662b7925350fd8f4f5b0fc07a5
5
5
  SHA512:
6
- metadata.gz: 91ae630140be6a9c94cdfd2d5c20aa48c8fc3b62f85b5141251e13c0c99c92d1b32239d530c12f15d5b6c306cd3b906daa1e21d0227bffc249ca47541d6a55f6
7
- data.tar.gz: 632b4bdbbb31721e4bc6f14d3ecc495a1fa07b282386316c80a108ffe90b8c41d1ca1469f4179a6a01d8940775c449bf2c725c990ecbe3963912a7877f31e139
6
+ metadata.gz: 7989335e34c3608af236f2148803750fa799db7ec0649e2c7f930523fc82884da54de1d3391b519cd66cfa88a58fc5e3a9b013bfee6b142d303b82d4fe3a90f7
7
+ data.tar.gz: b22117e8d6cd29c7597b2812abc5f1972b9d2a2690d728560cede5ba61ad2b4704772cedaed4640ef1a51bdff8f573f455ac41ea63430679803d9ad1e7bbc046
data/bin/Ifd_Mobile CHANGED
@@ -1,25 +1,25 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative 'helper.rb'
4
- require_relative 'generate.rb'
5
- require 'Ifd_Mobile/version'
6
-
7
- @features_dir = File.join(FileUtils.pwd, "project")
8
- @source_dir = File.join(File.dirname(__FILE__), '..', 'project')
9
-
10
- if (ARGV.length == 0)
11
- print_usage
12
- else
13
- cmd = ARGV.shift
14
-
15
- if cmd == "help"
16
- print_help
17
- elsif cmd == "gen"
18
- ifd_mobile_scaffold
19
- elsif cmd == "version"
20
- puts Ifd::Mobile::VERSION
21
- else
22
- print_usage
23
- end
24
- end
25
-
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative 'helper.rb'
4
+ require_relative 'generate.rb'
5
+ require 'Ifd_Mobile/version'
6
+
7
+ @features_dir = File.join(FileUtils.pwd, "project")
8
+ @source_dir = File.join(File.dirname(__FILE__), '..', 'project')
9
+
10
+ if (ARGV.length == 0)
11
+ print_usage
12
+ else
13
+ cmd = ARGV.shift
14
+
15
+ if cmd == "help"
16
+ print_help
17
+ elsif cmd == "gen"
18
+ ifd_mobile_scaffold
19
+ elsif cmd == "version"
20
+ puts Ifd::Mobile::VERSION
21
+ else
22
+ print_usage
23
+ end
24
+ end
25
+
data/bin/generate.rb CHANGED
@@ -1,20 +1,20 @@
1
-
2
- def ifd_mobile_scaffold
3
- if File.exists?(@features_dir)
4
- puts "A features directory already exists. Stopping..."
5
- exit 1
6
- end
7
- msg("Question") do
8
- puts "I'm about to create a subdirectory called features."
9
- puts "features will contain all your project tests."
10
- puts "Please hit return to confirm that's what you want."
11
- end
12
- exit 2 unless STDIN.gets.chomp == ''
13
-
14
- FileUtils.cp_r(@source_dir, @features_dir)
15
-
16
- msg("Info") do
17
- puts "features subdirectory created. \n"
18
- end
19
-
20
- end
1
+
2
+ def ifd_mobile_scaffold
3
+ if File.exists?(@features_dir)
4
+ puts "A features directory already exists. Stopping..."
5
+ exit 1
6
+ end
7
+ # msg("Question") do
8
+ # puts "I'm about to create a subdirectory called features."
9
+ # puts "features will contain all your project tests."
10
+ # puts "Please hit return to confirm that's what you want."
11
+ # end
12
+ # exit 2 unless STDIN.gets.chomp == ''
13
+
14
+ FileUtils.cp_r(@source_dir, @features_dir)
15
+
16
+ msg("Info") do
17
+ puts "features subdirectory created. \n"
18
+ end
19
+
20
+ end
data/bin/helper.rb CHANGED
@@ -1,51 +1,51 @@
1
- require 'tempfile'
2
- require 'json'
3
- require "rubygems"
4
-
5
- def msg(title, &block)
6
- puts "\n" + "-"*10 + title + "-"*10
7
- block.call
8
- puts "-"*10 + "-------" + "-"*10 + "\n"
9
- end
10
-
11
- def print_usage
12
- puts <<EOF
13
-
14
- Usage: Ifd_Mobile <command-name> [parameters] [options]
15
-
16
- <command-name> can be one of
17
- help
18
- prints more detailed help information.
19
- gen
20
- generate a features folder structure.
21
- version
22
- prints the gem version
23
-
24
- <options> can be
25
- -v, --verbose Turns on verbose logging
26
- EOF
27
- end
28
-
29
- def print_help
30
- puts <<EOF
31
-
32
- Usage: Ifd_Mobile <command-name> [parameters] [options]
33
-
34
- <command-name> can be one of
35
- help
36
- gen
37
- version
38
-
39
- Commands:
40
- help : prints more detailed help information.
41
-
42
- gen : creates a features dir. This is usually used once when
43
- setting up ifd-mobile to ensure that the features folder contains
44
- the right step definitions and environment to run with cucumber.
45
-
46
- version : prints the gem version
47
-
48
- <Options>
49
- -v, --verbose Turns on verbose logging
50
- EOF
1
+ require 'tempfile'
2
+ require 'json'
3
+ require "rubygems"
4
+
5
+ def msg(title, &block)
6
+ puts "\n" + "-"*10 + title + "-"*10
7
+ block.call
8
+ puts "-"*10 + "-------" + "-"*10 + "\n"
9
+ end
10
+
11
+ def print_usage
12
+ puts <<EOF
13
+
14
+ Usage: Ifd_Mobile <command-name> [parameters] [options]
15
+
16
+ <command-name> can be one of
17
+ help
18
+ prints more detailed help information.
19
+ gen
20
+ generate a features folder structure.
21
+ version
22
+ prints the gem version
23
+
24
+ <options> can be
25
+ -v, --verbose Turns on verbose logging
26
+ EOF
27
+ end
28
+
29
+ def print_help
30
+ puts <<EOF
31
+
32
+ Usage: Ifd_Mobile <command-name> [parameters] [options]
33
+
34
+ <command-name> can be one of
35
+ help
36
+ gen
37
+ version
38
+
39
+ Commands:
40
+ help : prints more detailed help information.
41
+
42
+ gen : creates a features dir. This is usually used once when
43
+ setting up ifd-mobile to ensure that the features folder contains
44
+ the right step definitions and environment to run with cucumber.
45
+
46
+ version : prints the gem version
47
+
48
+ <Options>
49
+ -v, --verbose Turns on verbose logging
50
+ EOF
51
51
  end
@@ -1,20 +1,20 @@
1
- require 'rubygems'
2
- # require 'selenium-webdriver'
3
- # require 'open-uri'
4
- # require 'rbconfig'
5
- # require 'appium_lib'
6
- # require 'rubygems'
7
- # require 'yaml'
8
- # require 'cucumber'
9
- # require 'rack/utf8_sanitizer'
10
- # require 'net/https'
11
- # require 'rspec/expectations'
12
- require 'Ifd_Mobile'
13
- include RbConfig
14
-
15
- require_relative 'core'
16
- require_relative 'IFD_Assertion'
17
- require_relative 'lib_var'
18
- require_relative 'IFD_Assertion'
19
- require_relative 'IFD_Connection'
20
-
1
+ require 'rubygems'
2
+ # require 'selenium-webdriver'
3
+ # require 'open-uri'
4
+ # require 'rbconfig'
5
+ # require 'appium_lib'
6
+ # require 'rubygems'
7
+ # require 'yaml'
8
+ # require 'cucumber'
9
+ # require 'rack/utf8_sanitizer'
10
+ # require 'net/https'
11
+ # require 'rspec/expectations'
12
+ require 'Ifd_Mobile'
13
+ include RbConfig
14
+
15
+ require_relative 'core'
16
+ require_relative 'IFD_Assertion'
17
+ require_relative 'lib_var'
18
+ require_relative 'IFD_Assertion'
19
+ require_relative 'IFD_Connection'
20
+
@@ -1,5 +1,5 @@
1
1
  module Ifd
2
2
  module Mobile
3
- VERSION = '1.3.0'
3
+ VERSION = '1.4.0'
4
4
  end
5
5
  end
data/lib/Ifd_Mobile.rb CHANGED
@@ -1 +1 @@
1
- Dir[File.dirname(__FILE__) + '/Ifd_Mobile/*.rb'].each { |file| require file }
1
+ Dir[File.dirname(__FILE__) + '/Ifd_Mobile/*.rb'].each { |file| require file }
data/lib/LICENSE CHANGED
@@ -1,3 +1,3 @@
1
- Infodation Automation
2
- Copyright (c) Anh Pham. All rights reserved.
1
+ Infodation Automation
2
+ Copyright (c) Anh Pham. All rights reserved.
3
3
  You must not remove this notice, or any other, from this software.
data/project/Gemfile CHANGED
@@ -7,4 +7,6 @@ gem "cucumber"
7
7
  gem "rspec-expectations"
8
8
  gem "appium_lib"
9
9
  gem "rack-utf8_sanitizer"
10
+ gem "mysql2","> 0.3.18"
11
+ gem "tiny_tds", ">0.6.3.rc2"
10
12
  gem "Ifd_Mobile"
@@ -1,5 +1,6 @@
1
- Feature: Demo
2
-
3
- Scenario: Demo
4
- Given I have App running with Appium
5
- * I click on Sign In button
1
+ #Feature: Version check
2
+ # Settings must display the Android version
3
+ #
4
+ # Scenario: Settings
5
+ # Given I click on "button_OK_welcome"
6
+ # And I click on "button_agree"
@@ -1,3 +1,14 @@
1
- And /I click on Sign In button/ do
2
- step %{I click on element with x: "520", y: "1150"}
3
- end
1
+ # Given /^I click about phone$/ do
2
+ # scroll_to('About phone').click
3
+ # end
4
+ #
5
+ # Given /^the Android version is a number$/ do
6
+ # android_version = 'Android version'
7
+ # scroll_to android_version
8
+ #
9
+ # view = 'android.widget.TextView'
10
+ # version = xpath(%Q(//#{view}[preceding-sibling::#{view}[@text="#{android_version}"]])).text
11
+ # valid = !version.match(/\d/).nil?
12
+ #
13
+ # expect(valid).to eq(true)
14
+ # end
@@ -1,3 +1,3 @@
1
- Bedder_SignIn_username: {xpath: '//android.widget.EditText[1]'}
2
- Bedder_SignIn_password: {xpath: '//android.widget.EditText[2]'}
1
+ button_OK_welcome: {xpath: '//android.widget.Button[@resource-id="android:id/button2"'}
2
+ button_agree: {xpath: '//android.widget.Button[@resource-id="com.whatsapp:id/eula_accept"]'}
3
3
  Bedder_SignIn_Login_button: {xpath: '//android.view.View[@content-desc="Login"]'}
@@ -10,6 +10,7 @@ require 'cucumber'
10
10
  require 'rack/utf8_sanitizer'
11
11
  require 'net/https'
12
12
  require 'Ifd_Mobile'
13
+
13
14
  $current_dir = File.expand_path(File.dirname(__FILE__))
14
15
  $base_dir = File.expand_path(File.dirname(__FILE__) + '/../..')
15
16
 
@@ -27,12 +28,12 @@ class AppiumWorld
27
28
  end
28
29
 
29
30
  def caps
30
- {
31
- 'platformName' => PROJECT_CONFIG['platformName'],
32
- 'deviceName' => PROJECT_CONFIG['deviceName'],
33
- 'platformVersion' => PROJECT_CONFIG['platformVersion'],
34
- 'app' => PROJECT_CONFIG['app']
35
- }
31
+ {
32
+ 'platformName' => PROJECT_CONFIG['platform_name'],
33
+ 'deviceName' => PROJECT_CONFIG['device_name'],
34
+ 'platformVersion' => PROJECT_CONFIG['platform_version'],
35
+ 'app' => PROJECT_CONFIG['app']
36
+ }
36
37
  end
37
38
 
38
39
  Appium::Driver.new({caps: caps, appium_lib: {server_url: PROJECT_CONFIG["server_url"]}}).start_driver
@@ -1,6 +1,8 @@
1
- platformName: android
2
- deviceName: 192.168.56.101:5555
3
- platformVersion: 4.4.4
4
- app: C:/Users/anhpham2710/Desktop/mobile/project/apps/android-2016.apk
5
- server_url: http://192.168.2.149:1234/wd/hub
1
+ capabilities:
2
+ platformName: android
3
+ deviceName: 192.168.56.101:5555
4
+ platformVersion: 4.4.4
5
+ appPackage: D:/AutomationMobileApp/WhatsApp.apk
6
+
7
+ server_url: http://localhost:4723/wd/hub
6
8
  wait_time: 2
metadata CHANGED
@@ -1,69 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ifd_Mobile
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-22 00:00:00.000000000 Z
11
+ date: 2016-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>'
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0
20
- - - '>='
21
- - !ruby/object:Gem::Version
22
- version: 1.3.18
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - '>'
19
+ version: '2.0'
20
+ - - ">"
28
21
  - !ruby/object:Gem::Version
29
22
  version: 2.0.0
30
- - - '>='
31
- - !ruby/object:Gem::Version
32
- version: 1.3.18
33
- - !ruby/object:Gem::Dependency
34
- name: selenium-webdriver
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - '>'
38
- - !ruby/object:Gem::Version
39
- version: 2.46.2
40
23
  type: :runtime
41
24
  prerelease: false
42
25
  version_requirements: !ruby/object:Gem::Requirement
43
26
  requirements:
44
- - - '>'
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '2.0'
30
+ - - ">"
45
31
  - !ruby/object:Gem::Version
46
- version: 2.46.2
32
+ version: 2.0.0
47
33
  - !ruby/object:Gem::Dependency
48
34
  name: appium_lib
49
35
  requirement: !ruby/object:Gem::Requirement
50
36
  requirements:
51
- - - '>'
37
+ - - "~>"
52
38
  - !ruby/object:Gem::Version
53
- version: 7.0.0
54
- - - '>='
39
+ version: '8.0'
40
+ - - ">="
55
41
  - !ruby/object:Gem::Version
56
- version: 7.0.0
42
+ version: 8.0.2
57
43
  type: :runtime
58
44
  prerelease: false
59
45
  version_requirements: !ruby/object:Gem::Requirement
60
46
  requirements:
61
- - - '>'
47
+ - - "~>"
62
48
  - !ruby/object:Gem::Version
63
- version: 7.0.0
64
- - - '>='
49
+ version: '8.0'
50
+ - - ">="
65
51
  - !ruby/object:Gem::Version
66
- version: 7.0.0
52
+ version: 8.0.2
67
53
  description: Behavior driven development (BDD) approach to write automation test script
68
54
  to test Mobile.
69
55
  email: anhpq.info@gmail.com
@@ -72,49 +58,48 @@ executables:
72
58
  extensions: []
73
59
  extra_rdoc_files: []
74
60
  files:
61
+ - bin/Ifd_Mobile
62
+ - bin/generate.rb
63
+ - bin/helper.rb
64
+ - lib/Ifd_Mobile.rb
75
65
  - lib/Ifd_Mobile/lib_steps.rb
76
- - lib/Ifd_Mobile/methods/core.rb
77
66
  - lib/Ifd_Mobile/methods/IFD_Assertion.rb
78
67
  - lib/Ifd_Mobile/methods/IFD_Connection.rb
68
+ - lib/Ifd_Mobile/methods/core.rb
79
69
  - lib/Ifd_Mobile/methods/lib_var.rb
80
70
  - lib/Ifd_Mobile/methods/required_files.rb
81
71
  - lib/Ifd_Mobile/version.rb
82
- - lib/Ifd_Mobile.rb
83
72
  - lib/LICENSE
84
- - bin/generate.rb
85
- - bin/helper.rb
86
- - bin/Ifd_Mobile
73
+ - project/Gemfile
74
+ - project/features/TestData/globalData.yml
75
+ - project/features/TestSuite/login.feature
87
76
  - project/features/step_definitions/lib_steps/step_demo.rb
88
77
  - project/features/step_definitions/repositories/project_object.yml
89
78
  - project/features/support/env.rb
90
79
  - project/features/support/hooks.rb
91
80
  - project/features/support/project_config.yml
92
- - project/features/TestData/globalData.yml
93
- - project/features/TestSuite/login.feature
94
- - project/Gemfile
95
81
  homepage: https://rubygems.org/gems/ifd_mobile
96
82
  licenses:
97
83
  - MIT
98
84
  metadata: {}
99
- post_install_message: Thank you for installing Infodation Mobile gem.
85
+ post_install_message: Thank you for installing INFODation Mobile gem.
100
86
  rdoc_options: []
101
87
  require_paths:
102
88
  - lib
103
89
  required_ruby_version: !ruby/object:Gem::Requirement
104
90
  requirements:
105
- - - '>='
91
+ - - ">="
106
92
  - !ruby/object:Gem::Version
107
93
  version: 1.9.3
108
94
  required_rubygems_version: !ruby/object:Gem::Requirement
109
95
  requirements:
110
- - - '>='
96
+ - - ">="
111
97
  - !ruby/object:Gem::Version
112
98
  version: '0'
113
99
  requirements: []
114
100
  rubyforge_project:
115
- rubygems_version: 2.0.14.1
101
+ rubygems_version: 2.4.5.1
116
102
  signing_key:
117
103
  specification_version: 4
118
104
  summary: SELENIUM WEBDRIVER WITH RUBY & CUCUMBER
119
105
  test_files: []
120
- has_rdoc: