Commit ac1747b4e01fab443962ee79268946470b91085b

Authored by Antonio Terceiro
1 parent 0e51eedb

sub_organizations: fix cucumber/selenium tests

plugins/sub_organizations/features/sub_organizations_block.feature
... ... @@ -20,29 +20,24 @@ Feature: related_organizations_block
20 20 And I am logged in as "homer"
21 21 And I go to springfield's control panel
22 22  
23   - Scenario: display sub organizations block add option
24   - When I follow "Edit sideboxes"
25   - And I follow "Add a block"
26   - Then I should see "Related Organizations"
27   -
28 23 Scenario: display both sub types on block
  24 + Given the following blocks
  25 + | owner | type |
  26 + | springfield | RelatedOrganizationsBlock |
29 27 When I follow "Edit sideboxes"
30   - And I follow "Add a block"
31   - And I choose "Related Organizations"
32   - And I press "Add"
33   - Then I should see "Moe" within ".related-organizations-block"
34   - And I should see "Duff" within ".related-organizations-block"
  28 + Then I should see "Moe" within ".block.related-organizations-block"
  29 + And I should see "Duff" within ".block.related-organizations-block"
35 30  
36 31 Scenario: display only sub-communities
37 32 Given the following blocks
38 33 | owner | type |
39 34 | springfield | RelatedOrganizationsBlock |
40 35 When I follow "Edit sideboxes"
41   - And I follow "Edit" within ".related-organizations-block"
  36 + And I follow "Edit" within ".block.related-organizations-block"
42 37 And I select "Community" from "block_organization_type"
43 38 And I press "Save"
44   - Then I should see "Moe" within ".related-organizations-block"
45   - And I should not see "Duff" within ".related-organizations-block"
  39 + Then I should see "Moe" within ".block.related-organizations-block"
  40 + And I should not see "Duff" within ".block.related-organizations-block"
46 41  
47 42 Scenario: display both sub types on sub-organizations page
48 43 When I go to springfield's "children" page from "SubOrganizationsPluginProfileController" of "SubOrganizations" plugin
... ... @@ -54,9 +49,9 @@ Feature: related_organizations_block
54 49 | owner | type |
55 50 | springfield | RelatedOrganizationsBlock |
56 51 When I follow "Edit sideboxes"
57   - And I follow "Edit" within ".related-organizations-block"
  52 + And I follow "Edit" within ".block.related-organizations-block"
58 53 And I select "Community" from "block_organization_type"
59 54 And I press "Save"
60   - And I follow "View all" within ".related-organizations-block"
  55 + And I follow "View all" within ".block.related-organizations-block"
61 56 Then I should see "Moe" within ".profile-list"
62 57 And I should not see "Duff" within ".profile-list"
... ...
plugins/sub_organizations/features/sub_organizations_display.feature
... ... @@ -16,12 +16,12 @@ Feature: sub_organizations_display
16 16 And the following enterprise
17 17 | identifier | name | owner | description | city | state |
18 18 | school | School | nelson | School description | Terra do Nunca | Billy Jean |
  19 + And the following blocks
  20 + | owner | type |
  21 + | springfield | RelatedOrganizationsBlock |
19 22 And I am logged in as "nelson"
20 23 And I go to springfield's control panel
21 24 When I follow "Edit sideboxes"
22   - And I follow "Add a block"
23   - And I choose "Related Organizations"
24   - And I press "Add"
25 25  
26 26 @selenium
27 27 Scenario: Display the sub organization block when there is a sub enterprise and communitys
... ... @@ -76,6 +76,6 @@ Feature: sub_organizations_display
76 76 And I should see "Terra do Nunca, Billy Jean" within ".related-organizations-region-name"
77 77  
78 78 Scenario: Display message when display full block are empty
79   - Given I follow "View all" within ".related-organizations-block"
  79 + Given I follow "View all" within ".block.related-organizations-block"
80 80 Then I should see "There are no sub-communities yet."
81 81 And I should see "There are no sub-enterprises yet."
... ...