Ifd_Mobile 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
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
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 }
@@ -23,6 +23,12 @@ Then /^I verify property "(.*)" with "(.*)" has( | not)? value "(.*)"$/ do |obje
23
23
  execute_checkproperty(object, property, negate, value)
24
24
  end
25
25
 
26
+ Then /^I verify property "(.*)" with "(.*)" contain( | not)? value "(.*)"$/ do |object, property, negate, value|
27
+ sleep(0.5)
28
+ value = var_collect(value)
29
+ execute_checkpropertyrelative(object, property, negate, value)
30
+ end
31
+
26
32
  Given /^I click on element with x: "(.*)", y: "(.*)"$/ do |x,y|
27
33
  click_by_coordinate x,y
28
34
  end
@@ -131,6 +131,48 @@ def execute_checkproperty element, property, negate, value
131
131
  end
132
132
  end
133
133
 
134
+ def execute_checkpropertyrelative element, property, negate, value
135
+ found_element = find_object element
136
+ check = false
137
+ if found_element == nil and value == ""
138
+ check = true
139
+ expect(check).to eq true
140
+ else
141
+ put_log "\n*** Execute_CheckProperty: finish to found element"
142
+ if found_element != nil
143
+ if property.upcase == 'VALUE'
144
+ actual_value = found_element.attribute("value")
145
+ elsif property.upcase == 'NAME'
146
+ actual_value = found_element.attribute("name")
147
+ elsif property.upcase == 'LABEL'
148
+ actual_value = found_element.attribute("label")
149
+ elsif property.upcase == 'TYPE'
150
+ actual_value = found_element.attribute("type")
151
+ elsif property.upcase == 'ENABLE'
152
+ actual_value = found_element.attribute("enable")
153
+ else
154
+ actual_value = found_element.attribute("#{property}")
155
+ end
156
+ if actual_value == nil
157
+ actual_value = ''
158
+ end
159
+ else
160
+ put_log "ERROR: *** Not found object: #{element}"
161
+ end
162
+
163
+ if IFD_Assertion.assert_string_contain(actual_value, value)
164
+ check = true
165
+ end
166
+
167
+ put_log "\n#{property} :: Actual Result Is '#{actual_value}' -- Expected Result Is '#{value}'"
168
+
169
+ if negate == " not"
170
+ expect(check).not_to eql true
171
+ elsif expect(check).to eq true
172
+ end
173
+ end
174
+ end
175
+
134
176
  def click_by_coordinate x, y
135
177
  selenium.execute_script 'mobile: tap', :x => x, :y => y
136
178
  end
@@ -1,21 +1,18 @@
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
- include RbConfig
13
-
14
- require_relative 'core'
15
- require_relative 'IFD_Assertion'
16
- require_relative 'lib_var'
17
- require_relative 'IFD_Assertion'
18
- require_relative 'IFD_Connection'
19
- require_relative 'lib_schema_data_steps'
20
-
21
-
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
+ include RbConfig
13
+
14
+ require_relative 'core'
15
+ require_relative 'IFD_Assertion'
16
+ require_relative 'lib_var'
17
+
18
+
@@ -1,5 +1,5 @@
1
1
  module Ifd
2
2
  module Mobile
3
- VERSION = '0.1.8'
3
+ VERSION = '0.1.9'
4
4
  end
5
5
  end
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,6 +7,4 @@ 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"
12
10
  gem "Ifd_Mobile"
data/project/Gemfile.lock CHANGED
@@ -1,182 +1,182 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- actionmailer (4.2.4)
5
- actionpack (= 4.2.4)
6
- actionview (= 4.2.4)
7
- activejob (= 4.2.4)
8
- mail (~> 2.5, >= 2.5.4)
9
- rails-dom-testing (~> 1.0, >= 1.0.5)
10
- actionpack (4.2.4)
11
- actionview (= 4.2.4)
12
- activesupport (= 4.2.4)
13
- rack (~> 1.6)
14
- rack-test (~> 0.6.2)
15
- rails-dom-testing (~> 1.0, >= 1.0.5)
16
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
17
- actionview (4.2.4)
18
- activesupport (= 4.2.4)
19
- builder (~> 3.1)
20
- erubis (~> 2.7.0)
21
- rails-dom-testing (~> 1.0, >= 1.0.5)
22
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- activejob (4.2.4)
24
- activesupport (= 4.2.4)
25
- globalid (>= 0.3.0)
26
- activemodel (4.2.4)
27
- activesupport (= 4.2.4)
28
- builder (~> 3.1)
29
- activerecord (4.2.4)
30
- activemodel (= 4.2.4)
31
- activesupport (= 4.2.4)
32
- arel (~> 6.0)
33
- activesupport (4.2.4)
34
- i18n (~> 0.7)
35
- json (~> 1.7, >= 1.7.7)
36
- minitest (~> 5.1)
37
- thread_safe (~> 0.3, >= 0.3.4)
38
- tzinfo (~> 1.1)
39
- addressable (2.3.8)
40
- arel (6.0.3)
41
- builder (3.2.2)
42
- capybara (2.4.4)
43
- mime-types (>= 1.16)
44
- nokogiri (>= 1.3.3)
45
- rack (>= 1.0.0)
46
- rack-test (>= 0.5.4)
47
- xpath (~> 2.0)
48
- chromedriver2-helper (0.0.8)
49
- nokogiri
50
- csv-diff (0.3.0)
51
- diff-lcs (1.2.5)
52
- domain_name (0.5.25)
53
- unf (>= 0.0.5, < 1.0.0)
54
- email_spec (1.6.0)
55
- launchy (~> 2.1)
56
- mail (~> 2.2)
57
- erubis (2.7.0)
58
- ffi (1.9.10-x64-mingw32)
59
- gherkin (2.12.2)
60
- multi_json (~> 1.3)
61
- globalid (0.3.6)
62
- activesupport (>= 4.1.0)
63
- http-cookie (1.0.2)
64
- domain_name (~> 0.5)
65
- httparty (0.13.7)
66
- json (~> 1.8)
67
- multi_xml (>= 0.5.2)
68
- i18n (0.7.0)
69
- json (1.8.3)
70
- launchy (2.4.3)
71
- addressable (~> 2.3)
72
- loofah (2.0.3)
73
- nokogiri (>= 1.5.9)
74
- mail (2.6.3)
75
- mime-types (>= 1.16, < 3)
76
- mime-types (2.6.2)
77
- mini_portile (0.6.2)
78
- minitest (5.8.1)
79
- multi_json (1.11.2)
80
- multi_xml (0.5.5)
81
- mysql2 (0.3.18-x64-mingw32)
82
- netrc (0.10.3)
83
- nokogiri (1.6.6.2-x64-mingw32)
84
- mini_portile (~> 0.6.0)
85
- parallel (1.6.1)
86
- parallel_tests (1.9.0)
87
- parallel
88
- power_assert (0.2.4)
89
- rack (1.6.4)
90
- rack-test (0.6.3)
91
- rack (>= 1.0)
92
- rack-utf8_sanitizer (1.3.1)
93
- rack (~> 1.0)
94
- rails (4.2.4)
95
- actionmailer (= 4.2.4)
96
- actionpack (= 4.2.4)
97
- actionview (= 4.2.4)
98
- activejob (= 4.2.4)
99
- activemodel (= 4.2.4)
100
- activerecord (= 4.2.4)
101
- activesupport (= 4.2.4)
102
- bundler (>= 1.3.0, < 2.0)
103
- railties (= 4.2.4)
104
- sprockets-rails
105
- rails-deprecated_sanitizer (1.0.3)
106
- activesupport (>= 4.2.0.alpha)
107
- rails-dom-testing (1.0.7)
108
- activesupport (>= 4.2.0.beta, < 5.0)
109
- nokogiri (~> 1.6.0)
110
- rails-deprecated_sanitizer (>= 1.0.1)
111
- rails-html-sanitizer (1.0.2)
112
- loofah (~> 2.0)
113
- railties (4.2.4)
114
- actionpack (= 4.2.4)
115
- activesupport (= 4.2.4)
116
- rake (>= 0.8.7)
117
- thor (>= 0.18.1, < 2.0)
118
- rake (10.4.2)
119
- rautomation (0.17.0)
120
- ffi (~> 1.9.0)
121
- rest-client (1.8.0-x64-mingw32)
122
- ffi (~> 1.9)
123
- http-cookie (>= 1.0.2, < 2.0)
124
- mime-types (>= 1.16, < 3.0)
125
- netrc (~> 0.7)
126
- rspec (3.3.0)
127
- rspec-core (~> 3.3.0)
128
- rspec-expectations (~> 3.3.0)
129
- rspec-mocks (~> 3.3.0)
130
- rspec-core (3.3.2)
131
- rspec-support (~> 3.3.0)
132
- rspec-expectations (3.3.1)
133
- diff-lcs (>= 1.2.0, < 2.0)
134
- rspec-support (~> 3.3.0)
135
- rspec-mocks (3.3.2)
136
- diff-lcs (>= 1.2.0, < 2.0)
137
- rspec-support (~> 3.3.0)
138
- rspec-support (3.3.0)
139
- sprockets (3.4.0)
140
- rack (> 1, < 3)
141
- sprockets-rails (2.3.3)
142
- actionpack (>= 3.0)
143
- activesupport (>= 3.0)
144
- sprockets (>= 2.8, < 4.0)
145
- test-unit (3.1.5)
146
- power_assert
147
- thor (0.19.1)
148
- thread_safe (0.3.5)
149
- tiny_tds (0.6.2-x64-mingw32)
150
- tzinfo (1.2.2)
151
- thread_safe (~> 0.1)
152
- unf (0.1.4)
153
- unf_ext
154
- unf_ext (0.0.7.1-x64-mingw32)
155
- xpath (2.0.0)
156
- nokogiri (~> 1.3)
157
-
158
- PLATFORMS
159
- x64-mingw32
160
-
161
- DEPENDENCIES
162
- actionmailer (~> 4.2.3)
163
- capybara (~> 2.4.4)
164
- chromedriver2-helper
165
- csv-diff (~> 0.3.0)
166
- email_spec
167
- gherkin (~> 2.12.2)
168
- httparty (~> 0.13.5)
169
- json (= 1.8.3)
170
- mail
171
- mysql2 (= 0.3.18)
172
- parallel_tests
173
- rack-utf8_sanitizer
174
- rails
175
- rautomation (~> 0.17.0)
176
- rest-client (~> 1.8.0)
177
- rspec (~> 3.3.0)
178
- test-unit (~> 3.1.2)
179
- tiny_tds (~> 0.6.2)
180
-
181
- BUNDLED WITH
182
- 1.10.6
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (4.2.4)
5
+ actionpack (= 4.2.4)
6
+ actionview (= 4.2.4)
7
+ activejob (= 4.2.4)
8
+ mail (~> 2.5, >= 2.5.4)
9
+ rails-dom-testing (~> 1.0, >= 1.0.5)
10
+ actionpack (4.2.4)
11
+ actionview (= 4.2.4)
12
+ activesupport (= 4.2.4)
13
+ rack (~> 1.6)
14
+ rack-test (~> 0.6.2)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
17
+ actionview (4.2.4)
18
+ activesupport (= 4.2.4)
19
+ builder (~> 3.1)
20
+ erubis (~> 2.7.0)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
+ activejob (4.2.4)
24
+ activesupport (= 4.2.4)
25
+ globalid (>= 0.3.0)
26
+ activemodel (4.2.4)
27
+ activesupport (= 4.2.4)
28
+ builder (~> 3.1)
29
+ activerecord (4.2.4)
30
+ activemodel (= 4.2.4)
31
+ activesupport (= 4.2.4)
32
+ arel (~> 6.0)
33
+ activesupport (4.2.4)
34
+ i18n (~> 0.7)
35
+ json (~> 1.7, >= 1.7.7)
36
+ minitest (~> 5.1)
37
+ thread_safe (~> 0.3, >= 0.3.4)
38
+ tzinfo (~> 1.1)
39
+ addressable (2.3.8)
40
+ arel (6.0.3)
41
+ builder (3.2.2)
42
+ capybara (2.4.4)
43
+ mime-types (>= 1.16)
44
+ nokogiri (>= 1.3.3)
45
+ rack (>= 1.0.0)
46
+ rack-test (>= 0.5.4)
47
+ xpath (~> 2.0)
48
+ chromedriver2-helper (0.0.8)
49
+ nokogiri
50
+ csv-diff (0.3.0)
51
+ diff-lcs (1.2.5)
52
+ domain_name (0.5.25)
53
+ unf (>= 0.0.5, < 1.0.0)
54
+ email_spec (1.6.0)
55
+ launchy (~> 2.1)
56
+ mail (~> 2.2)
57
+ erubis (2.7.0)
58
+ ffi (1.9.10-x64-mingw32)
59
+ gherkin (2.12.2)
60
+ multi_json (~> 1.3)
61
+ globalid (0.3.6)
62
+ activesupport (>= 4.1.0)
63
+ http-cookie (1.0.2)
64
+ domain_name (~> 0.5)
65
+ httparty (0.13.7)
66
+ json (~> 1.8)
67
+ multi_xml (>= 0.5.2)
68
+ i18n (0.7.0)
69
+ json (1.8.3)
70
+ launchy (2.4.3)
71
+ addressable (~> 2.3)
72
+ loofah (2.0.3)
73
+ nokogiri (>= 1.5.9)
74
+ mail (2.6.3)
75
+ mime-types (>= 1.16, < 3)
76
+ mime-types (2.6.2)
77
+ mini_portile (0.6.2)
78
+ minitest (5.8.1)
79
+ multi_json (1.11.2)
80
+ multi_xml (0.5.5)
81
+ mysql2 (0.3.18-x64-mingw32)
82
+ netrc (0.10.3)
83
+ nokogiri (1.6.6.2-x64-mingw32)
84
+ mini_portile (~> 0.6.0)
85
+ parallel (1.6.1)
86
+ parallel_tests (1.9.0)
87
+ parallel
88
+ power_assert (0.2.4)
89
+ rack (1.6.4)
90
+ rack-test (0.6.3)
91
+ rack (>= 1.0)
92
+ rack-utf8_sanitizer (1.3.1)
93
+ rack (~> 1.0)
94
+ rails (4.2.4)
95
+ actionmailer (= 4.2.4)
96
+ actionpack (= 4.2.4)
97
+ actionview (= 4.2.4)
98
+ activejob (= 4.2.4)
99
+ activemodel (= 4.2.4)
100
+ activerecord (= 4.2.4)
101
+ activesupport (= 4.2.4)
102
+ bundler (>= 1.3.0, < 2.0)
103
+ railties (= 4.2.4)
104
+ sprockets-rails
105
+ rails-deprecated_sanitizer (1.0.3)
106
+ activesupport (>= 4.2.0.alpha)
107
+ rails-dom-testing (1.0.7)
108
+ activesupport (>= 4.2.0.beta, < 5.0)
109
+ nokogiri (~> 1.6.0)
110
+ rails-deprecated_sanitizer (>= 1.0.1)
111
+ rails-html-sanitizer (1.0.2)
112
+ loofah (~> 2.0)
113
+ railties (4.2.4)
114
+ actionpack (= 4.2.4)
115
+ activesupport (= 4.2.4)
116
+ rake (>= 0.8.7)
117
+ thor (>= 0.18.1, < 2.0)
118
+ rake (10.4.2)
119
+ rautomation (0.17.0)
120
+ ffi (~> 1.9.0)
121
+ rest-client (1.8.0-x64-mingw32)
122
+ ffi (~> 1.9)
123
+ http-cookie (>= 1.0.2, < 2.0)
124
+ mime-types (>= 1.16, < 3.0)
125
+ netrc (~> 0.7)
126
+ rspec (3.3.0)
127
+ rspec-core (~> 3.3.0)
128
+ rspec-expectations (~> 3.3.0)
129
+ rspec-mocks (~> 3.3.0)
130
+ rspec-core (3.3.2)
131
+ rspec-support (~> 3.3.0)
132
+ rspec-expectations (3.3.1)
133
+ diff-lcs (>= 1.2.0, < 2.0)
134
+ rspec-support (~> 3.3.0)
135
+ rspec-mocks (3.3.2)
136
+ diff-lcs (>= 1.2.0, < 2.0)
137
+ rspec-support (~> 3.3.0)
138
+ rspec-support (3.3.0)
139
+ sprockets (3.4.0)
140
+ rack (> 1, < 3)
141
+ sprockets-rails (2.3.3)
142
+ actionpack (>= 3.0)
143
+ activesupport (>= 3.0)
144
+ sprockets (>= 2.8, < 4.0)
145
+ test-unit (3.1.5)
146
+ power_assert
147
+ thor (0.19.1)
148
+ thread_safe (0.3.5)
149
+ tiny_tds (0.6.2-x64-mingw32)
150
+ tzinfo (1.2.2)
151
+ thread_safe (~> 0.1)
152
+ unf (0.1.4)
153
+ unf_ext
154
+ unf_ext (0.0.7.1-x64-mingw32)
155
+ xpath (2.0.0)
156
+ nokogiri (~> 1.3)
157
+
158
+ PLATFORMS
159
+ x64-mingw32
160
+
161
+ DEPENDENCIES
162
+ actionmailer (~> 4.2.3)
163
+ capybara (~> 2.4.4)
164
+ chromedriver2-helper
165
+ csv-diff (~> 0.3.0)
166
+ email_spec
167
+ gherkin (~> 2.12.2)
168
+ httparty (~> 0.13.5)
169
+ json (= 1.8.3)
170
+ mail
171
+ mysql2 (= 0.3.18)
172
+ parallel_tests
173
+ rack-utf8_sanitizer
174
+ rails
175
+ rautomation (~> 0.17.0)
176
+ rest-client (~> 1.8.0)
177
+ rspec (~> 3.3.0)
178
+ test-unit (~> 3.1.2)
179
+ tiny_tds (~> 0.6.2)
180
+
181
+ BUNDLED WITH
182
+ 1.10.6
@@ -37,19 +37,6 @@ def server_url
37
37
  "http://127.0.0.1:4723/wd/hub"
38
38
  end
39
39
 
40
- ###################################################################
41
- # DATABASE CONFIGURATION #
42
- ###################################################################
43
- #-----------------------------------------------------------------
44
- # $db_type=> "sql_server" || "mysql"
45
- #-----------------------------------------------------------------
46
- $data_source_username = ''
47
- $data_source_password = ''
48
- $data_source_url = ''
49
- $db_type = 'sql_server'
50
40
 
51
- ###################################################################
52
- # EDITABLE CONFIGURATION #
53
- ###################################################################
54
- $test_data_dir = $base_dir + '/features/TestData/'
55
- $sql_dir = $base_dir + '/features/TestData/SqlScript/'
41
+
42
+
metadata CHANGED
@@ -1,67 +1,74 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ifd_Mobile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Anh Pham
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2016-01-05 00:00:00.000000000 Z
12
+ date: 2016-01-13 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: cucumber
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - ">"
19
+ - - ! '>'
18
20
  - !ruby/object:Gem::Version
19
21
  version: 2.0.0
20
- - - ">="
22
+ - - ! '>='
21
23
  - !ruby/object:Gem::Version
22
24
  version: 1.3.18
23
25
  type: :runtime
24
26
  prerelease: false
25
27
  version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
26
29
  requirements:
27
- - - ">"
30
+ - - ! '>'
28
31
  - !ruby/object:Gem::Version
29
32
  version: 2.0.0
30
- - - ">="
33
+ - - ! '>='
31
34
  - !ruby/object:Gem::Version
32
35
  version: 1.3.18
33
36
  - !ruby/object:Gem::Dependency
34
37
  name: selenium-webdriver
35
38
  requirement: !ruby/object:Gem::Requirement
39
+ none: false
36
40
  requirements:
37
- - - ">"
41
+ - - ! '>'
38
42
  - !ruby/object:Gem::Version
39
43
  version: 2.46.2
40
44
  type: :runtime
41
45
  prerelease: false
42
46
  version_requirements: !ruby/object:Gem::Requirement
47
+ none: false
43
48
  requirements:
44
- - - ">"
49
+ - - ! '>'
45
50
  - !ruby/object:Gem::Version
46
51
  version: 2.46.2
47
52
  - !ruby/object:Gem::Dependency
48
53
  name: appium_lib
49
54
  requirement: !ruby/object:Gem::Requirement
55
+ none: false
50
56
  requirements:
51
- - - ">"
57
+ - - ! '>'
52
58
  - !ruby/object:Gem::Version
53
59
  version: 7.0.0
54
- - - ">="
60
+ - - ! '>='
55
61
  - !ruby/object:Gem::Version
56
62
  version: 7.0.0
57
63
  type: :runtime
58
64
  prerelease: false
59
65
  version_requirements: !ruby/object:Gem::Requirement
66
+ none: false
60
67
  requirements:
61
- - - ">"
68
+ - - ! '>'
62
69
  - !ruby/object:Gem::Version
63
70
  version: 7.0.0
64
- - - ">="
71
+ - - ! '>='
65
72
  - !ruby/object:Gem::Version
66
73
  version: 7.0.0
67
74
  description: Behavior driven development (BDD) approach to write automation test script
@@ -72,55 +79,49 @@ executables:
72
79
  extensions: []
73
80
  extra_rdoc_files: []
74
81
  files:
75
- - bin/Ifd_Mobile
76
- - bin/generate.rb
77
- - bin/helper.rb
78
- - lib/Ifd_Mobile.rb
79
82
  - lib/Ifd_Mobile/lib_steps.rb
80
- - lib/Ifd_Mobile/methods/IFD_Assertion.rb
81
- - lib/Ifd_Mobile/methods/IFD_Connection.rb
82
83
  - lib/Ifd_Mobile/methods/core.rb
83
- - lib/Ifd_Mobile/methods/database_methods.rb
84
- - lib/Ifd_Mobile/methods/lib_schema_data_steps.rb
84
+ - lib/Ifd_Mobile/methods/IFD_Assertion.rb
85
85
  - lib/Ifd_Mobile/methods/lib_var.rb
86
86
  - lib/Ifd_Mobile/methods/required_files.rb
87
87
  - lib/Ifd_Mobile/version.rb
88
+ - lib/Ifd_Mobile.rb
88
89
  - lib/LICENSE
89
- - project/Gemfile
90
- - project/Gemfile.lock
90
+ - bin/generate.rb
91
+ - bin/helper.rb
92
+ - bin/Ifd_Mobile
93
+ - project/apps/selendroid-test-app.apk
94
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/Default-568h@2x.png
95
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/InfoPlist.strings
96
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/Localizable.strings
97
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/objects-8.0+.nib
98
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/objects.nib
99
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/runtime.nib
100
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/objects-8.0+.nib
101
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/objects.nib
102
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/runtime.nib
103
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/Info.plist
104
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/PkgInfo
105
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/TestApp
91
106
  - project/apps/TestApp/Default-568h@2x.png
107
+ - project/apps/TestApp/Test App 2/en.lproj/InfoPlist.strings
108
+ - project/apps/TestApp/Test App 2/en.lproj/Localizable.strings
109
+ - project/apps/TestApp/Test App 2/en.lproj/MyViewControllerViewController.xib
92
110
  - project/apps/TestApp/Test App 2/GestureTestViewController.h
93
111
  - project/apps/TestApp/Test App 2/GestureTestViewController.m
94
112
  - project/apps/TestApp/Test App 2/GestureTestViewController.xib
113
+ - project/apps/TestApp/Test App 2/main.m
95
114
  - project/apps/TestApp/Test App 2/MyViewControllerViewController.h
96
115
  - project/apps/TestApp/Test App 2/MyViewControllerViewController.m
97
116
  - project/apps/TestApp/Test App 2/TA2AppDelegate.h
98
117
  - project/apps/TestApp/Test App 2/TA2AppDelegate.m
99
118
  - project/apps/TestApp/Test App 2/TestApp-Info.plist
100
119
  - project/apps/TestApp/Test App 2/TestApp-Prefix.pch
101
- - project/apps/TestApp/Test App 2/en.lproj/InfoPlist.strings
102
- - project/apps/TestApp/Test App 2/en.lproj/Localizable.strings
103
- - project/apps/TestApp/Test App 2/en.lproj/MyViewControllerViewController.xib
104
- - project/apps/TestApp/Test App 2/main.m
105
120
  - project/apps/TestApp/TestApp.xcodeproj/project.pbxproj
106
121
  - project/apps/TestApp/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata
107
122
  - project/apps/TestApp/TestApp.xcodeproj/project.xcworkspace/xcuserdata/anhpham.xcuserdatad/UserInterfaceState.xcuserstate
108
123
  - project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/TestApp.xcscheme
109
124
  - project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/xcschememanagement.plist
110
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/Default-568h@2x.png
111
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/objects-8.0+.nib
112
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/objects.nib
113
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/runtime.nib
114
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/Info.plist
115
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/PkgInfo
116
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/TestApp
117
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/InfoPlist.strings
118
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/Localizable.strings
119
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/objects-8.0+.nib
120
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/objects.nib
121
- - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/runtime.nib
122
- - project/apps/selendroid-test-app.apk
123
- - project/features/TestData/SqlScript/test.sql
124
125
  - project/features/android/Android_test1.feature
125
126
  - project/features/android/Android_test2.feature
126
127
  - project/features/iOS/iOS_test.feature
@@ -131,28 +132,31 @@ files:
131
132
  - project/features/support/env.rb
132
133
  - project/features/support/hooks.rb
133
134
  - project/features/support/project_env.rb
135
+ - project/Gemfile
136
+ - project/Gemfile.lock
134
137
  homepage: https://rubygems.org/gems/ifd_mobile
135
138
  licenses:
136
139
  - MIT
137
- metadata: {}
138
140
  post_install_message: Thank you for installing Infodation Mobile gem.
139
141
  rdoc_options: []
140
142
  require_paths:
141
143
  - lib
142
144
  required_ruby_version: !ruby/object:Gem::Requirement
145
+ none: false
143
146
  requirements:
144
- - - ">="
147
+ - - ! '>='
145
148
  - !ruby/object:Gem::Version
146
149
  version: 1.9.3
147
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
+ none: false
148
152
  requirements:
149
- - - ">="
153
+ - - ! '>='
150
154
  - !ruby/object:Gem::Version
151
155
  version: '0'
152
156
  requirements: []
153
157
  rubyforge_project:
154
- rubygems_version: 2.2.5
158
+ rubygems_version: 1.8.29
155
159
  signing_key:
156
- specification_version: 4
160
+ specification_version: 3
157
161
  summary: SELENIUM WEBDRIVER WITH RUBY & CUCUMBER
158
162
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 1f01da73e099e8c9481b79ac4c32c191ac35537b
4
- data.tar.gz: f1150589243410b4336a33ce0756802219001c40
5
- SHA512:
6
- metadata.gz: c5461024ffafba0dd9c8793f5b8afd4f69c6c7863025d6bb8a372c0bf4d126c524ce54be0f501d149c403a72868118e1878e285ecaa5f5bfcdcd5194838bf973
7
- data.tar.gz: 4c4d3ae869c7e7b9bd961356a468374c9aea0d740e5e3334843745868a3a17e0e654e3f7763f8670c0912b9684fb80ec606072e7bcbbb988bfa03964f826f7e7
@@ -1,28 +0,0 @@
1
- require 'mysql2'
2
- require 'tiny_tds'
3
-
4
- class IFD_Connections
5
- # Open the MYSQL connection to specific schema
6
- def self.get_mysql_db_connection(schema)
7
- begin
8
- # puts ("Connecting to database...");
9
- data_source_schema = schema.downcase
10
- return Mysql2::Client.new(host: $data_source_url, username: $data_source_username, password: $data_source_password,database:data_source_schema);
11
- rescue Exception => e
12
- raise "Cannot connect to database [username: %s; password: %s, dbUrl: %s, dbName: %s] with error %s" %
13
- [$data_source_username, $data_source_password, $data_source_url,data_source_schema, e.message]
14
- end
15
- end
16
-
17
- # Open the SQL Server connection to specific schema
18
- def self.get_sql_server_db_connection(schema)
19
- begin
20
- # puts ("Connecting to database...");
21
- data_source_schema = schema.downcase
22
- return TinyTds::Client.new(dataserver: $data_source_url, username: $data_source_username, password: $data_source_password, database:data_source_schema);
23
- rescue Exception => e
24
- raise "Cannot connect to database [username: %s; password: %s, dbUrl: %s, dbName: %s] with error %s" %
25
- [$data_source_username, $data_source_password, $data_source_url,data_source_schema, e.message]
26
- end
27
- end
28
- end
@@ -1,25 +0,0 @@
1
- class DatabaseMethods
2
- def self.execute_select (schema,sql)
3
- case $db_type.to_sym
4
- when :sql_server then
5
- conn = IFD_Connections.get_sql_server_db_connection(schema)
6
- conn.execute sql
7
- when :mysql then
8
- conn = IFD_Connections.get_mysql_db_connection(schema)
9
- conn.query sql
10
- else
11
- raise "*** ERROR: schema type (#{$db_type}) is not supported (SQL SERVER, MY SQL)."
12
- end
13
- end
14
-
15
- def self.close_connection (schema)
16
- case $db_type.to_sym
17
- when :sql_server then
18
- conn = IFD_Connections.get_sql_server_db_connection(schema)
19
- conn.close
20
- when :mysql then
21
- conn = IFD_Connections.get_mysql_db_connection(schema)
22
- conn.close
23
- end
24
- end
25
- end
@@ -1,53 +0,0 @@
1
- require_relative 'methods/required_files'
2
- #====================================
3
- # INTERACTION STEPS
4
- #====================================
5
- # Step used to execute a SQL script on a specific schema
6
- And /^I run sql script "([^\"]*)" on "([^\"]*)" schema$/ do |script, schema|
7
- begin
8
- sql = "#{script}"
9
- DatabaseMethods.execute_select(schema, sql)
10
- DatabaseMethods.close_connection(schema)
11
- ensure
12
- end
13
- end
14
- # Step used to execute SQL script from SQL file on specific schema
15
- Given /^I run sql script from file "([^\"]*)" on "([^\"]*)" schema$/ do |sql_script, schema|
16
- if sql_script != nil and sql_script != ""
17
- begin
18
- File.readlines($sql_dir + sql_script).each do |line|
19
- if line.nil? || line =~ /^\s*\n*--/
20
- # puts "\nSQL: " + line;
21
- next;
22
- end
23
- line = line.strip();
24
- line = line[0..-2];
25
- #puts "\nSQL: " + line;
26
- DatabaseMethods.execute_select(schema, line)
27
- sleep(1);
28
- end
29
- DatabaseMethods.close_connection(schema)
30
- end
31
- end
32
- end
33
-
34
- # Step used to check if data exists in database or not with condition in file
35
- Then /^I should ( not)? see data in schema "(.*)" database with SQL query in file "(.*)"$/ do |negative, schema, file|
36
- sql = File.read($sql_dir + file)
37
- filepath = ($sql_dir + file)
38
- if File.exist?(filepath)
39
- begin
40
- rs = DatabaseMethods.execute_select(schema, sql)
41
- obj_array = Array.new
42
- rs.each { |row|
43
- row.each_pair { |col, value|
44
- assert(false) if negative.nil? && value == 0 || !negative.nil? && value == 1
45
- }
46
- }
47
- ensure
48
- DatabaseMethods.close_connection(schema)
49
- end
50
- else
51
- raise "*** ERROR: Please check #{filepath} exists."
52
- end
53
- end
File without changes