Commit 41a160222d43c972b8bd0f4a005146bc0e05daaf
Committed by
Paulo Meireles
1 parent
18815182
Exists in
master
and in
29 other branches
[Mezuro] Started to make reading group feature
Showing
3 changed files
with
28 additions
and
2 deletions
Show diff stats
features/step_definitions/mezuro_steps.rb
1 | -When /^I create a Mezuro (project|configuration) with the following data$/ do |type, fields| | 1 | +When /^I create a Mezuro (project|configuration|reading group) with the following data$/ do |type, fields| |
2 | click_link ("Mezuro " + type) | 2 | click_link ("Mezuro " + type) |
3 | 3 | ||
4 | fields.rows_hash.each do |name, value| | 4 | fields.rows_hash.each do |name, value| |
@@ -0,0 +1,26 @@ | @@ -0,0 +1,26 @@ | ||
1 | +Feature: Reading Group | ||
2 | + As a mezuro user | ||
3 | + I want to create, edit and remove a Mezuro reading group | ||
4 | + | ||
5 | + Background: | ||
6 | + Given the following users | ||
7 | + | login | name | | ||
8 | + | joaosilva | Joao Silva | | ||
9 | + Given I am logged in as "joaosilva" | ||
10 | + And "Mezuro" plugin is enabled | ||
11 | + | ||
12 | + Scenario: I see Mezuro reading group's input form | ||
13 | + When I follow "Mezuro reading group" | ||
14 | + Then I should see "Title" | ||
15 | + And I should see "Description" | ||
16 | + | ||
17 | + @selenium | ||
18 | + Scenario: I create a Mezuro reading group with valid attributes | ||
19 | + Given I am on joaosilva's control panel | ||
20 | + When I create a Mezuro reading group with the following data | ||
21 | + | Title | Sample Reading Group | | ||
22 | + | Description | Sample Description | | ||
23 | + Then I should see "Sample Reading Group" | ||
24 | + And I should see "Sample Description" | ||
25 | + And I should see "Readings" | ||
26 | + And I should see "Add Reading" |
plugins/mezuro/lib/mezuro_plugin.rb
@@ -28,7 +28,7 @@ class MezuroPlugin < Noosfero::Plugin | @@ -28,7 +28,7 @@ class MezuroPlugin < Noosfero::Plugin | ||
28 | {:title => _('Mezuro project'), :url => {:controller => 'cms', :action => 'new', :profile => context.profile.identifier, :type => 'MezuroPlugin::ProjectContent'}, :icon => 'mezuro' } | 28 | {:title => _('Mezuro project'), :url => {:controller => 'cms', :action => 'new', :profile => context.profile.identifier, :type => 'MezuroPlugin::ProjectContent'}, :icon => 'mezuro' } |
29 | else | 29 | else |
30 | [{:title => _('Mezuro configuration'), :url => {:controller => 'cms', :action => 'new', :profile => context.profile.identifier, :type => 'MezuroPlugin::ConfigurationContent'}, :icon => 'mezuro' }, | 30 | [{:title => _('Mezuro configuration'), :url => {:controller => 'cms', :action => 'new', :profile => context.profile.identifier, :type => 'MezuroPlugin::ConfigurationContent'}, :icon => 'mezuro' }, |
31 | - {:title => _('Mezuro Reading Group'), :url => {:controller => 'cms', :action => 'new', :profile => context.profile.identifier, :type => 'MezuroPlugin::ReadingGroupContent'}, :icon => 'mezuro' }] | 31 | + {:title => _('Mezuro reading group'), :url => {:controller => 'cms', :action => 'new', :profile => context.profile.identifier, :type => 'MezuroPlugin::ReadingGroupContent'}, :icon => 'mezuro' }] |
32 | end | 32 | end |
33 | end | 33 | end |
34 | 34 |