[Git][noosfero/noosfero][master] recent-content-block: Fixes cucumber tests

Larissa Reis gitlab at mg.gitlab.com
Mon Jan 25 15:48:39 BRST 2016


Larissa Reis pushed to branch master at Noosfero / noosfero


Commits:
04723e67 by Larissa Reis at 2016-01-25T14:47:28-03:00
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.

- - - - -


1 changed file:

- plugins/recent_content/features/add_recent_content.feature


Changes:

=====================================
plugins/recent_content/features/add_recent_content.feature
=====================================
--- a/plugins/recent_content/features/add_recent_content.feature
+++ b/plugins/recent_content/features/add_recent_content.feature
@@ -27,24 +27,21 @@ Background:
   And I am logged in as "joaosilva"
     Given I go to joaosilva's control panel
     And I follow "Edit sideboxes"
-    And I follow "Add a block"
-    And I choose "Recent content"
-    And I press "Add"
 
   Scenario: the block is being displayed
     Then I should see "This is the recent content block. Please edit it to show the content you want."
 
   Scenario: a user should be redirected to the post page when the link is clicked
-    When I follow "Edit" within ".recent-content-block"
+    When I follow "Edit" within ".block.recent-content-block"
     And I select "JSilva blog" from "Choose which blog should be displayed"
     And I select "Title only" from "Choose how the content should be displayed"
     And I fill in "Choose how many items will be displayed" with "3"
     And I press "Save"
-    And I follow "post #4" within ".recent-content-block"
+    And I follow "post #4" within ".block.recent-content-block"
     Then I should be on /joaosilva/jsilva-blog/post-4
 
   Scenario: a user should be redirected to the blog page when the "view all" is clicked
-    When I follow "Edit" within ".recent-content-block"
+    When I follow "Edit" within ".block.recent-content-block"
     And I select "JSilva blog" from "Choose which blog should be displayed"
     And I select "Title only" from "Choose how the content should be displayed"
     And I fill in "Choose how many items will be displayed" with "2"
@@ -53,28 +50,28 @@ Background:
     Then I should be on /joaosilva/jsilva-blog
 
   Scenario: a user should see only titles if the block was configured for it
-    When I follow "Edit" within ".recent-content-block"
+    When I follow "Edit" within ".block.recent-content-block"
     And I select "JSilva blog" from "Choose which blog should be displayed"
     And I select "Title only" from "Choose how the content should be displayed"
     And I fill in "Choose how many items will be displayed" with "3"
     And I press "Save"
-    Then I should see "post #6" within ".recent-content-block"
+    Then I should see "post #6" within ".block.recent-content-block"
 
   Scenario: a user should see titles and abstract if the block was configured for it
-    When I follow "Edit" within ".recent-content-block"
+    When I follow "Edit" within ".block.recent-content-block"
     And I select "JSilva blog" from "Choose which blog should be displayed"
     And I select "Title and abstract" from "Choose how the content should be displayed"
     And I fill in "Choose how many items will be displayed" with "6"
     And I press "Save"
-    Then I should see "Resumo 5" within ".recent-content-block"
+    Then I should see "Resumo 5" within ".block.recent-content-block"
 
   Scenario: a user should see full content if the block was configured for it
-    When I follow "Edit" within ".recent-content-block"
+    When I follow "Edit" within ".block.recent-content-block"
     And I select "JSilva blog" from "Choose which blog should be displayed"
     And I select "Full content" from "Choose how the content should be displayed"
     And I fill in "Choose how many items will be displayed" with "6"
     And I press "Save"
-    Then I should see "Quinto post do joao silva" within ".recent-content-block"
+    Then I should see "Quinto post do joao silva" within ".block.recent-content-block"
 
   # the step for attaching a file on the input only works with capybara 1.1.2, but it requires rails 1.9.3
   @selenium-fixme
@@ -85,7 +82,7 @@ Background:
     And I press "Save"
     When I go to joaosilva's control panel
     And I follow "Edit sideboxes"
-    And I follow "Edit" within ".recent-content-block"
+    And I follow "Edit" within ".block.recent-content-block"
     And I select "JSilva blog" from "Choose which blog should be displayed"
     And I select "Title only" from "Choose how the content should be displayed"
     And I fill in "Choose how many items will be displayed" with "3"



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/04723e67adfb2e174dad6572c204ab1558068849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160125/35ccd43c/attachment-0001.html>


More information about the Noosfero-dev mailing list