From ac1747b4e01fab443962ee79268946470b91085b Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 28 Jan 2016 15:45:13 -0200 Subject: [PATCH] sub_organizations: fix cucumber/selenium tests --- plugins/sub_organizations/features/sub_organizations_block.feature | 25 ++++++++++--------------- plugins/sub_organizations/features/sub_organizations_display.feature | 8 ++++---- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/plugins/sub_organizations/features/sub_organizations_block.feature b/plugins/sub_organizations/features/sub_organizations_block.feature index 59294ca..0708180 100644 --- a/plugins/sub_organizations/features/sub_organizations_block.feature +++ b/plugins/sub_organizations/features/sub_organizations_block.feature @@ -20,29 +20,24 @@ Feature: related_organizations_block And I am logged in as "homer" And I go to springfield's control panel - Scenario: display sub organizations block add option - When I follow "Edit sideboxes" - And I follow "Add a block" - Then I should see "Related Organizations" - Scenario: display both sub types on block + Given the following blocks + | owner | type | + | springfield | RelatedOrganizationsBlock | When I follow "Edit sideboxes" - And I follow "Add a block" - And I choose "Related Organizations" - And I press "Add" - Then I should see "Moe" within ".related-organizations-block" - And I should see "Duff" within ".related-organizations-block" + Then I should see "Moe" within ".block.related-organizations-block" + And I should see "Duff" within ".block.related-organizations-block" Scenario: display only sub-communities Given the following blocks | owner | type | | springfield | RelatedOrganizationsBlock | When I follow "Edit sideboxes" - And I follow "Edit" within ".related-organizations-block" + And I follow "Edit" within ".block.related-organizations-block" And I select "Community" from "block_organization_type" And I press "Save" - Then I should see "Moe" within ".related-organizations-block" - And I should not see "Duff" within ".related-organizations-block" + Then I should see "Moe" within ".block.related-organizations-block" + And I should not see "Duff" within ".block.related-organizations-block" Scenario: display both sub types on sub-organizations page When I go to springfield's "children" page from "SubOrganizationsPluginProfileController" of "SubOrganizations" plugin @@ -54,9 +49,9 @@ Feature: related_organizations_block | owner | type | | springfield | RelatedOrganizationsBlock | When I follow "Edit sideboxes" - And I follow "Edit" within ".related-organizations-block" + And I follow "Edit" within ".block.related-organizations-block" And I select "Community" from "block_organization_type" And I press "Save" - And I follow "View all" within ".related-organizations-block" + And I follow "View all" within ".block.related-organizations-block" Then I should see "Moe" within ".profile-list" And I should not see "Duff" within ".profile-list" diff --git a/plugins/sub_organizations/features/sub_organizations_display.feature b/plugins/sub_organizations/features/sub_organizations_display.feature index 43257e2..8afe145 100644 --- a/plugins/sub_organizations/features/sub_organizations_display.feature +++ b/plugins/sub_organizations/features/sub_organizations_display.feature @@ -16,12 +16,12 @@ Feature: sub_organizations_display And the following enterprise | identifier | name | owner | description | city | state | | school | School | nelson | School description | Terra do Nunca | Billy Jean | + And the following blocks + | owner | type | + | springfield | RelatedOrganizationsBlock | And I am logged in as "nelson" And I go to springfield's control panel When I follow "Edit sideboxes" - And I follow "Add a block" - And I choose "Related Organizations" - And I press "Add" @selenium Scenario: Display the sub organization block when there is a sub enterprise and communitys @@ -76,6 +76,6 @@ Feature: sub_organizations_display And I should see "Terra do Nunca, Billy Jean" within ".related-organizations-region-name" Scenario: Display message when display full block are empty - Given I follow "View all" within ".related-organizations-block" + Given I follow "View all" within ".block.related-organizations-block" Then I should see "There are no sub-communities yet." And I should see "There are no sub-enterprises yet." -- libgit2 0.21.2