summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-05-10 10:58:14 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-05-10 10:58:14 +0200
commitc487bfe23312a5b266d8eb21a3825ab791a1c3e8 (patch)
tree9751e984fb774179c4c0ed53d90cfefa585d6f3c /tests
parent019b286b8e997bea3fb6a0555c91c565ca2d684f (diff)
fixed acceptance tests
Diffstat (limited to 'tests')
-rw-r--r--tests/acceptance/features/create_new.feature12
-rw-r--r--tests/acceptance/features/step_definitions/create_new_steps.rb4
-rw-r--r--tests/acceptance/features/support/env.rb2
3 files changed, 11 insertions, 7 deletions
diff --git a/tests/acceptance/features/create_new.feature b/tests/acceptance/features/create_new.feature
index 923778639..9e5d9708f 100644
--- a/tests/acceptance/features/create_new.feature
+++ b/tests/acceptance/features/create_new.feature
@@ -8,18 +8,20 @@ Feature: create_new
Given I am logged in
And I am in the "news" app
+ Scenario: default state when opening page
+ When I look at the add new button
+ Then I should not see a caption on the add new button
+ And I should not see a form to add feeds and folders
+
Scenario: show caption on hover
- Given I should not see an "Add Website" caption on the add new button
When I hover over the add new button
- Then I should see an "Add Website" caption on the add new button
+ Then I should see a "Add Website" caption on the add new button
Scenario: show add website dialogue
- Given I should not see a form to add feeds and folders
When I click on the add new button
Then I should see a form to add feeds and folders
Scenario: hide add website dialogue when clicking somewhere else
- Given I should not see a form to add feeds and folders
- And I click on the add new button
+ Given I click on the add new button
When I click somewhere else
Then I should not see a form to add feeds and folders \ 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
index 80ef45290..5b1d761e2 100644
--- a/tests/acceptance/features/step_definitions/create_new_steps.rb
+++ b/tests/acceptance/features/step_definitions/create_new_steps.rb
@@ -3,6 +3,8 @@ def turn_off_animations
page.execute_script("$.fx.off=true")
end
+When (/^I look at the add new button$/) do
+end
When (/^I hover over the add new button$/) do
# FIXME: get this working with hover action
@@ -14,7 +16,7 @@ When (/^I hover out off the add new button$/) do
page.execute_script("$('.list-title span').hide()")
end
-Then (/^I should (not )?see an "([^"]+)" caption on the add new button$/) do |shouldNot, caption|
+Then (/^I should (not )?see a (?:"([^"]+)" )?caption on the add new button$/) do |shouldNot, caption|
selector = "//li[contains(@class,\"add-new\")]/a/span[1]"
if shouldNot
page.should have_no_selector(:xpath, selector)
diff --git a/tests/acceptance/features/support/env.rb b/tests/acceptance/features/support/env.rb
index cef0d2d92..91af642bf 100644
--- a/tests/acceptance/features/support/env.rb
+++ b/tests/acceptance/features/support/env.rb
@@ -25,4 +25,4 @@ Capybara.default_selector = :css
Capybara.default_driver = :selenium
# serve static files
-run Rack::Directory.new Dir.pwd.concat('./static') \ No newline at end of file
+#run Rack::Directory.new Dir.pwd.concat('./static') \ No newline at end of file