bddfire 1.9.0 → 1.9.1
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/assertions/assert.rb +11 -11
- data/lib/bddfire/version.rb +1 -1
- data/lib/bddfire/web/web_steps.rb +8 -8
- data/pre-defined-steps/capybara_steps.md +19 -19
- data/scaffold/config_files/Rakefile +54 -4
- data/scaffold/config_files/cucumber.yml +4 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NTEyYmU5MjZiMjI0MmVjMWQ2Yjg4MThiZTc0ZGIwYjcyMzQ5ZTFmYg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MGEwMTg5NmZlN2Y3MjNkZTVlOGVkZGRmOTNkMWY1ZjI3NjE4NmQ0NA==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZTlkMTlhZmNjZmQyMGQxNWMxODRmY2I1N2VlODZmYWEyMGFlOGE4YzlhNjg3
|
|
10
|
+
M2FhZjVlZGQ1OTdkZDg4NzJiODcwODNjYjdmZGE4Y2FiZGNkNjNmMGM1MzE4
|
|
11
|
+
NmYzZDVhOWQ3ZDg3MDVlMmQ2ZWM1NDg5MWYwMDM2ZTA4NDY4MDI=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
M2RlYWQzNzA0NjBhNDQxZGE1MTUyZTllZTdjZDcwNmJlNDc4Njg5ODU3NzZj
|
|
14
|
+
OGVlMjQzMzQwOTQ1ZWE1YzdkOGVhMzg2NTVlYTA5NzQwNTJlNmE0N2VmMDA2
|
|
15
|
+
NTc0YjAzNGQyMWI4N2Q2NGQwNmMzZmMxZmJhYzliYWE1YTRkNjM=
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
|
|
2
|
-
Then(/^page
|
|
2
|
+
Then(/^the page title is "(.*?)"$/) do |title|
|
|
3
3
|
page.should have_title(title)
|
|
4
4
|
end
|
|
5
5
|
|
|
6
|
-
Then(/^I
|
|
6
|
+
Then(/^I see the element "(.*?)" with the text "(.*?)"$/) do |element, text|
|
|
7
7
|
page.should have_css(element, :text => text)
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
Then(/^page
|
|
10
|
+
Then(/^page contains "(.*?)"$/) do |element|
|
|
11
11
|
page.should have_css(element)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
Then(/^I
|
|
14
|
+
Then(/^I see element "(.*?)" "(.*?)" times$/) do |element, count|
|
|
15
15
|
page.should have_css(element, :count => count)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
Then(/^page
|
|
18
|
+
Then(/^page contains the button "(.*?)"$/) do |button|
|
|
19
19
|
page.should have_buttton(button)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
Then(/^page
|
|
22
|
+
Then(/^page contains the field "(.*?)"$/) do |field|
|
|
23
23
|
page.should have_field(field)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
Then(/^page
|
|
26
|
+
Then(/^page contains the link "(.*?)"$/) do |link|
|
|
27
27
|
page.should have_link(link)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
Then(/^page
|
|
30
|
+
Then(/^page contains the table "(.*?)"$/) do |table|
|
|
31
31
|
page.should have_table(table)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
Then(/^
|
|
34
|
+
Then(/^the element "(.*?)" is checked$/) do |element|
|
|
35
35
|
page.should have_checked_field(element)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
Then(/^
|
|
38
|
+
Then(/^the element "(.*?)" is unchecked$/) do |element|
|
|
39
39
|
page.should have_unchecked_field(element)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
Then(/^
|
|
42
|
+
Then(/^the page contains the following content "(.*?)"$/) do |content|
|
|
43
43
|
page.should have_content(content)
|
|
44
44
|
end
|
data/lib/bddfire/version.rb
CHANGED
|
@@ -3,7 +3,7 @@ Given(/^I am on "(.*?)"$/) do |url|
|
|
|
3
3
|
visit(url)
|
|
4
4
|
end
|
|
5
5
|
|
|
6
|
-
When(/^I fill in "(.*?)" with "(.*?)"$/) do |element, text|
|
|
6
|
+
When(/^I fill in "(.*?)" with the text "(.*?)"$/) do |element, text|
|
|
7
7
|
fill_in element, with: text
|
|
8
8
|
end
|
|
9
9
|
|
|
@@ -15,11 +15,11 @@ When(/^I fill "(.*?)" into field with (.+) "(.*?)"$/) do |data, type, locator|
|
|
|
15
15
|
fill_in locator, with: data
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
When(/^I
|
|
18
|
+
When(/^I select the "(.*?)" link$/) do |link|
|
|
19
19
|
click_link(link)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
When(/^I
|
|
22
|
+
When(/^I select the "(.*?)" button$/) do |button|
|
|
23
23
|
click_button(button)
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -27,11 +27,11 @@ When(/^I click on link having text "(.*?)"$/) do |text|
|
|
|
27
27
|
click_link(text)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
When(/^I
|
|
30
|
+
When(/^I check checkbox "(.*?)"$/) do |box|
|
|
31
31
|
check(box)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
When(/^I
|
|
34
|
+
When(/^I uncheck checkbox "(.*?)"$/) do |box|
|
|
35
35
|
uncheck(box)
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -39,14 +39,14 @@ When(/^I choose radio button"(.*?)"$/) do |radiobutton|
|
|
|
39
39
|
choose(radiobutton)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
When(/^I select option "(.*?)" from dropdown "(.*?)"$/) do |option, dropdown|
|
|
42
|
+
When(/^I select option "(.*?)" from the dropdown "(.*?)"$/) do |option, dropdown|
|
|
43
43
|
select(option, :from => dropdown)
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
When(/^I
|
|
46
|
+
When(/^I attach the file "(.*?)" to the field "(.*?)"$/) do |file, locator|
|
|
47
47
|
attach_file(locator, file)
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
When(/^I hover over element"(.*?)"$/) do |element|
|
|
50
|
+
When(/^I hover over thr element"(.*?)"$/) do |element|
|
|
51
51
|
page.find(element).hover
|
|
52
52
|
end
|
|
@@ -19,27 +19,27 @@
|
|
|
19
19
|
### User Actions
|
|
20
20
|
|
|
21
21
|
Given I am on “url”
|
|
22
|
-
When I
|
|
23
|
-
When I
|
|
24
|
-
When I
|
|
22
|
+
When I fill in “element” with the text “text”
|
|
23
|
+
When I selet the “link” link
|
|
24
|
+
When I select the "button" button
|
|
25
25
|
When I click on element having text “text"
|
|
26
|
-
When I
|
|
27
|
-
When I
|
|
26
|
+
When I check “checkbox”
|
|
27
|
+
When I uncheck “checkbox”
|
|
28
28
|
When I choose “radio button”
|
|
29
|
-
When I select option
|
|
30
|
-
When I attach file “file_path"to field “locator”
|
|
31
|
-
When I hover over element “locator
|
|
29
|
+
When I select option “option” from the dropdown “dropdown”
|
|
30
|
+
When I attach the file “file_path" to the field “locator”
|
|
31
|
+
When I hover over the element “locator"
|
|
32
32
|
|
|
33
33
|
### Assertions
|
|
34
34
|
|
|
35
|
-
Then page
|
|
36
|
-
Then I
|
|
37
|
-
Then page
|
|
38
|
-
Then I
|
|
39
|
-
Then page
|
|
40
|
-
Then page
|
|
41
|
-
Then page
|
|
42
|
-
Then page
|
|
43
|
-
Then
|
|
44
|
-
Then
|
|
45
|
-
Then
|
|
35
|
+
Then the page title is “title"
|
|
36
|
+
Then I see the element “element” with the text “text”
|
|
37
|
+
Then page contains “element”
|
|
38
|
+
Then I see element “element” “count” times
|
|
39
|
+
Then page contains the link "link"
|
|
40
|
+
Then page contains the button “button”
|
|
41
|
+
Then page contains the field “field”
|
|
42
|
+
Then page contains the table “table”
|
|
43
|
+
Then the element “element” is checked
|
|
44
|
+
Then the element “element” is unchecked
|
|
45
|
+
Then the page contains the following content "content"
|
|
@@ -1,18 +1,61 @@
|
|
|
1
|
-
|
|
1
|
+
require 'rubygems'
|
|
2
2
|
require 'cucumber'
|
|
3
3
|
require 'cucumber/rake/task'
|
|
4
4
|
require 'parallel'
|
|
5
5
|
require 'json'
|
|
6
6
|
require 'yard'
|
|
7
|
+
require 'fileutils'
|
|
8
|
+
|
|
9
|
+
ADB_SERIAL = "your_serial_number"
|
|
10
|
+
|
|
11
|
+
task :cleanup do
|
|
12
|
+
puts " ========Deleting old reports ang logs========="
|
|
13
|
+
FileUtils.rm_rf('reports')
|
|
14
|
+
File.delete("cucumber_failures.log") if File.exist?("cucumber_failures.log")
|
|
15
|
+
File.new("cucumber_failures.log", "w")
|
|
16
|
+
Dir.mkdir("reports")
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
task :parallel_run do
|
|
20
|
+
puts "===== Executing Tests in parallel"
|
|
21
|
+
system "bundle exec parallel_cucumber features/ -o \"-p parallel -p pretty\" -n 10"
|
|
22
|
+
puts " ====== Parallel execution finished and cucumber_failure.log created ========="
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
task :rerun do
|
|
26
|
+
if File.size("cucumber_failures.log") == 0
|
|
27
|
+
puts "==== No failures. Everything Passed ========="
|
|
28
|
+
else
|
|
29
|
+
puts " =========Re-running Failed Scenarios============="
|
|
30
|
+
system "bundle exec cucumber @cucumber_failures.log -f pretty"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
task :parallel_cucumber => [ :cleanup, :parallel_run, :rerun ]
|
|
35
|
+
|
|
36
|
+
Rake::Task["parallel_cucumber"].invoke
|
|
7
37
|
|
|
8
38
|
|
|
9
39
|
YARD::Rake::YardocTask.new(:yard) do |t|
|
|
10
40
|
t.files = ['features/**/*.feature', 'features/**/*.rb']
|
|
11
|
-
#t.options = ['--any', '--extra', '--opts'] # optional
|
|
12
41
|
end
|
|
13
42
|
|
|
14
|
-
Cucumber::Rake::Task.new(:
|
|
15
|
-
t.cucumber_opts = "features --format pretty"
|
|
43
|
+
Cucumber::Rake::Task.new(:seleium) do |t|
|
|
44
|
+
t.cucumber_opts = "features -p selenium --format pretty --profile html "
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
Cucumber::Rake::Task.new(:poltergeist) do |t|
|
|
49
|
+
t.cucumber_opts = "features -p poltergeist --format pretty --profile html "
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
Cucumber::Rake::Task.new(:sauce) do |t|
|
|
54
|
+
t.cucumber_opts = "features -p sauce --format pretty --profile html "
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
Cucumber::Rake::Task.new(:browserstack) do |t|
|
|
58
|
+
t.cucumber_opts = "features -p browserstack --format pretty --profile html "
|
|
16
59
|
end
|
|
17
60
|
|
|
18
61
|
task :parallel_cucumber do
|
|
@@ -22,3 +65,10 @@ end
|
|
|
22
65
|
task :rubocop do
|
|
23
66
|
sh "bundle exec rubocop features/"
|
|
24
67
|
end
|
|
68
|
+
|
|
69
|
+
task :appium do
|
|
70
|
+
puts "===== Installing Appium with NodeJS====="
|
|
71
|
+
sh "npm install"
|
|
72
|
+
sh " ./node_modules/.bin/appium > /dev/null 2>&1"
|
|
73
|
+
system "bundle exec cucumber -p appium_android_web ADB_SERIAL=#{ADB_SERIAL}"
|
|
74
|
+
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
default: -p selenium
|
|
2
|
-
|
|
2
|
+
html: --format --out reports/test-report.html
|
|
3
3
|
bvt: --tags @test
|
|
4
4
|
browserstack : DRIVER=browserstack
|
|
5
5
|
testingbot: DRIVER=testingbot
|
|
@@ -8,3 +8,6 @@ selenium : DRIVER=selenium
|
|
|
8
8
|
appium : DRIVER=appium
|
|
9
9
|
sauce : DRIVER=sauce
|
|
10
10
|
chrome: DRIVER=chrome
|
|
11
|
+
parallel_html: --format html --out reports/process<%= ENV['TEST_ENV_NUMBER'] %>.html
|
|
12
|
+
pretty: -f pretty
|
|
13
|
+
parallel: --format pretty --profile parallel_html --format ParallelTests::Cucumber::FailuresLogger --out cucumber_failures.log
|
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.9.
|
|
4
|
+
version: 1.9.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shashikant Jagtap
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-05-
|
|
11
|
+
date: 2015-05-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cucumber
|
|
@@ -201,3 +201,4 @@ specification_version: 4
|
|
|
201
201
|
summary: ! 'BDDfire: Automate Mobile & Web apps with less code. An instant Ruby-Cucumber
|
|
202
202
|
BDD framework'
|
|
203
203
|
test_files: []
|
|
204
|
+
has_rdoc:
|