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 | 27 | And I am logged in as "joaosilva" |
28 | 28 | Given I go to joaosilva's control panel |
29 | 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 | 31 | Scenario: the block is being displayed |
35 | 32 | Then I should see "This is the recent content block. Please edit it to show the content you want." |
36 | 33 | |
37 | 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 | 36 | And I select "JSilva blog" from "Choose which blog should be displayed" |
40 | 37 | And I select "Title only" from "Choose how the content should be displayed" |
41 | 38 | And I fill in "Choose how many items will be displayed" with "3" |
42 | 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 | 41 | Then I should be on /joaosilva/jsilva-blog/post-4 |
45 | 42 | |
46 | 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 | 45 | And I select "JSilva blog" from "Choose which blog should be displayed" |
49 | 46 | And I select "Title only" from "Choose how the content should be displayed" |
50 | 47 | And I fill in "Choose how many items will be displayed" with "2" |
... | ... | @@ -53,28 +50,28 @@ Background: |
53 | 50 | Then I should be on /joaosilva/jsilva-blog |
54 | 51 | |
55 | 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 | 54 | And I select "JSilva blog" from "Choose which blog should be displayed" |
58 | 55 | And I select "Title only" from "Choose how the content should be displayed" |
59 | 56 | And I fill in "Choose how many items will be displayed" with "3" |
60 | 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 | 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 | 62 | And I select "JSilva blog" from "Choose which blog should be displayed" |
66 | 63 | And I select "Title and abstract" from "Choose how the content should be displayed" |
67 | 64 | And I fill in "Choose how many items will be displayed" with "6" |
68 | 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 | 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 | 70 | And I select "JSilva blog" from "Choose which blog should be displayed" |
74 | 71 | And I select "Full content" from "Choose how the content should be displayed" |
75 | 72 | And I fill in "Choose how many items will be displayed" with "6" |
76 | 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 | 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 | 77 | @selenium-fixme |
... | ... | @@ -85,7 +82,7 @@ Background: |
85 | 82 | And I press "Save" |
86 | 83 | When I go to joaosilva's control panel |
87 | 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 | 86 | And I select "JSilva blog" from "Choose which blog should be displayed" |
90 | 87 | And I select "Title only" from "Choose how the content should be displayed" |
91 | 88 | And I fill in "Choose how many items will be displayed" with "3" | ... | ... |