summaryrefslogtreecommitdiff
path: root/spec/helpers
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * | Move parsing of sidekiq ps into helperPascal Betz2016-09-071-0/+35
| | |
* | | Merge branch 'dz-mr-version-compare' into 'master' Douwe Maan2016-09-081-0/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow compare merge request versions ## What does this MR do? Add new functionality to the merge request page. It allows you easily compare merge request versions in one click. ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? To improve code review experience. ## Screenshots (if relevant) See discussion ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry 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 [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) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/13570 See merge request !6127
| * | | Add more tests for merge request versions featureDmitriy Zaporozhets2016-09-071-0/+9
| |/ / | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | Merge branch '19183-refactor-sidebar-js' into 'master' Fatih Acet2016-09-071-25/+0
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor sidebar logic for more predictable behavior ## What does this MR do? Fixes a few bugs with the sidebar and "pin" functionality: 1. Pinned state would get reset when loading a page with a viewport smaller than 1024px (#19183) 2. Toggle buttons could occasionally end up in an invalid state in which the toggle is hidden from view at the same time the sidebar is collapsed. ![2016-09-03-09.39.07](/uploads/75d9a836ab58aae9f89f38cc29e90bbd/2016-09-03-09.39.07.gif) 3. Clicking outside the sidebar to trigger 'collapse' when below the 1024px breakpoint would work only if not pinned, even though pin status should only effect the sidebar above the 1024px breakpoint. 4. Code confusing with no single source of truth for the state of the sidebar. Sometimes pinned state is inferred from the cookie, sometimes from the DOM. Code to handle these functions was confusingly split across both `sidebar.js` and `application.js` for no apparent reason. I've created a singleton ES6 class to handle the sidebar DOM manipulations, using the properties `isExpanded` and `isPinned` as the canonical state and providing a `renderState` method to sync the DOM with this state whenever it needs updating. This avoids the possibility of invalid states caused by reliance on jQuery `toggleClass()` methods and makes the code much more readable/maintainable. ## Are there points in the code the reviewer needs to double check? It is a substantial rewrite, so I could use another set of eyes to make sure nothing was left behind from the original implementation. ## Why was this MR needed? I initially intended to just fix #19183 by modifying the code in place, but it proved to be a difficult mess and rather than add to the technical debt it made sense to write a more readable implementation of the sidebar functionality. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [ ] 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 you do - 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 #19183 See merge request !6169
| * | | remove dead code - 'collapsed_nav' cookie no longer used since a1fbdbb6 (see ↵Mike Greiling2016-09-071-25/+0
| | |/ | |/| | | | | | | MR !4579)
* | | Merge branch 'issue_21821' into 'master' Fatih Acet2016-09-071-0/+44
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Fix project settings field fixes #21821 See merge request !6185
| * | Fix project settings fieldissue_21821Felipe Artur2016-09-061-0/+44
| |/
* | Add failing test for #14360winniehell2016-09-071-0/+4
|/
* Don't create groups for unallowed users when importing projectsDouglas Barbosa Alexandre2016-08-311-0/+24
|
* Show "Create Merge Request" widget for push events to fork projects on the ↵Paco Guzman2016-08-241-0/+38
| | | | source project
* Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2016-08-201-0/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wall-clock-time-for-showing-pipeline * upstream/master: (50 commits) Increased vertical alignment of labels for issues in lists Changed file name Updated spec HAML Changed tests to use JS tests Addressed feedback Made logic simpler by moving away from underscorejs Added tooltip to label value in collapsed sidebar Add play icon SVG Have hover color of builds span full width Fix alignment of icon on commits page Change sleep to wait_for_ajax Added tests Destroy branch delete tooltip when row is removed Move and improvement comment in pipeline fixtures Fix notification_service argument error of declined invitation emails Update contribution acceptance criteria with tests requirements Fixed keyboard shortcuts not working on issue boards Hides tooltip when dragging Fixes issue with cursor not changing when dragging Hides tooltips when dragging issues Add a spec testing a second side effect of `Repository#merge`. drop execute bit ...
| * Changed file namePhil Hughes2016-08-191-0/+0
| | | | | | | | Updated spec HAML
| * Changed tests to use JS testsPhil Hughes2016-08-191-0/+16
| |
* | Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2016-08-193-2/+59
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wall-clock-time-for-showing-pipeline * upstream/master: (554 commits) Fix expansion of discussions in diff Improve performance of MR show page Fix jumping between discussions on changes tab Update doorkeeper to 4.2.0 Fix MR note discussion ID Handle legacy sort order values Refactor `find_for_git_client` and its related methods. Remove right margin on Jump button icon Fix bug causing “Jump to discussion” button not to show Small refactor and syntax fixes. Removed unnecessary service for user retrieval and improved API error message. Added documentation and CHANGELOG item Added checks for 2FA to the API `/sessions` endpoint and the Resource Owner Password Credentials flow. Fix behavior around commands with optional arguments Fix behavior of label_ids and add/remove_label_ids Remove unneeded aliases Do not expose projects on deployments Incorporate feedback Docs for API endpoints Expose project for environments ...
| * Merge branch 'rs-issue-21017' into 'master' Robert Speicher2016-08-181-0/+9
| |\ | | | | | | | | | | | | | | | | | | Update Hamlit to 2.6.1 Fixes gitlab-org/gitlab-ce#21025 and gitlab-org/gitlab-ce#21017 See merge request !5873
| | * Update Hamlit to 2.6.1rs-issue-21017Robert Speicher2016-08-181-0/+9
| | | | | | | | | | | | Fixes gitlab-org/gitlab-ce#21025 and gitlab-org/gitlab-ce#21017
| * | Merge branch '18334-truncate-award-emoji-users' into 'master' Jacob Schatz2016-08-181-0/+26
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Truncated long user lists in award emoji tooltips ## What does this MR do? Truncates award emoji tooltips so that they only show 10 users maximum. Further users are indicated by appending "and X more." ## Are there points in the code the reviewer needs to double check? Is 10 too little, should it be raised? My test cases rely on join() to build the expected output. This feels a little iffy is it alright? ## Why was this MR needed? Some issues have a large number of thumbs causing tooltips to be very large. ## What are the relevant issue numbers? closes #18334, closes #19542 ## Screenshots (if relevant) ##### Before ![Screenshot_from_2016-06-20_19-49-12](/uploads/d7a14dd87bb3da2acd7c0818de99852b/Screenshot_from_2016-06-20_19-49-12.png) ##### After ![Screenshot_from_2016-06-20_19-50-58](/uploads/f7f05c44594bfe8cec7dfd48802753a6/Screenshot_from_2016-06-20_19-50-58.png) Truncation point modified for purposes of screenshot ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - [x] Tests - [x] Added for this feature/bug - [x] All builds are passing - [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 you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4780
| | * | Award tooltips refer to current user as "You"Jack Davison2016-08-171-4/+4
| | | |
| | * | Switch to using to_sentence to construct tooltipsJack Davison2016-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Code in ruby now uses Array#to_sentence to construct award tooltips * Coffeescript uses a combination of regexes for the same result
| | * | Truncates 9-10 users with current user in frontJack Davison2016-08-171-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | * If the current user is not in the list output will have 1-9 users * If the current user is in the list output will be "me, " + 0-9 users
| | * | Truncated user list in award emoji tooltipsJack Davison2016-08-171-0/+16
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Only the first 10 names are displayed * Further users are indicated by "and X more." * String "and X more" is appended to the array THEN join is called * An oxford comma seperates the last name from "and X more" * In coffeescript "me" is now always prepended * Tests included
| * | edit_blob_link can receive the blob to avoid access to the repository20454-edit-button-mrPaco Guzman2016-08-181-2/+24
| |/
* | Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2016-08-171-2/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wall-clock-time-for-showing-pipeline * upstream/master: (99 commits) Update CHANGELOG for 8.10.6, 8.9.7, and 8.8.8 Updated Akismet documentation Add hover state to todos (!5361) Load issues and merge requests templates from repository Backport EE assertions in protected branch related specs. Revert "Merge branch '19957-write-tests-for-adding-comments-for-different-line-types-in-diff' into 'master'" Fix a missed `before_action` for `AutocompleteController`. Backport `AutocompleteController#load_project` from EE!581. Fix API::BranchesSpec. Fix failing tests relating to backporting ee!581. Revert unrelevant changes Fix the protected branches factory. Improve EE compatibility with protected branch access levels. Move the "update" portion of the protected branch view into a partial. Don't select an access level if already selected. Backport changes from gitlab-org/gitlab-ee!581 to CE. Further refactor and syntax fixes. Upgrade httpclient gem from 2.7.0.1 to 2.8.2. Make rubocop happy Make rubocop happy ...
| * Revert unrelevant changespipeline-hooks-without-slackKamil Trzcinski2016-08-161-2/+1
| |
* | Merge branch 'pipeline-hooks-without-slack' into ↵Lin Jen-Shin2016-08-1514-118/+77
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wall-clock-time-for-showing-pipeline * pipeline-hooks-without-slack: (156 commits) Fix test failures Make pipeline to be in created state for hooks tests Make `execute_methods` public Added specs for started_at and finished_at Use explicit events to transition between states Fix tests. We cannot reload unless it's already saved: Have trait all_events_enabled so that's easier to reuse, feedback: Simplify the name for data builder, feedback: Prefer extend self over module_function, feedback: Make it more grammatically correct, feedback: if -> when; when -> `when`; %w() -> %w[]; and fix some typos: Prefer described_class, feedback: Make the comment more clear, feedback: Update CHANGELOG render only commit title Fix test failures, that did occur because of missing previously used `reload_status!` call Use state machine for pipeline event processing Upgrade Rails to 4.2.7.1 for security fixes. Update gitlab-shell to v3.3.3 Verify the pipeline status after executing events on builds ...
| * Merge branch 'improve-pipeline-processing' into pipeline-hooks-without-slackKamil Trzcinski2016-08-121-48/+0
| |\ | | | | | | | | | | | | | | | | | | | | | # Conflicts: # app/models/ci/pipeline.rb # app/models/commit_status.rb # app/services/ci/create_pipeline_service.rb # spec/models/ci/pipeline_spec.rb
| | * Show member roles to all users on members page20614-show-member-roles-to-all-usersDouwe Maan2016-08-111-48/+0
| | |
| * | Make the comment more clear, feedback:Lin Jen-Shin2016-08-121-1/+3
| | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13810778
| * | Merge remote-tracking branch 'upstream/master' into pipeline-hooks-without-slackLin Jen-Shin2016-08-1113-193/+149
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (233 commits) Fix awardable button mutuality loading spinners Update CHANGELOG for 8.10.5 Clean up project destruction Small refactor of doc/development/README.md Avoid commit lookup on diff_helper Removed extra newline from redis_spec.rb Used cached value of project count to reduce DB load Remove duplicate link_to statements Mention add_column_with_default in downtime guide Add missing space to generic badge template Rename `run` task helper method to prevent conflict with StateMachine Add a method in Project to return a cached value of total count of projects spellcheck Add svg guidelines to ui guide Add Changelog entry for Grape upgrade [ci skip] Fix Grape tests. Retain old behavior Update Grape from 0.13.0 to 0.15.0. adds second batch of tests changed to active tense fixes part1 of files to start using active tense ...
| | * adds second batch of tests changed to active tenseactive-tense-test-coveragetiagonbotelho2016-08-091-2/+2
| | |
| | * fixes part1 of files to start using active tensetiagonbotelho2016-08-0913-68/+69
| | |
| * | Let's make sure cache were cleared:Lin Jen-Shin2016-08-051-0/+4
| | | | | | | | | | | | | | | | | | I can't reproduce this failure locally. Here's the failure: https://gitlab.com/gitlab-org/gitlab-ce/builds/2864250
* | | Cleanup the use of duration and optimize some queriesLin Jen-Shin2016-08-101-8/+8
| |/ |/|
* | Merge branch '19752-pipelines-finished-at' into 'master' Jacob Schatz2016-08-051-2/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update timeago to shorter representation ## What does this MR do? Shortens representation of `Finished at` block in pipelines & builds ## What are the relevant issue numbers? Closes #19752 Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/18920 ## Screenshots (if relevant) ![Screen_Shot_2016-07-14_at_8.54.44_AM](/uploads/85000549c49165d4481422eac5eb0ca9/Screen_Shot_2016-07-14_at_8.54.44_AM.png) See merge request !5225
| * | Update timeago to shorter representation19752-pipelines-finished-atAnnabel Dunstone2016-08-041-2/+15
| | |
* | | Add unfold links for Side-by-Side viewTim Masliuchenko2016-08-041-24/+56
|/ /