bddfire 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGQ4ODNiZTQ0MDE3OWVmNjAyZDgyODZlNjY2ODEzYzI5MTAyMGVkYw==
4
+ MjZjYzcyODRjYzhhMGJhMTkxMmJhMmIyZTc0YzQ4ZjNjYjMyYTk2Yg==
5
5
  data.tar.gz: !binary |-
6
- NTk0ZGYyYjcwNmY1M2Q5NTY4MjNiOWQwN2M3N2RhYWIwNzUwMDg1OA==
6
+ NWM0YjQ2MzkzMGJiZjU2ZjUwN2Y4Y2MyZjkzMzEwOWQ2ODE4NTEzMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmVlMDVjMDNmYmVkMTMzYWFkZDM0M2E5MjRlY2M0YTJmNTc5MWVkNjY1MDYy
10
- YzYzMmY5MDM2ZjllYTViZjY1ODE4MjNmN2EyYmE0ZWQzMDYyYmJmOTgxMDE5
11
- ODlhZTAyZTU4ZWM2ZWY3Yjk5ODg0MDFmMDllNWUyYzYwOGFkOGQ=
9
+ OGVlNTFlMjY3YjFjYTE4ZmI2MWZiNjFiMDI2ODdjYjk4MmFlYzg0MzJmZWVk
10
+ MTIwODk3YmExNWFjMzQyMmI5NzlhNmI0MGE5OGRkNTkyOWZjYjc2ZWZmZTMx
11
+ MTNjNWRmNzc4ZTM3NjVjMzIyMWM5NzI0MGExYzkxM2U0MDFmNjU=
12
12
  data.tar.gz: !binary |-
13
- MzE5M2EwZTliOTk5ZmVhZTEyNDhlZjAyY2ViYWIwNGExZTRhNjQzMGI3NmU1
14
- MDE4OGExNjFjODE1MDIxOTliYmQ2NzI1OGM4Y2VhNjEwOWQyODY1MTk4YWQ0
15
- NzM0MmMwMjYxMjJjMzQwNGRkZWQxMTE5MDFmMGNmY2YxMDAwYzE=
13
+ ZWZkMzQ5MTAzNTVjYzBjMjc2MDI3M2ZiNzI3NDIxNjUwZWQzMDVmN2Q0Yzg4
14
+ MWZmMzM0NTQ4Mjk3NDBkZjUzZWY5NDM4NDFhMzQzZmI5ZTM3ZTBhNzBlZGE2
15
+ NjdiMTY1N2E1MWZlNDA4ZTc3YzNjNWEwOTM3Y2E3N2JhNTBmOTg=
@@ -0,0 +1,65 @@
1
+ require_relative 'web/web_methods'
2
+
3
+ Then(/^the response status code should be "(.*?)"$/) do |code|
4
+ page_code = page.driver.status_code
5
+ expect(page_code).to eq(code)
6
+ end
7
+
8
+ Then(/^response headers should contain "(.*?)"$/) do |expected_header|
9
+ header = page.response_headers
10
+ expect(header).to include(expected_header)
11
+ end
12
+
13
+ Then(/^page source should contain "(.*?)"$/) do |data|
14
+ source = page.driver.source
15
+ expect(source).to include(data)
16
+ end
17
+
18
+ When(/^I clear network traffic$/) do
19
+ page.driver.clear_network_traffic
20
+ end
21
+
22
+ When(/^I called network traffic of the page$/) do
23
+ page.driver.network_traffic.each do |request|
24
+ request.response_parts.uniq(&:url).each do |response|
25
+ puts "\n Responce URL #{response.url}: \n Status #{response.status}"
26
+ end
27
+ end
28
+ end
29
+
30
+ Then(/^network traffic should contains resource "(.*?)"$/) do |resource|
31
+ traffic = page.driver.network_traffic
32
+ expect(traffic).to include(resource)
33
+ end
34
+
35
+ When(/^I request response headers$/) do
36
+ puts page.response_headers.to_a
37
+ end
38
+
39
+ When(/^I request page "(.*?)" with header name "(.*?)" value "(.*?)"$/) do |url, name, value|
40
+ page.driver.headers = { '#{name}' => '#{value}' }
41
+ visit(url)
42
+ end
43
+
44
+ When(/^I set the cookie name "(.*?)" with value "(.*?)"$/) do |name, value|
45
+ page.driver.set_cookie(name, value)
46
+ end
47
+
48
+
49
+ Then(/^I should see the cookie "(.*?)"$/) do |cookie|
50
+ cookies = page.driver.cookies
51
+ expect(cookies).to include(cookie)
52
+ end
53
+
54
+ When(/^I removed cookie "(.*?)"$/) do |arg1|
55
+ page.driver.remove_cookie
56
+ end
57
+
58
+ When(/^I clear all cookies$/) do
59
+ page.driver.clear_cookies
60
+ end
61
+
62
+ When(/^I visit page with base authorization user "(.*?)" and password "(.*?)"$/) do |user, password|
63
+ #page.driver.headers = {'Authorization': 'Basic '+ Base64.encode64('username:password')};
64
+ page.driver.basic_authorize(user, password)
65
+ end
@@ -1,3 +1,3 @@
1
1
  module BDDfire
2
- VERSION = "1.8.0"
2
+ VERSION = "1.8.1"
3
3
  end
@@ -0,0 +1,18 @@
1
+ # Headless Steps
2
+
3
+ Noe: these steps will only work with Poltergeist driver for Capybara. Don't use it with Selenium
4
+
5
+
6
+ Then the response status code should be "200"
7
+ Then response headers should contain ""
8
+ Then page source should contain ""
9
+ When I clear network traffic
10
+ When I called network traffic of the page
11
+ Then network traffic should contains resource ""
12
+ When I request response headers
13
+ When I request page "url" with header name "dd" value ""
14
+ When I set the cookie name "cookie" with value "ss"
15
+ Then I should see the cookie ""
16
+ When I removed cookie "cookie"
17
+ When I clear all cookies
18
+ When I visit page with base authorization user "" and password ""
File without changes
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+ export ADB_SERIAL=$2
3
+ ruby -v
4
+ bundle -v
5
+ bundle install
6
+ npm install
7
+ ./node_modules/.bin/appium &
8
+ PID=$!
9
+ sleep 5
10
+ bundle exec cucumber ${ADB_SERIAL} DRIVER=appium -f pretty
11
+ kill $PID
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bddfire
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shashikant Jagtap
@@ -115,6 +115,7 @@ files:
115
115
  - lib/bddfire.rb
116
116
  - lib/bddfire/assert.rb
117
117
  - lib/bddfire/browser_actions.rb
118
+ - lib/bddfire/headless_steps.rb
118
119
  - lib/bddfire/mobile/mobile_methods.rb
119
120
  - lib/bddfire/mobile/required_files.rb
120
121
  - lib/bddfire/mobile_steps.rb
@@ -123,6 +124,7 @@ files:
123
124
  - lib/bddfire/web/web_methods.rb
124
125
  - lib/bddfire/web_steps.rb
125
126
  - pre-defined-steps/capybara_steps.md
127
+ - pre-defined-steps/headless_steps.md
126
128
  - scaffold/config_files/.relish
127
129
  - scaffold/config_files/.rubocop.yml
128
130
  - scaffold/config_files/.ruby-version
@@ -132,7 +134,6 @@ files:
132
134
  - scaffold/config_files/README.md
133
135
  - scaffold/config_files/Rakefile
134
136
  - scaffold/config_files/browser.json
135
- - scaffold/config_files/ci_script
136
137
  - scaffold/config_files/cucumber.yml
137
138
  - scaffold/config_files/package.json
138
139
  - scaffold/features/google.feature
@@ -151,6 +152,7 @@ files:
151
152
  - scaffold/rake_tasks/rubocop.rb
152
153
  - scaffold/rake_tasks/yard.rb
153
154
  - scaffold/scripts/ci_script
155
+ - scaffold/scripts/run_appium
154
156
  - scaffold/spec/spec_helper.rb
155
157
  homepage: https://github.com/Shashikant86/bddfire
156
158
  licenses:
@@ -1,15 +0,0 @@
1
- #!/bin/bash
2
- RAKETASK=$1
3
- rm -rf ${WORKSPACE}/target/
4
- rm -rf ${WORKSPACE}/.yarddoc/
5
- rm -rf ${WORKSPACE}/doc/
6
- mkdir -p ${WORKSPACE}/target/
7
- bundle install --path vendor/bundle --binstubs
8
- bundle exec yard config load_plugins true
9
- bundle exec yardoc 'example/**/*.rb' 'example/**/*.feature'
10
- bundle exec rake yard
11
- cd ${WORKSPACE}/features
12
- bundle exec cuke_sniffer --out html ${WORKSPACE}/target/cuke_sniffer.html
13
- bundle exec rubocop ${WORKSPACE}/features/ --require rubocop/formatter/checkstyle_formatter --format Rubocop::Formatter::CheckstyleFormatter --no-color --silent --rails --out ${WORKSPACE}/target/checkstyle.xml
14
- cd ${WORKSPACE}
15
- bundle exec rake "${RAKETASK}"