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,29 +20,24 @@ Feature: related_organizations_block
20 And I am logged in as "homer" 20 And I am logged in as "homer"
21 And I go to springfield's control panel 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 Scenario: display both sub types on block 23 Scenario: display both sub types on block
  24 + Given the following blocks
  25 + | owner | type |
  26 + | springfield | RelatedOrganizationsBlock |
29 When I follow "Edit sideboxes" 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 Scenario: display only sub-communities 31 Scenario: display only sub-communities
37 Given the following blocks 32 Given the following blocks
38 | owner | type | 33 | owner | type |
39 | springfield | RelatedOrganizationsBlock | 34 | springfield | RelatedOrganizationsBlock |
40 When I follow "Edit sideboxes" 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 And I select "Community" from "block_organization_type" 37 And I select "Community" from "block_organization_type"
43 And I press "Save" 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 Scenario: display both sub types on sub-organizations page 42 Scenario: display both sub types on sub-organizations page
48 When I go to springfield's "children" page from "SubOrganizationsPluginProfileController" of "SubOrganizations" plugin 43 When I go to springfield's "children" page from "SubOrganizationsPluginProfileController" of "SubOrganizations" plugin
@@ -54,9 +49,9 @@ Feature: related_organizations_block @@ -54,9 +49,9 @@ Feature: related_organizations_block
54 | owner | type | 49 | owner | type |
55 | springfield | RelatedOrganizationsBlock | 50 | springfield | RelatedOrganizationsBlock |
56 When I follow "Edit sideboxes" 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 And I select "Community" from "block_organization_type" 53 And I select "Community" from "block_organization_type"
59 And I press "Save" 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 Then I should see "Moe" within ".profile-list" 56 Then I should see "Moe" within ".profile-list"
62 And I should not see "Duff" within ".profile-list" 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,12 +16,12 @@ Feature: sub_organizations_display
16 And the following enterprise 16 And the following enterprise
17 | identifier | name | owner | description | city | state | 17 | identifier | name | owner | description | city | state |
18 | school | School | nelson | School description | Terra do Nunca | Billy Jean | 18 | school | School | nelson | School description | Terra do Nunca | Billy Jean |
  19 + And the following blocks
  20 + | owner | type |
  21 + | springfield | RelatedOrganizationsBlock |
19 And I am logged in as "nelson" 22 And I am logged in as "nelson"
20 And I go to springfield's control panel 23 And I go to springfield's control panel
21 When I follow "Edit sideboxes" 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 @selenium 26 @selenium
27 Scenario: Display the sub organization block when there is a sub enterprise and communitys 27 Scenario: Display the sub organization block when there is a sub enterprise and communitys
@@ -76,6 +76,6 @@ Feature: sub_organizations_display @@ -76,6 +76,6 @@ Feature: sub_organizations_display
76 And I should see "Terra do Nunca, Billy Jean" within ".related-organizations-region-name" 76 And I should see "Terra do Nunca, Billy Jean" within ".related-organizations-region-name"
77 77
78 Scenario: Display message when display full block are empty 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 Then I should see "There are no sub-communities yet." 80 Then I should see "There are no sub-communities yet."
81 And I should see "There are no sub-enterprises yet." 81 And I should see "There are no sub-enterprises yet."