Commit 24d5f1189dd4d82951c67c801884f9bcd447f98a
1 parent
4868a1bc
Exists in
colab
and in
4 other branches
Fixed back behaviour for new NativeMetric
Showing
5 changed files
with
24 additions
and
7 deletions
Show diff stats
app/views/metric_configurations/_form.html.erb
app/views/metric_configurations/edit.html.erb
... | ... | @@ -4,4 +4,5 @@ |
4 | 4 | |
5 | 5 | <%= form_for(@metric_configuration, :url => mezuro_configuration_metric_configuration_update_url(@mezuro_configuration_id, @metric_configuration.id), method: :put) do |f| %> |
6 | 6 | <%= render partial: 'form', locals: {f: f} %> |
7 | + <%= link_to 'Back', mezuro_configuration_path(@metric_configuration.configuration_id), class: 'btn btn-default' %> | |
7 | 8 | <% end %> | ... | ... |
app/views/metric_configurations/new.html.erb
... | ... | @@ -23,4 +23,5 @@ |
23 | 23 | |
24 | 24 | <%= form_for(@metric_configuration, :url => mezuro_configuration_metric_configurations_path(@metric_configuration.configuration_id)) do |f| %> |
25 | 25 | <%= render partial: 'form', locals: {f: f} %> |
26 | + <%= link_to 'Back', mezuro_configuration_choose_metric_path(@metric_configuration.configuration_id), class: 'btn btn-default' %> | |
26 | 27 | <% end %> | ... | ... |
features/metric_configuration/create.feature
... | ... | @@ -26,4 +26,17 @@ Feature: Metric Configuration Creation |
26 | 26 | When I press the Save button |
27 | 27 | Then I should see "My Code" |
28 | 28 | Then I should see "Total Lines of Code" |
29 | - Then I should see "2" | |
30 | 29 | \ No newline at end of file |
30 | + Then I should see "2" | |
31 | + | |
32 | + @kalibro_restart @javascript | |
33 | + Scenario: metric configuration creation | |
34 | + Given I am a regular user | |
35 | + And I am signed in | |
36 | + And I own a sample configuration | |
37 | + And I have a reading group named "Scholar" | |
38 | + And I am at the Sample Configuration page | |
39 | + And I click the Add Metric link | |
40 | + And I click the "Analizo" h3 | |
41 | + And I click the Total Lines of Code link | |
42 | + When I click the Back link | |
43 | + Then I should be at the choose metric page | |
31 | 44 | \ No newline at end of file | ... | ... |
features/step_definitions/metric_configuration_steps.rb
... | ... | @@ -16,6 +16,10 @@ When(/^I visit the sample metric configuration page$/) do |
16 | 16 | visit mezuro_configuration_metric_configuration_path(@metric_configuration.configuration_id, @metric_configuration.id) |
17 | 17 | end |
18 | 18 | |
19 | +When(/^I visit the sample metric configuration page$/) do | |
20 | + visit edit_mezuro_configuration_path(@mezuro_configuration.id) | |
21 | +end | |
22 | + | |
19 | 23 | Then(/^I am at the sample metric configuration page$/) do |
20 | 24 | visit mezuro_configuration_metric_configuration_path(@metric_configuration.configuration_id, @metric_configuration.id) |
21 | 25 | page.should have_content(@metric_configuration.metric.name) |
... | ... | @@ -28,12 +32,11 @@ Then(/^I should see the sample metric configuration content$/) do |
28 | 32 | page.should have_content(@metric_configuration.weight) |
29 | 33 | end |
30 | 34 | |
31 | -When(/^I visit the sample metric configuration page$/) do | |
32 | - visit edit_mezuro_configuration_path(@mezuro_configuration.id) | |
33 | -end | |
34 | - | |
35 | - | |
36 | 35 | Then(/^I should be at metric configuration sample page$/) do |
37 | 36 | page.should have_content(@metric_configuration.metric.name) |
38 | 37 | page.should have_content("Ranges") |
39 | 38 | end |
39 | + | |
40 | +Then(/^I should be at the choose metric page$/) do | |
41 | + page.should have_content("Choose a metric from a base tool:") | |
42 | +end | ... | ... |