Commit ceabbcd089f4712ea04360000cc6fe58db66640c
1 parent
f1e3ef5c
Exists in
master
and in
28 other branches
forum.feature
Showing
2 changed files
with
17 additions
and
12 deletions
Show diff stats
features/forum.feature
... | ... | @@ -10,18 +10,18 @@ Feature: forum |
10 | 10 | And "joaosilva" has no articles |
11 | 11 | And I am logged in as "joaosilva" |
12 | 12 | |
13 | - @selenium | |
13 | + @selenium @ignore-hidden-elements | |
14 | 14 | Scenario: create a forum |
15 | - Given I am on Joao Silva's control panel | |
15 | + Given I am on joaosilva's control panel | |
16 | 16 | And I follow "Manage Content" |
17 | 17 | And I follow "New content" |
18 | - When I follow "Forum" and wait | |
18 | + When I follow "Forum" | |
19 | 19 | And I fill in "Title" with "My Forum" |
20 | - And I press "Save" and wait | |
20 | + And I press "Save" | |
21 | 21 | Then I should see "Configure forum" |
22 | 22 | |
23 | 23 | Scenario: redirect to forum after create forum from cms |
24 | - Given I go to the Control panel | |
24 | + Given I go to joaosilva's control panel | |
25 | 25 | And I follow "Manage Content" |
26 | 26 | And I follow "New content" |
27 | 27 | When I follow "Forum" |
... | ... | @@ -30,13 +30,13 @@ Feature: forum |
30 | 30 | Then I should be on /joaosilva/forum-from-cms |
31 | 31 | |
32 | 32 | Scenario: create multiple forums |
33 | - Given I go to the Control panel | |
33 | + Given I go to joaosilva's control panel | |
34 | 34 | And I follow "Manage Content" |
35 | 35 | And I follow "New content" |
36 | 36 | And I follow "Forum" |
37 | 37 | And I fill in "Title" with "Forum One" |
38 | 38 | And I press "Save" |
39 | - Then I go to the Control panel | |
39 | + Then I go to joaosilva's control panel | |
40 | 40 | And I follow "Manage Content" |
41 | 41 | And I follow "New content" |
42 | 42 | And I follow "Forum" |
... | ... | @@ -46,7 +46,7 @@ Feature: forum |
46 | 46 | And I should be on /joaosilva/forum-two |
47 | 47 | |
48 | 48 | Scenario: cancel button back to cms |
49 | - Given I go to the Control panel | |
49 | + Given I go to joaosilva's control panel | |
50 | 50 | And I follow "Manage Content" |
51 | 51 | And I follow "New content" |
52 | 52 | And I follow "Forum" |
... | ... | @@ -54,7 +54,7 @@ Feature: forum |
54 | 54 | Then I should be on /myprofile/joaosilva/cms |
55 | 55 | |
56 | 56 | Scenario: cancel button back to myprofile |
57 | - Given I go to the Control panel | |
57 | + Given I go to joaosilva's control panel | |
58 | 58 | And I follow "Manage Content" |
59 | 59 | And I follow "New content" |
60 | 60 | And I follow "Forum" |
... | ... | @@ -66,8 +66,8 @@ Feature: forum |
66 | 66 | Given the following forums |
67 | 67 | | owner | name | |
68 | 68 | | joaosilva | Forum One | |
69 | - And I visit "/joaosilva/forum-one" and wait | |
70 | - When I follow "Configure forum" and wait | |
69 | + And I go to /joaosilva/forum-one | |
70 | + When I follow "Configure forum" | |
71 | 71 | Then I should be on edit "Forum One" by joaosilva |
72 | 72 | |
73 | 73 | Scenario: last topic update by unautenticated user should not link |
... | ... | @@ -94,4 +94,4 @@ Feature: forum |
94 | 94 | | article | author | title | body | |
95 | 95 | | Post one | joaosilva | Hi all | Hi all | |
96 | 96 | When I go to /joaosilva/forum |
97 | - Then I should see "Joao" linking to "http:///joaosilva" | |
97 | + Then I should see "Joao" linking to "http://localhost/joaosilva" | ... | ... |
features/step_definitions/custom_web_steps.rb
... | ... | @@ -12,6 +12,11 @@ Then /^I should not see "([^"]*)" link$/ do |text| |
12 | 12 | page.should have_no_css('a', :text => text) |
13 | 13 | end |
14 | 14 | |
15 | +When /^I should see "([^\"]+)" linking to "([^\"]+)"$/ do |text, href| | |
16 | + page.should have_selector("a:contains('#{text}')") | |
17 | + page.should have_selector("a[href='#{href}']") | |
18 | +end | |
19 | + | |
15 | 20 | When /^I reload and wait for the page$/ do |
16 | 21 | raise "Why why need this? Remove!" |
17 | 22 | visit page.driver.browser.current_url | ... | ... |