Commit Graph
231 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets 80b2f3fb86 Implement merge requests search
It is same search like we have at issues page. It allows to quickly
filter merge requests based on title or desription. I copy-pasted some
js code from Issues.js. In future search (filtering) logic should be
refactoed into one class for merge requests and issues
2015-03-12 16:20:58 -07:00
Dmitriy Zaporozhets 9ed71f77fe Remove tests for un-existing page 2015-03-10 23:34:18 -07:00
Marin Jankovski 66fa4b09ed Merge branch 'fix-edit-note-with-votes' into 'master'
Fix server error when editing a note to "+1" or "-1"

### Summary

If a user edits a comment with "+1" or "-1" in the beginning, the POST returns an Internal Server error. (issue #1151). This merge request resolves that error.

### Steps to reproduce

1. Comment on an issue with "Test comment".
2. Edit the issue.
3. Write "+1" and click "Save Comment".

### Expected behavior

The edited note should be saved and refreshed. Any previous upvotes/downvotes from the user should contain a strikethrough.

### Observed behavior

Internal Error

### Relevant logs

```
Started PUT "/avocode/avocode-manager/notes/4996" for 185.33.136.107 at 2015-02-28 17:11:53 +0100
Processing by Projects::NotesController#update as JS
Parameters: {"utf8"=>"✓", "authenticity_token"=>"*removed*", "note"=>{"note"=>"+1\r\n\r\nYes"}, "commit"=>"Save Comment", "project_id"=>"avocode/avocode-manager", "id"=>"4996"}
Completed 500 Internal Server Error in 86ms
ActionView::Template::Error (undefined method `each' for nil:NilClass):
28: %span.note-last-update
29: = note_timestamp(note)
30:
31: - if note.superceded?(@notes)
32: - if note.upvote?
33: %span.vote.upvote.label.label-gray.strikethrough
34: %i.fa.fa-thumbs-up
app/models/note.rb:495:in `superceded?'
app/views/projects/notes/_note.html.haml:31:in `_app_views_projects_notes__note_html_haml___812277000516355462_69988235638820'
app/controllers/projects/notes_controller.rb:71:in `note_to_html'
app/controllers/projects/notes_controller.rb:103:in `render_note_json'
app/controllers/projects/notes_controller.rb:39:in `block (2 levels) in update'
app/controllers/projects/notes_controller.rb:38:in `update'
```

### Fix

It turns out no tests were present for the "Edit Issue" functionality. I added spinach tests to exercise this and reproduced the error.

Most of the routes in `notes_controller.rb` appear to render all notes for the given discussion. `_form.html.haml` needs the full list of notes commented by the user to add strikethroughs for older upvotes/downvotes. However, only the `index` route appeared to obtain this information. The fix is to add a `before_filter` to obtain all the user's notes beforehand, except in the delete case where this information is not needed.

Things to watch: `NotesFinder` needs `target_type` and `target_id` to determine what to do. I'm not sure if there is a conscious effort to phase these keywords out in favor of `noteable_type` and `noteable_id`.

See merge request !360
2015-03-03 21:57:00 +00:00
Stan Hu b8c9257fb1 Fix bug where editing a comment with "+1" or "-1" would cause a server error
Closes #1151
2015-03-02 15:26:00 -08:00
Aorimn f84b7eef3f Add Irker service
Irker is a gateway which sends IRC messages on git updates. This new
service provides an interface to this gateway, integrated in Gitlab, for
each updates.
As per the guidelines, this commit adds the new feature in the
CHANGELOG, tests and documentation.

See http://www.catb.org/esr/irker/
2015-03-01 20:51:03 +01:00
Valery Sizov 3177693c6f WebEditor: save to new branch: spinach 2015-02-24 11:43:20 +02:00
Dmitriy Zaporozhets 6a6a334522 Fix active tab tests 2015-02-19 17:24:34 -08:00
Jeremy b4d9ceb26f Add Asana service
Also add ability to render "service.help" in markdown
2015-02-02 09:59:42 +01:00
Dmitriy Zaporozhets d5d1802096 Set right test as tricky 2015-01-29 23:48:00 -08:00
Dmitriy Zaporozhets 23c31a0b12 Skip tricky test for semaphore 2015-01-29 23:06:43 -08:00
Dmitriy Zaporozhets f57bffc82a Merge branch 'init-from-ui' into 'master'
Add tests for creating bare repo and first file in UI

Part of #1930

See merge request !1444
2015-01-27 21:27:59 +00:00
Dmitriy Zaporozhets e956066d4a Add tests for initializing bare repo and creating new file in it 2015-01-27 12:19:32 -08:00
Marin Jankovski 0da59cb55b Merge branch 'master' into move_external_issue_tracker_away_from_yml_config
Conflicts:
	app/models/project.rb
	spec/models/project_spec.rb
2015-01-26 22:12:53 -08:00
Marin Jankovski 9b5b334a79 Remove unused feature steps. 2015-01-26 16:04:08 -08:00
Steven ThonusandHannes Rosenögger 42bac7f9f2 adding avatar to project settings page added avatar removal show project avatar on dashboard, projects page, project page added rspec and feature tests added project avatar from repository new default project icon added added copying af avatar to forking of project added generated icon fixed avatar fork hound fix style fix test fix 2015-01-24 18:51:16 +01:00
Dmitriy Zaporozhets dbd54fad51 Merge pull request #7905 from cirosantilli/visible-false
Change always passing visible false tests.
2015-01-15 14:41:41 -08:00
Ciro Santilli 67b06e7a9b Change always passing visible true tests to false. 2015-01-02 00:20:19 +01:00
Ciro Santilli 18fa155025 Add tests for disabled blob edit button cases. 2014-12-30 18:19:48 +01:00
Jason Lippert 1fa19401e9 Teamcity interaction using 8.1 rest api 2014-12-23 12:38:25 -05:00
Vinnie Okada 742e6eeed2 Merge branch 'upstream-master' into markdown-preview
Conflicts:
	spec/routing/project_routing_spec.rb
2014-12-07 20:25:58 -07:00
Dmitriy Zaporozhets 4cbe72d767 UI improvements mostly for mobile screens
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-02 11:31:57 +02:00
Daniel AquinoandDoug Goldstein 1353f9aa64 HipChat service: support custom servers
HipChat allows users to run their own private servers and to be able to
support those we must connect to the correct URL when using one of these
custom servers.
2014-11-19 21:27:24 -06:00
Dmitriy Zaporozhets f7bf892cca Revert "gitlab shell works if multiple rubies installed"
This reverts commit 533f4cdf30.
2014-11-18 17:14:36 +02:00
Dmitriy Zaporozhets cfee95d032 Merge pull request #8340 from cirosantilli/multi-ruby-install-v2
Web edit and HTTPS push work if multiple Rubies installed v2
2014-11-18 15:00:56 +02:00
Ciro Santilli 533f4cdf30 gitlab shell works if multiple rubies installed
Before this it would fail because git hooks automatically prepend
things to the path, which can lead the wrong Ruby version to be called
in which dependencies are not installed.

To make sure that this is correct, the forked_merge_requests commented
out test that depends on this change was uncommented.

For that test to pass, it is also necessary to setup the mock server
on port 3001 under test_env.rb.
2014-11-18 11:38:23 +01:00
Dmitriy Zaporozhets 2388fdd7c6 Improve fork to namespaces feature
* Show namespace thumbnail differently if project was already forked
* Show loading spinner when click on fork
* Fork link navigates to personal namespace only if no manageable groups exists

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-11-14 16:06:39 +02:00
Drew Blessing 776bca07cd Add Atlassian Bamboo service 2014-10-28 05:20:36 -05:00
Vinnie Okada 5bb8aff5dd Fix more Markdown preview tests 2014-10-18 18:43:45 -05:00
Vinnie Okada de53bc9d84 Add new Markdown preview test
Add a test to make sure that Markdown previews are available when
editing an existing issue.
2014-10-18 18:07:46 -05:00
Vinnie Okada e06f0ead98 Fix Markdown preview tests
Update Spinach tests for Markdown previews for the new-ish tab UI that
replaced the old preview/edit toggle button.
2014-10-18 18:07:23 -05:00
Vinnie Okada e1491465de Refactor Markdown preview tests
Create a new shared module for common issue/merge request behavior,
use `expect` syntax instead of `should`, and avoid `visible: false` in
the `have_css` matcher.
2014-10-18 17:58:34 -05:00
Vinnie Okada 5700842ba8 Add Markdown preview to more forms
Enable Markdown previews when creating and editing issues, merge
requests, and milestones, and when editing notes.
2014-10-15 23:52:33 -05:00
Ciro Santilli 2d23522107 Use :message key, not :error for File::Service. 2014-10-13 20:55:09 +02:00
Dmitriy Zaporozhets e261de255d Merge pull request #7942 from cirosantilli/commit-changes-uppercase
Make new and edit file submit more uniform
2014-10-13 18:47:46 +03:00
Dmitriy Zaporozhets cf1aa36a21 Merge pull request #7979 from mr-vinn/refactor-tasks
Refactor task list tests and coffeescript
2014-10-08 11:37:21 +03:00
Ciro Santilli 166c215a75 Make new and edit file submit more uniform 2014-10-08 10:01:07 +02:00
Ciro Santilli 901d099cea Upcase missing feature names 2014-10-07 23:28:38 +02:00
Vinnie Okada 40263a06c1 Refactor task list tests and coffeescript 2014-10-06 19:19:12 -05:00
Marin Jankovski 0fed1b5876 Merge pull request #7964 from mr-vinn/task-lists
Add task lists to issues and merge requests
2014-10-06 17:29:06 +02:00
Marin Jankovski 9535ce2caa Preventing some duplication in MR feature tests by adding a different comment. 2014-10-06 16:09:22 +02:00
Vinnie Okada 31bc42de57 Add Spinach tests for task lists 2014-10-06 02:07:03 -05:00
Ciro Santilli fa34901237 Make Spinach test names consistent
- do not add Feature to feature titles
- titleize feature titles
- put steps on the same path as .feature files
- make feature titles match their path
2014-10-05 18:21:11 +02:00
Sullivan SENECHAL d1fa3b336d Add Pushover service integration
That introduce select field type for services options.
2014-10-03 13:54:37 +02:00
Dmitriy Zaporozhets 71fce0b2f8 Comment random failing test
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-02 17:49:11 +03:00
Robert Schilling 350877d050 Merge pull request #7904 from cirosantilli/titleize-actions
Titleize blob action buttons. [failure unrelated]
2014-10-01 17:58:28 +02:00
Ciro Santilli 0d4ae0e392 Titleize blob action buttons. 2014-09-30 23:32:03 +02:00
Marin Jankovski 65cb51af31 Add a feature for readme on project show page. 2014-09-30 14:59:30 +02:00
Dmitriy Zaporozhets 8163a43c8f Merge pull request #7862 from cirosantilli/test-change-file
Add web UI file CRUD tests.
2014-09-29 17:38:22 +03:00
Dmitriy Zaporozhets 83a21c33f1 Add tests for commits graph
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-29 12:11:53 +03:00
Dmitriy Zaporozhets aa46a15d2a Fix spinach feature
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-26 18:12:25 +03:00