Commit 04723e67adfb2e174dad6572c204ab1558068849
1 parent
f9cf8cb6
Exists in
staging
and in
37 other branches
recent-content-block: Fixes cucumber tests
- We don't need to test drag and drop to add blocks here, so I just assume the block is already added. - Fixes the class to search for the Edit button, since recent-content-block class is being used in more than one place now.
Showing
1 changed file
with
10 additions
and
13 deletions
Show diff stats
plugins/recent_content/features/add_recent_content.feature
@@ -27,24 +27,21 @@ Background: | @@ -27,24 +27,21 @@ Background: | ||
27 | And I am logged in as "joaosilva" | 27 | And I am logged in as "joaosilva" |
28 | Given I go to joaosilva's control panel | 28 | Given I go to joaosilva's control panel |
29 | And I follow "Edit sideboxes" | 29 | And I follow "Edit sideboxes" |
30 | - And I follow "Add a block" | ||
31 | - And I choose "Recent content" | ||
32 | - And I press "Add" | ||
33 | 30 | ||
34 | Scenario: the block is being displayed | 31 | Scenario: the block is being displayed |
35 | Then I should see "This is the recent content block. Please edit it to show the content you want." | 32 | Then I should see "This is the recent content block. Please edit it to show the content you want." |
36 | 33 | ||
37 | Scenario: a user should be redirected to the post page when the link is clicked | 34 | Scenario: a user should be redirected to the post page when the link is clicked |
38 | - When I follow "Edit" within ".recent-content-block" | 35 | + When I follow "Edit" within ".block.recent-content-block" |
39 | And I select "JSilva blog" from "Choose which blog should be displayed" | 36 | And I select "JSilva blog" from "Choose which blog should be displayed" |
40 | And I select "Title only" from "Choose how the content should be displayed" | 37 | And I select "Title only" from "Choose how the content should be displayed" |
41 | And I fill in "Choose how many items will be displayed" with "3" | 38 | And I fill in "Choose how many items will be displayed" with "3" |
42 | And I press "Save" | 39 | And I press "Save" |
43 | - And I follow "post #4" within ".recent-content-block" | 40 | + And I follow "post #4" within ".block.recent-content-block" |
44 | Then I should be on /joaosilva/jsilva-blog/post-4 | 41 | Then I should be on /joaosilva/jsilva-blog/post-4 |
45 | 42 | ||
46 | Scenario: a user should be redirected to the blog page when the "view all" is clicked | 43 | Scenario: a user should be redirected to the blog page when the "view all" is clicked |
47 | - When I follow "Edit" within ".recent-content-block" | 44 | + When I follow "Edit" within ".block.recent-content-block" |
48 | And I select "JSilva blog" from "Choose which blog should be displayed" | 45 | And I select "JSilva blog" from "Choose which blog should be displayed" |
49 | And I select "Title only" from "Choose how the content should be displayed" | 46 | And I select "Title only" from "Choose how the content should be displayed" |
50 | And I fill in "Choose how many items will be displayed" with "2" | 47 | And I fill in "Choose how many items will be displayed" with "2" |
@@ -53,28 +50,28 @@ Background: | @@ -53,28 +50,28 @@ Background: | ||
53 | Then I should be on /joaosilva/jsilva-blog | 50 | Then I should be on /joaosilva/jsilva-blog |
54 | 51 | ||
55 | Scenario: a user should see only titles if the block was configured for it | 52 | Scenario: a user should see only titles if the block was configured for it |
56 | - When I follow "Edit" within ".recent-content-block" | 53 | + When I follow "Edit" within ".block.recent-content-block" |
57 | And I select "JSilva blog" from "Choose which blog should be displayed" | 54 | And I select "JSilva blog" from "Choose which blog should be displayed" |
58 | And I select "Title only" from "Choose how the content should be displayed" | 55 | And I select "Title only" from "Choose how the content should be displayed" |
59 | And I fill in "Choose how many items will be displayed" with "3" | 56 | And I fill in "Choose how many items will be displayed" with "3" |
60 | And I press "Save" | 57 | And I press "Save" |
61 | - Then I should see "post #6" within ".recent-content-block" | 58 | + Then I should see "post #6" within ".block.recent-content-block" |
62 | 59 | ||
63 | Scenario: a user should see titles and abstract if the block was configured for it | 60 | Scenario: a user should see titles and abstract if the block was configured for it |
64 | - When I follow "Edit" within ".recent-content-block" | 61 | + When I follow "Edit" within ".block.recent-content-block" |
65 | And I select "JSilva blog" from "Choose which blog should be displayed" | 62 | And I select "JSilva blog" from "Choose which blog should be displayed" |
66 | And I select "Title and abstract" from "Choose how the content should be displayed" | 63 | And I select "Title and abstract" from "Choose how the content should be displayed" |
67 | And I fill in "Choose how many items will be displayed" with "6" | 64 | And I fill in "Choose how many items will be displayed" with "6" |
68 | And I press "Save" | 65 | And I press "Save" |
69 | - Then I should see "Resumo 5" within ".recent-content-block" | 66 | + Then I should see "Resumo 5" within ".block.recent-content-block" |
70 | 67 | ||
71 | Scenario: a user should see full content if the block was configured for it | 68 | Scenario: a user should see full content if the block was configured for it |
72 | - When I follow "Edit" within ".recent-content-block" | 69 | + When I follow "Edit" within ".block.recent-content-block" |
73 | And I select "JSilva blog" from "Choose which blog should be displayed" | 70 | And I select "JSilva blog" from "Choose which blog should be displayed" |
74 | And I select "Full content" from "Choose how the content should be displayed" | 71 | And I select "Full content" from "Choose how the content should be displayed" |
75 | And I fill in "Choose how many items will be displayed" with "6" | 72 | And I fill in "Choose how many items will be displayed" with "6" |
76 | And I press "Save" | 73 | And I press "Save" |
77 | - Then I should see "Quinto post do joao silva" within ".recent-content-block" | 74 | + Then I should see "Quinto post do joao silva" within ".block.recent-content-block" |
78 | 75 | ||
79 | # the step for attaching a file on the input only works with capybara 1.1.2, but it requires rails 1.9.3 | 76 | # the step for attaching a file on the input only works with capybara 1.1.2, but it requires rails 1.9.3 |
80 | @selenium-fixme | 77 | @selenium-fixme |
@@ -85,7 +82,7 @@ Background: | @@ -85,7 +82,7 @@ Background: | ||
85 | And I press "Save" | 82 | And I press "Save" |
86 | When I go to joaosilva's control panel | 83 | When I go to joaosilva's control panel |
87 | And I follow "Edit sideboxes" | 84 | And I follow "Edit sideboxes" |
88 | - And I follow "Edit" within ".recent-content-block" | 85 | + And I follow "Edit" within ".block.recent-content-block" |
89 | And I select "JSilva blog" from "Choose which blog should be displayed" | 86 | And I select "JSilva blog" from "Choose which blog should be displayed" |
90 | And I select "Title only" from "Choose how the content should be displayed" | 87 | And I select "Title only" from "Choose how the content should be displayed" |
91 | And I fill in "Choose how many items will be displayed" with "3" | 88 | And I fill in "Choose how many items will be displayed" with "3" |