Commit b90ea37e3f13c099209a35f3dae0c1a68023cbae
1 parent
1e6f524d
Exists in
colab
and in
2 other branches
Include notify push url on Repository#show view
Signed-off-by: Heitor Reis <marcheing@gmail.com>
Showing
5 changed files
with
16 additions
and
0 deletions
Show diff stats
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
config/locales/views/repository/pt.yml
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 | ... | ... |