Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Starting to create cucumber features

  • Loading branch information...
commit 257ac2e26e6fb48800bd88e7bba7adc794ebc7a5 1 parent 7e8e8c0
@mikeymckay authored
View
9 features/login.feature
@@ -0,0 +1,9 @@
+Feature: Signing in
+ In order to securely access the system's features
+ Users should have to sign in with a user name and password
+
+ Scenario: View login page
+ Given I am on the login page
+# Then dump the page
+# Then lynxdump the page
+ Then I should see "Enter user name"
View
13 features/step_definitions/debug_steps.rb
@@ -0,0 +1,13 @@
+
+Given /^(?:|I )wait (\d+) seconds*$/ do |seconds|
+ sleep(seconds.to_i)
+end
+
+Then /^dump the page$/ do
+ puts body
+end
+
+# Doesn't work
+Then /^lynxdump the page$/ do
+ puts `echo #{body} | lynx -stdin -dump`
+end
View
3  features/support/env_extensions.rb
@@ -0,0 +1,3 @@
+require 'capybara/envjs'
+
+Capybara.default_driver = :selenium
View
63 features/test.feature
@@ -0,0 +1,63 @@
+Feature: Signing in
+ In order to securely access the system's features
+ Users should have to sign in with a user name and password
+
+ Scenario: View login page
+ Given I am on the login page
+# Then dump the page
+# Then lynxdump the page
+ And I fill in "Enter user name" with "mikmck"
+ And I press "Next"
+ And I fill in "Enter password" with "mike"
+ And I press "Finish"
+ And I fill in "Workstation location" with "7"
+ And I press "Finish"
+ And I press "Find Name"
+ And I fill in "First name" with "Mike"
+ And I press "Next"
+ And I fill in "Last name" with "McKay"
+ And I press "Next"
+ And I fill in "Gender" with "Male"
+ And I press "Finish"
+# Create a new person...
+# And I press "Finish"
+ And I fill in "Year of Birth" with "1977"
+ And I press "Next"
+ And I choose "Aug"
+ And I press "Next"
+ And I fill in "Birth Day" with "17"
+ And I press "Next"
+ And I fill in "Current Traditional Authority (TA)" with "Kauma"
+ And I press "Next"
+ And I fill in "Current Village" with "Area 43"
+ And I press "Next"
+ And I fill in "Cellphone Number" with "0999322252"
+ And I press "Finish"
+
+ And I press "Tasks"
+ And I choose "Hiv reception"
+ And I press "Finish"
+ And I press "New Relationship"
+ And I press "Find Name"
+ And I fill in "First name" with "Claudia"
+ And I press "Next"
+ And I fill in "Last name" with "McKay"
+ And I press "Next"
+ And I fill in "Gender" with "Female"
+ And I press "Finish"
+# Create a new person...
+ And I press "Finish"
+ And I fill in "Year of Birth" with "1977"
+ And I press "Next"
+ And I choose "Aug"
+ And I press "Next"
+ And I fill in "Birth Day" with "17"
+ And I press "Next"
+ And I fill in "Current Traditional Authority (TA)" with "Kauma"
+ And I press "Next"
+ And I fill in "Current Village" with "Area 43"
+ And I press "Next"
+ And I fill in "Cellphone Number" with "0999322252"
+ And I press "Finish"
+ And I fill in "How is Claudia McKay related to the patient" with "Guardian"
+ And I press "Finish"
Please sign in to comment.
Something went wrong with that request. Please try again.