Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
step_definitions/desktop/google_search_steps.rb | 36 | 17 | 100.00%
|
100.00%
|
Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.
2 # Description : step definitions for steps related to Google search |
3 # Author : Chandra sekaran |
4 |
5 # Given the user is on the Google home page |
6 Given /^the user is on the Google home page$/ do |
7 visit(CUKES::Google_HomePage) |
8 end |
9 |
10 # When the user enters "bet365" in the search textbox and clicks the search button |
11 When /^the user enters "(.*?)" in the search textbox and clicks the search button$/ do |search_text| |
12 on(CUKES::Google_HomePage).search_for_text(search_text) |
13 end |
14 |
15 # Then the user should be shown the search results |
16 Then /^the user should be shown the search results$/ do |
17 on(CUKES::Google_HomePage) do |page| |
18 page.wait_until(20, "Could not find 'result div' within 20s") { page.div_result_element.visible? } |
19 expect(page.div_result_element.visible?).to be true |
20 $log.success("Successfully found search results") |
21 end |
22 end |
23 |
24 # When the user clicks the link for bet365 |
25 When /^the user clicks the link for bet(\d+)$/ do |arg1| |
26 on(CUKES::Google_HomePage).click_bet365 |
27 $log.success("Successfully clicked Bet365.com link") |
28 end |
29 |
30 # Then the user should be redirected to the bet365.com website |
31 Then /^the user should be redirected to the bet(\d+)\.com website$/ do |arg1| |
32 on(CUKES::Google_HomePage) do |page| |
33 page.wait_for_page_load |
34 expect(page.title.include? "bet365 - Sports Betting").to be true |
35 $log.success("Successfully redirected to Bet365.com page") |
36 end |
37 end |
Generated on 2015-05-08 10:40:30 +0530 with SimpleCov-RCov 0.2.3