From e52e9332df64319b4e892b32e9cfcd4d243e18ef Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 7 May 2013 13:06:39 +0200 Subject: added first cucumber steps and definitions --- tests/acceptance/features/create_new.feature | 13 +++++++++++++ .../features/step_definitions/create_new_steps.rb | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/acceptance/features/create_new.feature create mode 100644 tests/acceptance/features/step_definitions/create_new_steps.rb (limited to 'tests') diff --git a/tests/acceptance/features/create_new.feature b/tests/acceptance/features/create_new.feature new file mode 100644 index 000000000..c07220059 --- /dev/null +++ b/tests/acceptance/features/create_new.feature @@ -0,0 +1,13 @@ +# encoding: utf-8 +Feature: create_new + In order to start using the news rss reader + As a user + I want to be able to add feeds and folders + + Background: + Given I am logged in + And I am in the "news" app + + Scenario Outline: show caption on hover + When I hover over the add new button + Then I should see a "Add Website" caption on the add new button \ No newline at end of file diff --git a/tests/acceptance/features/step_definitions/create_new_steps.rb b/tests/acceptance/features/step_definitions/create_new_steps.rb new file mode 100644 index 000000000..337779d54 --- /dev/null +++ b/tests/acceptance/features/step_definitions/create_new_steps.rb @@ -0,0 +1,7 @@ +When (/^I hover over the add new button$/) do |selector| + page.execute_script("$('.add-new').trigger('mouseover')") +end + +Then (/^I should see a "([^"]*)" caption on the add new button"$/) do |caption| + page.find(:xpath, "//*[@class='add-new']/a/span").should have_content(caption) +end \ No newline at end of file -- cgit v1.2.3