summaryrefslogtreecommitdiff
path: root/spec/helpers
Commit message (Collapse)AuthorAgeFilesLines
* Use `:empty_project` where possible in helper specsrs-empty_project-helpersRobert Speicher2017-01-2514-40/+41
|
* Address MR commentsJarka Kadlecova2017-01-131-0/+15
|
* Merge branch '26168-emoji-reactions-missing-tooltip-when-not-logged-in' into ↵Fatih Acet2017-01-031-4/+4
|\ | | | | | | | | | | | | | | | | | | 'master' Disable award emoji button but display tooltip Closes #26168 See merge request !8382
| * Disable award emoji button but display tooltip26168-emoji-reactions-missing-tooltip-when-not-logged-inSam Rose2016-12-311-4/+4
| |
* | Fix cross-project references copy to include the project referencefix/cross-project-ref-pathJames Lopez2017-01-031-0/+10
|/ | | | Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
* Add more storage statisticsMarkus Koller2016-12-211-0/+21
| | | | | | | | | | | | | This adds counters for build artifacts and LFS objects, and moves the preexisting repository_size and commit_count from the projects table into a new project_statistics table. The counters are displayed in the administration area for projects and groups, and also available through the API for admins (on */all) and normal users (on */owned) The statistics are updated through ProjectCacheWorker, which can now do more granular updates with the new :statistics argument.
* Reduce duplication for GitHubish import status viewRémy Coutable2016-12-191-10/+23
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Always use `fixture_file_upload` helper to upload files in tests.fix-groups-helper-specRuben Davila2016-12-181-1/+1
| | | | | * Also is not a good idea to use File.open without closing the file handler. We should use it with a block or close it explicitly.
* Add Gitlab::Middleware::MultipartJacob Vosmaer2016-12-151-8/+6
|
* Merge branch 'html-safe-diff-line-content' into 'security' Robert Speicher2016-12-081-9/+52
| | | | | | | | | | Don't accidentally mark unsafe diff lines as HTML safe Fixes potential XSS issue when a legacy diff note is created on a merge request whose diff contained HTML See https://gitlab.com/gitlab-org/gitlab-ce/issues/25249 See merge request !2040
* Add shorthand support to gitlab markdown referencesOswaldo Ferreira2016-12-021-2/+2
|
* Refactor issuable_filters_present to reduce duplicationsSemyon Pupkov2016-11-281-0/+21
| | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/23546
* Merge branch 'milestone_start_date' into 'master' Sean McGivern2016-11-231-0/+19
|\ | | | | | | | | | | | | Add a starting date to milestones Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23704 See merge request !7484
| * Add a starting date to milestonesmilestone_start_dateValery Sizov2016-11-231-0/+19
| |
* | Drop Project#authorized_for_user? in favor of ProjectTeam#member?Ahmad Sherif2016-11-231-2/+2
|/ | | | Closes #23938
* Fix sidekiq stats in admin areablackst0ne2016-11-231-0/+23
| | | | | | | | Added tests Added changelog entry Resolved all issues in code
* Use `Gitlab.config.gitlab.host` over `'localhost'`fix-tests-for-different-hostLin Jen-Shin2016-11-182-3/+3
| | | | | | | | This would fix long standing failures running tests on my development machine, which set `Gitlab.config.gitlab.host` to another host because it's not my local computer. Now I finally cannot withstand it and decided to fix them once and for all.
* Merge branch '23990-project-show-error-when-empty-repo' into 'master' Douwe Maan2016-11-171-0/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 500 error on project show when user is not logged in and project is still empty ## What does this MR do? Aims to fix the 500 error when the project is empty and the user is not logged in and tries to access project#show ## Screenshots (if relevant) When the project is empty and the user is not logged in we default to the empty project partial instead of readme. ![Screen_Shot_2016-11-11_at_22.54.21](/uploads/3d87e65195376c85d3e515e6d5a9a850/Screen_Shot_2016-11-11_at_22.54.21.png) ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #23990 See merge request !7376
| * adds fix for security issue when annonymous user does not have access to ↵23990-project-show-error-when-empty-repotiagonbotelho2016-11-171-7/+29
| | | | | | | | repository we now display the activity feed instead of the readme
| * moves empty view logic onto empty partial to make it reusable and fixes teststiagonbotelho2016-11-151-4/+5
| |
| * change empty project view to annonymous user from activity to empty partialtiagonbotelho2016-11-111-6/+3
| |
| * adds guard clause for readme model method and initializes a new view with ↵tiagonbotelho2016-11-111-0/+21
| | | | | | | | proper stylesheets
* | Merge branch '23117-search-for-a-filename-in-a-project' into 'master' Sean McGivern2016-11-161-32/+0
|\ \ | | | | | | | | | | | | | | | | | | Search for a filename in a project Closes #23117 See merge request !7426
| * | Search for a filename in a project23117-search-for-a-filename-in-a-projectValery Sizov2016-11-161-32/+0
| |/
* | Make access request specs explicitly enable or disable access requests as ↵Nick Thomas2016-11-111-4/+4
|/ | | | required
* Merge branch 'remove-heading-space-from-diff-content' into 'master' Alfredo Sumaran2016-11-091-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove an extra leading space from diff paste data ## What does this MR do? Remove an extra leading space from diff paste data. ## Are there points in the code the reviewer needs to double check? I have checked the following three patterns. * inline diff * parallel diff * blob preview ## Why was this MR needed? Diff paste data contain an extra leading space. So it need to remove an extra leading space manually from pasted diff data. ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? #14176 Closes #23899 See merge request !7133
| * Remove an extra leading space from diff contentHiroyuki Sato2016-11-041-1/+1
| |
* | Replace jQuery.timeago with timeago.jsClement Ho2016-11-071-21/+3
| |
* | Use the Gitlab Workhorse HTTP header in the admin dashboard21664-incorrect-workhorse-version-number-displayedChris Wright2016-11-071-0/+21
|/ | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix LabelsHelper#link_to_label to use the subject argumentDouglas Barbosa Alexandre2016-10-191-14/+13
|
* Stop event_commit_title from escaping its outputNick Thomas2016-10-181-0/+17
| | | | | | | | Return a non-html-safe, unescaped String instead of ActiveSupport::SafeBuffer to preserve safety when the output is misused. Currently there's oly one user, which does the right thing. Closes #23311
* refactors tests because of gitlab-test repository changes20708-new-branch-is-immediatelly-tagged-as-mergedtiagonbotelho2016-10-111-1/+1
|
* Merge branch 'rs-optimize-award_user_list-spec' into 'master' Rémy Coutable2016-10-071-13/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimize the `award_user_list` helper spec According to https://gitlab.com/gitlab-org/gitlab-ce/issues/23034#note_16586657, each test for this helper generated 1,833 queries. Now we only generate stubbed records, and only as many as we need for each test. This also corrects a slight logic bug in the helper itself. When the number of awards was greater than the limit (9 by default), _and_ the current user was one of them, we actually included 10 names, including "You", plus the remaining count. Now we return the correct number regardless. See merge request !6722
| * Optimize the `award_user_list` helper specRobert Speicher2016-10-071-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to https://gitlab.com/gitlab-org/gitlab-ce/issues/23034#note_16586657, each test for this helper generated 1,833 queries. Now we only generate stubbed records, and only as many as we need for each test. This also corrects a slight logic bug in the helper itself. When the number of awards was greater than the limit (9 by default), _and_ the current user was one of them, we actually included 10 names, including "You", plus the remaining count. Now we return the correct number regardless.
* | Enable CacheMarkdownField for the remaining modelsNick Thomas2016-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit alters views for the following models to use the markdown cache if present: * AbuseReport * Appearance * ApplicationSetting * BroadcastMessage * Group * Issue * Label * MergeRequest * Milestone * Project At the same time, calls to `escape_once` have been moved into the `single_line` Banzai pipeline, so they can't be missed out by accident and the work is done at save, rather than render, time.
* | Change user & group landing page routing from /u/:name & /groups/:name to /:nameDmitriy Zaporozhets2016-10-061-1/+1
|/ | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge commit 'dev/security' into 'master'Rémy Coutable2016-10-061-1/+1
|\ | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Enforce the fork_project permission in Projects::CreateServiceNick Thomas2016-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Projects::ForkService delegates to this service almost entirely, but needed one small change so it would propagate create errors correctly. CreateService#execute needs significant refactoring; it is now right at the complexity limit set by Rubocop. I avoided doing so in this commit to keep the diff as small as possible. Several tests depend on the insecure behaviour of ForkService, so fi them up at the same time.
* | Merge branch 'rc-new-members-request-access-service' into 'master' Robert Speicher2016-10-021-2/+2
|\ \ | | | | | | | | | | | | | | | | | | New `Members::RequestAccessService` Part of #21979. See merge request !6265
| * | Fix specs that requires an access requestRémy Coutable2016-09-221-2/+2
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Small improvements thanks to Robert's feedbackRémy Coutable2016-09-301-26/+34
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Cache the issuable counters for 2 minutesRémy Coutable2016-09-301-2/+95
| |/ |/| | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'gitlab-ce-milestone-tab-badges' into 'master' Fatih Acet2016-09-241-0/+33
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Milestone tab badges ### What does this MR do? Adds count badges to the tabs on the Milestone page to mirror the Issue page. ### Are there points in the code the reviewer needs to double check? CSS: Padding was added to the `.milestone` element to make expired milestones look good. ### Why was this MR needed? For consistency with other tabs ### What are the relevant issue numbers? Closes #20114 ### Screenshots (if relevant) **Before** <img src="/uploads/1f75853a863a9058ee409916b7ee4057/Screen_Shot_2016-07-22_at_13.22.20.png" width="362"> **After** <img src="/uploads/8a058290850f571db249dd9b23f5138d/Screen_Shot_2016-07-22_at_13.21.58.png" width="303"> ![Screen_Shot_2016-08-23_at_1.42.56_AM](/uploads/b072dc6bdf505b2fce46660beaf0eae7/Screen_Shot_2016-08-23_at_1.42.56_AM.png) ![Screen_Shot_2016-08-23_at_1.43.15_AM](/uploads/e7440bf2aa628aa4dba63863083699c0/Screen_Shot_2016-08-23_at_1.43.15_AM.png) ### Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5946
| * Ensure milestone counts work with no datagitlab-ce-milestone-tab-badgesAlfredo Sumaran2016-09-071-19/+17
| | | | | | | | Commit originally written by @smcgivern
| * Fix failing specs and improve htmlAlfredo Sumaran2016-09-071-10/+12
| |
| * Updated milestone count helper plus testsDan Rowden2016-09-071-0/+33
| |
* | Syntax fixes and better tests for helper methods. Updated docs.group-specific-lfs-settingsPatricio Cano2016-09-151-0/+63
| |
* | Backport search_helper changes from EEbackport_to_search_helper_from_eeValery Sizov2016-09-141-0/+32
| |
* | Merge branch 'sidekiq-ps-parsing' into 'master' Rémy Coutable2016-09-091-0/+40
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Moves splitting of `ps` result to helper. * Users a regexp to extract the different parts The result of `ps` at least depends on the _LANG_ and the distance of _start_ to _now_ (start time then the day + hour then month+day) I've tested with _LANG=en_US.UTF-8_ and _LANG=de_CH.UTF-8_ Closes #20632 See merge request !6245
| * | Reformat Regexp Pascal Betz2016-09-081-0/+5
| | | | | | | | | | | | Fix show template (missing tr) Separate exercise/verify