bddfire 1.0.8 → 1.0.9
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 +8 -8
- data/lib/bddfire/app.rb +7 -0
- data/lib/bddfire/version.rb +1 -1
- data/scaffold/.yard.yml +10 -0
- data/scaffold/browser.json +0 -0
- data/scaffold/cucumber.yml +4 -1
- data/scaffold/features/google.feature +8 -0
- data/scaffold/features/pages/Abstract.rb +14 -0
- data/scaffold/features/pages/HomePage.rb +22 -0
- data/scaffold/features/step_definitions/google_steps.rb +11 -0
- data/scaffold/features/support/env.rb +21 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzQzMTlhZmNkZmY1OWVkOGU3ZWY5OGQ0MjI1YjJjMmE5OGFjMjg4Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmE4NWRiYzllYTYwMDIzNzI5NDhhYjBhMDcwMzZmOTM3YmQyM2Y5Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWM3YjVkZDkyNmM0NjA3MzlmM2MwZTY3MTMxNmFjMTQ0NzA4MjJlNTU2NmE0
|
10
|
+
MjMwMmEwZjA3NDU2YmJhYzAzNWJiZDkwN2ZjYjJiNzRjYjk2ZjIzMDc2ZGMw
|
11
|
+
YzQ2NzUyOTczZWQ2OTU1OWQwZTNmZDU2MzIyZjJmNjVlY2JjYmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODRkYjRkYjRmMDZhODBlN2Y4ZTFkYjYxYjlhMDU4OTQ5MGI2ZGQwNDhjMDdl
|
14
|
+
ZmY2ZDQyOGE1ODNjNjc2ZmIwYmIxMDIyNWQzYTViNjhhOTM5M2Q4MGExYjE2
|
15
|
+
ODM2NWMxYmM2OTA2MTdmM2RmMDA0MjQ0N2QzMGUxNmE3ZjdkNjg=
|
data/lib/bddfire/app.rb
CHANGED
@@ -26,20 +26,27 @@ module BDDfire
|
|
26
26
|
insert_gem 'redcarpet'
|
27
27
|
insert_gem 'rubocop'
|
28
28
|
insert_gem 'cuke_sniffer'
|
29
|
+
insert_gem 'json'
|
29
30
|
generate_rakefile
|
30
31
|
add_task BDDfire::Tasks.cucumber
|
31
32
|
add_task BDDfire::Tasks.cuke_sniffer
|
32
33
|
add_task BDDfire::Tasks.rubocop
|
34
|
+
copy_file "features/step_definitions/google_steps.rb"
|
33
35
|
add_file "features/step_definitions/#{project_name}_steps.rb"
|
34
36
|
add_file "features/#{project_name}.feature"
|
37
|
+
copy_file "features/google.feature"
|
35
38
|
copy_file "cucumber.yml"
|
36
39
|
copy_file ".rubocop.yml"
|
37
40
|
copy_file ".ruby-version"
|
38
41
|
copy_file ".travis.yml"
|
39
42
|
copy_file ".relish"
|
43
|
+
copy_file ".yard.yml"
|
44
|
+
copy_file "browser.json"
|
40
45
|
copy_file "features/support/env.rb"
|
41
46
|
copy_file "features/support/hooks.rb"
|
42
47
|
copy_file "features/support/responsive.rb"
|
48
|
+
copy_file "features/pages/HomePage.rb"
|
49
|
+
copy_file "features/pages/Abstract.rb"
|
43
50
|
template "features/support/helpers.erb", "features/support/helpers.rb"
|
44
51
|
init_gitignore
|
45
52
|
append_file ".gitignore", ".ruby-version\n"
|
data/lib/bddfire/version.rb
CHANGED
data/scaffold/.yard.yml
ADDED
File without changes
|
data/scaffold/cucumber.yml
CHANGED
@@ -3,4 +3,7 @@
|
|
3
3
|
---
|
4
4
|
default: --profile html_report --profile test
|
5
5
|
html_report: --format pretty --format html --out=features_report.html
|
6
|
-
bvt: --tags @test
|
6
|
+
bvt: --tags @test
|
7
|
+
browserstack : DRIVER=browserstack
|
8
|
+
poltergeist : DRIVER=poltergeist
|
9
|
+
webdriver : DRIVER=webdriver
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class HomePage
|
2
|
+
class << self
|
3
|
+
attr_accessor :title, :title_text
|
4
|
+
end
|
5
|
+
|
6
|
+
self.title_text = "Your Site "
|
7
|
+
self.title = "your_css_selector"
|
8
|
+
|
9
|
+
def initialize(session)
|
10
|
+
@session = Capybara.current_session
|
11
|
+
end
|
12
|
+
|
13
|
+
def visit_home_page
|
14
|
+
@session.visit("your_url")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
=begin
|
19
|
+
You can the use these methods in the step_definitions as
|
20
|
+
@home_page = HomePage.new(Capybara.current_session)
|
21
|
+
@home_page.visit_home_page
|
22
|
+
=end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Given(/^I am on the home page$/) do
|
2
|
+
visit "http://www.google.com"
|
3
|
+
end
|
4
|
+
|
5
|
+
When /^I fill in "([^"]*)" with "([^"]*)"$/ do |element, text|
|
6
|
+
fill_in element, with: text
|
7
|
+
end
|
8
|
+
|
9
|
+
Then(/^I should see "(.*?)"$/) do |text|
|
10
|
+
page.should have_content text
|
11
|
+
end
|
@@ -20,3 +20,24 @@ Capybara.register_driver :poltergeist do |app|
|
|
20
20
|
|
21
21
|
Capybara::Poltergeist::Driver.new(app, options)
|
22
22
|
end
|
23
|
+
|
24
|
+
Capybara.register_driver :browserstack do |app|
|
25
|
+
stackToUse = ENV['BS_STACK'] || 'osx_firefox_15'
|
26
|
+
json = JSON.load(open(File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'browsers.json'))))
|
27
|
+
config = json[stackToUse]
|
28
|
+
unless config
|
29
|
+
puts "invalid BS_STACK specified. Was '#{stackToUse}'"
|
30
|
+
return
|
31
|
+
end
|
32
|
+
|
33
|
+
# Add default config
|
34
|
+
config['name'] = "#{config['os']} #{config['os_version']} - #{Time.now.strftime '%Y-%m-%d %H:%M'}"
|
35
|
+
config['acceptSslCert'] = false
|
36
|
+
config['browserstack.debug'] = true
|
37
|
+
|
38
|
+
Capybara::Selenium::Driver.new(app,
|
39
|
+
:browser => :remote,
|
40
|
+
:desired_capabilities => config,
|
41
|
+
:url => "http://USERNAME:API_KEY@hub.browserstack.com/wd/hub"
|
42
|
+
)
|
43
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bddfire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shashikant Jagtap
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -194,12 +194,18 @@ files:
|
|
194
194
|
- scaffold/.rubocop.yml
|
195
195
|
- scaffold/.ruby-version
|
196
196
|
- scaffold/.travis.yml
|
197
|
+
- scaffold/.yard.yml
|
198
|
+
- scaffold/browser.json
|
197
199
|
- scaffold/config_files/.relish
|
198
200
|
- scaffold/config_files/.rubocop.yml
|
199
201
|
- scaffold/config_files/.ruby-version
|
200
202
|
- scaffold/config_files/.travis.yml
|
201
203
|
- scaffold/config_files/cucumber.yml
|
202
204
|
- scaffold/cucumber.yml
|
205
|
+
- scaffold/features/google.feature
|
206
|
+
- scaffold/features/pages/Abstract.rb
|
207
|
+
- scaffold/features/pages/HomePage.rb
|
208
|
+
- scaffold/features/step_definitions/google_steps.rb
|
203
209
|
- scaffold/features/support/env.rb
|
204
210
|
- scaffold/features/support/helpers.erb
|
205
211
|
- scaffold/features/support/hooks.rb
|