diff options
Diffstat (limited to 'tests/acceptance/features/step_definitions/basic_steps.rb')
-rw-r--r-- | tests/acceptance/features/step_definitions/basic_steps.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/acceptance/features/step_definitions/basic_steps.rb b/tests/acceptance/features/step_definitions/basic_steps.rb new file mode 100644 index 000000000..81ae4cae0 --- /dev/null +++ b/tests/acceptance/features/step_definitions/basic_steps.rb @@ -0,0 +1,25 @@ +Given (/^I am logged in$/) do + + # be sure to use the right browser session + Capybara.session_name = 'test' + + # logout - just to be sure + visit '/index.php?logout=true' + visit '/' + fill_in 'user', with: 'test' + fill_in 'password', with: "test" + click_button 'submit' + + #save_page + page.should have_selector('a#logout') +end + +When (/^I am in the "([^"]*)" app$/) do |app| + visit "/index.php/apps/#{app}" + page.should have_selector('#logout') +end + +When (/^I go to "([^"]*)"$/) do |path| + visit "#{path}" + page.should have_selector('#logout') +end
\ No newline at end of file |