Commit b90ea37e3f13c099209a35f3dae0c1a68023cbae

Authored by Diego Araújo
1 parent 1e6f524d
Exists in colab and in 2 other branches master, stable

Include notify push url on Repository#show view

Signed-off-by: Heitor Reis <marcheing@gmail.com>
app/views/repositories/show.html.erb
... ... @@ -37,6 +37,13 @@
37 37 <%= @kalibro_configuration.name %>
38 38 </p>
39 39  
  40 +<% if repository_owner? @repository.id %>
  41 + <p>
  42 + <strong><%= t('repository.show.notify_push_url') %>:</strong>
  43 + <%= repository_notify_push_url(@repository.id) %>
  44 + </p>
  45 +<% end %>
  46 +
40 47 <p><strong> <%= t('repository.show.date_processing') %>: </strong></p>
41 48  
42 49 <%= form_tag(repository_state_with_date_path(@repository.id), method: "get", remote: true) do %>
... ...
config/locales/views/repository/en.yml
... ... @@ -38,3 +38,4 @@ en:
38 38 metric_results: "Tree Metric Results"
39 39 loading: "Loading data. Please, wait."
40 40 date_processing: "Retrieve the closest processing information from"
  41 + notify_push_url: 'Notify Push Url for Gitlab'
... ...
config/locales/views/repository/pt.yml
... ... @@ -38,3 +38,4 @@ pt:
38 38 metric_results: "Resultados de Métrica"
39 39 loading: "Carregando os dados. Por favor, aguarde."
40 40 date_processing: "Obtenha a informação de processamento mais próxima a"
  41 + notify_push_url: 'Url para notificações do Gitlab'
... ...
features/repository/show/repository_info.feature
... ... @@ -19,6 +19,7 @@ Feature: Show Repository
19 19 And I should see "Description"
20 20 And I should see "License"
21 21 And I should see the given repository's content
  22 + And I should not see "Notify Push Url for Gitlab"
22 23  
23 24 @kalibro_configuration_restart @kalibro_processor_restart @javascript
24 25 Scenario: With a ready processing and asking to reprocess
... ... @@ -32,6 +33,7 @@ Feature: Show Repository
32 33 And I wait up for a ready processing
33 34 When I visit the repository show page
34 35 Then I should see the sample repository name
  36 + And I should see the correct notify push url
35 37 And I should see "State"
36 38 And I should see "Creation Date"
37 39 And I should see "PREPARING time"
... ...
features/step_definitions/repository_steps.rb
... ... @@ -281,3 +281,8 @@ end
281 281 Then(/^I should get a not found error$/) do
282 282 expect(page.driver.status_code).to eq(404)
283 283 end
  284 +
  285 +Then(/^I should see the correct notify push url$/) do
  286 + step "I should see \"Notify Push Url for Gitlab\""
  287 + expect(page).to have_selector("input[value=\"#{repository_notify_push_url(host: Capybara.current_session.server.host, port: Capybara.current_session.server.port, locale: :en, id: @repository.id)}\"]")
  288 +end
... ...