diff --git a/features/edit_environment_templates.feature b/features/edit_environment_templates.feature index 2ecf1ce..56dad69 100644 --- a/features/edit_environment_templates.feature +++ b/features/edit_environment_templates.feature @@ -4,50 +4,46 @@ Feature: edit environment templates Background: Given that the default environment have all profile templates + And I am logged in as admin + And I follow "Administration" + @selenium Scenario: See links to edit all templates - Given I am logged in as admin - When I follow "Administration" - And I follow "Profile templates" - Then I should see "Person template" link - And I should see "Community template" link - And I should see "Enterprise template" link - And I should see "Inactive Enterprise template" link + Given I follow "Profile templates" + Then I should see "Person template" + And I should see "Community template" + And I should see "Enterprise template" + And I should see "Inactive Enterprise template" + @selenium Scenario: Go to control panel of person template - Given I am logged in as admin - When I follow "Administration" - And I follow "Profile templates" + Given I follow "Profile templates" And I follow "Person template" - Then I should be on Person template's control panel + Then I should be on colivre.net_person_template's control panel + @selenium Scenario: Go to control panel of enterprise template - Given I am logged in as admin - When I follow "Administration" - And I follow "Profile templates" + Given I follow "Profile templates" And I follow "Enterprise template" - Then I should be on Enterprise template's control panel + Then I should be on colivre.net_enterprise_template's control panel + @selenium Scenario: Go to control panel of inactive enterprise template - Given I am logged in as admin - When I follow "Administration" - And I follow "Profile templates" - And I follow "Inactive enterprise template" - Then I should be on Inactive Enterprise template's control panel + Given I follow "Profile templates" + And I follow "Inactive Enterprise template" + Then I should be on colivre.net_inactive_enterprise_template's control panel + @selenium Scenario: Go to control panel of community template - Given I am logged in as admin - When I follow "Administration" - And I follow "Profile templates" - And I follow "Community template" - Then I should be on Community template's control panel + Given I follow "Profile templates" + When I follow "Community template" + Then I should be on colivre.net_community_template's control panel + @selenium Scenario: Not see link to edit an unexistent template - Given that the default environment have no Inactive Enterprise template - And I am logged in as admin - When I follow "Administration" - And I follow "Profile templates" - Then I should see "Person template" link - And I should see "Community template" link - And I should see "Enterprise template" link - And I should not see "Inactive enterprise template" link + Given I follow "Profile templates" + And that the default environment have no Inactive Enterprise template + Then I should see "Person template" + And I should see "Community template" + And I should see "Enterprise template" + And I should not see "Inactive enterprise template" diff --git a/features/support/paths.rb b/features/support/paths.rb index a8c483f..309b918 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -46,7 +46,7 @@ module NavigationHelpers '/myprofile/%s/cms/new?type=%s' % [Profile.find_by_name($1).identifier,$2] when /^(.*)'s sitemap/ - '/profile/%s/sitemap' % Profile.find_by_name($1).identifier + '/profile/%s/sitemap' % $1 when /^(.*)'s profile$/ '/profile/' + $1 @@ -82,7 +82,7 @@ module NavigationHelpers '/search/%s' % $1 when /^(.+)'s cms/ - '/myprofile/%s/cms' % Profile.find_by_name($1).identifier + '/myprofile/%s/cms' % $1 when /^"(.+)" edit page/ article = Article.find_by_name($1) -- libgit2 0.21.2