Skip to content

Instantly share code, notes, and snippets.

Avatar

Bouhenniche Sihem SihemBouhenniche

  • Algiers
View GitHub Profile
@SihemBouhenniche
SihemBouhenniche / dummy_steps.rb
Created Aug 6, 2019
Behavior driven design (BDD) example on web applications with cucumber and ruby
View dummy_steps.rb
When(/^I click on search button$/) do
GoogleHomeHelpers.submit
end
Then(/^I can type "(.+)" in search field$/) do |value|
GoogleHomeHelpers.fill_keyword(value)
end
And(/^I click on first suggestion$/) do
GoogleHomeHelpers.click_first_suggestion
@SihemBouhenniche
SihemBouhenniche / Rakefile
Created Aug 6, 2019
Behavior driven design (BDD) example on web applications with cucumber and ruby
View Rakefile
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
#@!method init_host_name
#init host name, in dummy feature the host is google.
def init_host_name
if ENV['host'].equal? nil
ENV['host'] = 'https://www.google.com'
end
@SihemBouhenniche
SihemBouhenniche / Gemfile
Created Aug 6, 2019
Behavior driven design (BDD) example on web applications with cucumber and ruby
View Gemfile
source 'https://rubygems.org'
gem 'capybara'
gem 'cucumber'
gem 'selenium-webdriver'
gem 'site_prism'
gem 'rspec'
gem 'webdrivers'
gem 'ffi'
@SihemBouhenniche
SihemBouhenniche / dummy.feature
Created Aug 6, 2019
Behavior driven design (BDD) example on web applications with cucumber and ruby
View dummy.feature
Feature: Dummy
Scenario: Google search scenario
Given I am on google home page
Then I can type "Usain bolt" in search field
When I click on search button
Then I get "Usain Bolt" in search results