watir_framework 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/generators/new_project/generator.rb +3 -2
- data/generators/new_project/templates/gemspec.rb.erb +1 -0
- data/generators/new_project/templates/lib/models/search.rb.erb +10 -0
- data/generators/new_project/templates/lib/name.rb.erb +2 -0
- data/generators/new_project/templates/lib/pages/home.rb.erb +3 -3
- data/generators/new_project/templates/spec/name_spec.rb.erb +3 -2
- data/lib/watir_framework/models/search.rb +10 -0
- data/lib/watir_framework/pages/home.rb +3 -3
- data/lib/watir_framework.rb +2 -0
- data/watir_framework.gemspec +2 -2
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f75e417376c42e17aceb46741ecbf0a269990e41
|
4
|
+
data.tar.gz: 177b5929e5944b1b27807b239f628a015a386272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a901075c375554f5da0d0eabd06e78ad8706a35bfd616935ab2874b22d10681b34934cc906cb6806bb9347f7278738562bdbd02e762751a4ea7a178b3d3fc48
|
7
|
+
data.tar.gz: 3d9aa33920a9887d1c5a536857a1439ba4a8c9c28850c7d73a1f4e7cedc788901963461b0c26530c372d670ff38b018b3b538d37e7a9532db79a19d5494595de
|
data/CHANGES.md
CHANGED
@@ -17,7 +17,7 @@ class NewProject < Thor::Group
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def user_name
|
20
|
-
|
20
|
+
@user_name ||= git.config["user.name"]
|
21
21
|
return @user_name if @user_name
|
22
22
|
@user_name = ask "Enter your Name: "
|
23
23
|
@git.config('user.name', @user_name)
|
@@ -25,7 +25,7 @@ class NewProject < Thor::Group
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def user_email
|
28
|
-
|
28
|
+
@user_email ||= git.config["user.email"]
|
29
29
|
return @user_email if @user_email
|
30
30
|
@user_email = ask "Enter your Email: "
|
31
31
|
@git.config('user.email', @user_email)
|
@@ -47,6 +47,7 @@ class NewProject < Thor::Group
|
|
47
47
|
template "lib/name.rb.erb", File.join(name, "lib", "#{name}.rb")
|
48
48
|
template "lib/pages/home.rb.erb", File.join(name, "lib", name, "pages", "home.rb")
|
49
49
|
template "lib/pages/results.rb.erb", File.join(name, "lib", name, "pages", "results.rb")
|
50
|
+
template "lib/models/search.rb.erb", File.join(name, "lib", name, "models", "search.rb")
|
50
51
|
end
|
51
52
|
|
52
53
|
def spec_files
|
@@ -1,13 +1,13 @@
|
|
1
1
|
module <%= name.capitalize %>
|
2
2
|
class Home < WatirDrops::PageObject
|
3
3
|
|
4
|
-
element(:
|
4
|
+
element(:search_term) { browser.text_field(name: 'q')}
|
5
5
|
element(:submit) { browser.button(name: 'btnG') }
|
6
6
|
|
7
7
|
page_url { 'https://www.google.com' }
|
8
8
|
|
9
|
-
def search(
|
10
|
-
|
9
|
+
def search(data)
|
10
|
+
fill_form(data)
|
11
11
|
submit.click
|
12
12
|
end
|
13
13
|
|
@@ -8,10 +8,11 @@ describe <%= name.capitalize %> do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "submits a search" do
|
11
|
+
search_data = <%= name.capitalize %>::Model::Search.new
|
11
12
|
WatirDrops::PageObject.browser = Watir::Browser.new
|
12
13
|
search_page = <%= name.capitalize %>::Home.visit
|
13
|
-
search_page.search(
|
14
|
-
expect(<%= name.capitalize %>::Results.new.first_result).to include
|
14
|
+
search_page.search(search_data)
|
15
|
+
expect(<%= name.capitalize %>::Results.new.first_result).to include search_data.first_result
|
15
16
|
WatirDrops::PageObject.browser.quit
|
16
17
|
end
|
17
18
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
module WatirFramework
|
2
2
|
class Home < WatirDrops::PageObject
|
3
3
|
|
4
|
-
element(:
|
4
|
+
element(:search_term) { browser.text_field(name: 'q')}
|
5
5
|
element(:submit) { browser.button(name: 'btnG') }
|
6
6
|
|
7
7
|
page_url { 'https://www.google.com' }
|
8
8
|
|
9
|
-
def search(
|
10
|
-
|
9
|
+
def search(data)
|
10
|
+
fill_form(data)
|
11
11
|
submit.click
|
12
12
|
end
|
13
13
|
|
data/lib/watir_framework.rb
CHANGED
data/watir_framework.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "watir_framework"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.2"
|
8
8
|
spec.authors = ["Titus Fortner"]
|
9
9
|
spec.email = ["titusfortner@gmail.com"]
|
10
10
|
|
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_development_dependency "rspec", "~> 3.0"
|
35
35
|
|
36
36
|
spec.add_dependency('thor', '~> 0.19.1')
|
37
|
-
spec.add_dependency "watir", "~> 6.0"
|
38
37
|
spec.add_dependency "watir_drops", "~> 0.5.0"
|
38
|
+
spec.add_dependency "watir_model"
|
39
39
|
spec.add_dependency "git", "~> 1.3.0"
|
40
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Titus Fortner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,33 +67,33 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.19.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: watir_drops
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.5.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.5.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: watir_model
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0
|
89
|
+
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: git
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- generators/new_project/templates/gemfile.rb.erb
|
131
131
|
- generators/new_project/templates/gemspec.rb.erb
|
132
132
|
- generators/new_project/templates/gitignore.rb.erb
|
133
|
+
- generators/new_project/templates/lib/models/search.rb.erb
|
133
134
|
- generators/new_project/templates/lib/name.rb.erb
|
134
135
|
- generators/new_project/templates/lib/pages/home.rb.erb
|
135
136
|
- generators/new_project/templates/lib/pages/results.rb.erb
|
@@ -141,6 +142,7 @@ files:
|
|
141
142
|
- generators/new_project/templates/spec/spec_helper.rb.erb
|
142
143
|
- generators/new_project/templates/travis.rb.erb
|
143
144
|
- lib/watir_framework.rb
|
145
|
+
- lib/watir_framework/models/search.rb
|
144
146
|
- lib/watir_framework/pages/home.rb
|
145
147
|
- lib/watir_framework/pages/results.rb
|
146
148
|
- watir_framework.gemspec
|