summaryrefslogtreecommitdiff
path: root/spec/support/matchers
Commit message (Collapse)AuthorAgeFilesLines
* Convert RestClient to Gitlab::HTTP for Prometheus MonitorDavid Wilkins2019-08-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | - Closes #60024 - Change PrometheusClient.new to accept a base url instead of an already created RestClient - Use Gitlab::HTTP in PrometheusClient instead of creating RestClient in PrometheusService - Move http_options from PrometheusService to PrometheusClient (follow_redirects: false) - ensure that base urls don't have the trailing slash - Created a `PrometheusClient#url` method that might not be strictly required - Change rescued exceptions from RestClient::* to HTTParty::ResponseError where possible and StandardError for the rest
* Add frozen_string_literal to spec/supportThong Kuah2019-07-2529-0/+58
| | | | | Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
* Added the `abort_execution` matcherGabriel Mazetto2019-07-101-0/+46
|
* Fix order-dependent Gitaly specs failingsh-fix-gitaly-specs-failingStan Hu2019-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | If `spec/tasks/gitlab/cleanup_rake_spec.rb` preceded any of the Gitaly request specs, it would import the `cleanup.rake` and the global function `limit`. For some reason, the Protobuf implementation would use the global function instead of the getter method. For example: ``` def limit puts "hi" end req = Gitaly::WikiGetAllPagesRequest.new req.send(:limit) hi => nil ``` To fix this problem, access the field value using the [] operator instead. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64006
* Fix N+1 problem in `JobsController#index`fix-jobs-controller-index-n-1Kamil Trzciński2019-06-191-0/+62
| | | | | | This adds missing preloads, and introduces additional n+1 matcher to look for duplicates.
* Generate lets_encrypt_private_key on the flyVladimir Shushlin2019-05-311-0/+11
| | | | | | | | | Remove migration generating lets encrypt key Don't generate private_key if database is readonly For reference: This reverts commit 988a7f70489b99383b95e9f271a2caf6bb5b3a44. This reverts commit 21acbe531592d55caf0e5b8716a3b551dafd6233.
* Remove .wiki and @md-typography mixin in favor of .md and .md-fileDouwe Maan2019-03-261-1/+1
| | | | | | | | | | | Before, the styling for `img:not(.emoji)`` was repeated between `.md:not(.use-csslab):not(.wiki)` (for comments and the Markdown preview), `.documentation.wiki` (for help pages), and `.issuable-details .description .wiki` (for MR and issue descriptions). In these places, we now simply use `.md`. Wherever we use `.md` but don't want this image styling (like wikis and blobs), `.md-file` is added.
* Reduce differences in spec/support/matchers/access_matchers.rbRémy Coutable2019-03-071-18/+17
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Get rid of ScheduleInstallationServiceJoão Cunha2019-02-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - deletes schedule_installation_service.rb - moves schedule_installation_service.rb logic to create_service.rb - moves specs as well Removes code duplication Remove unecessary spec block Abide review suggestions Test installable applications which are not associated to a cluster Fix a typo Removes duplciated expectation Reuse variable instead of redefining Remove method in favor of a local scoped lambda Improve 'failing service' shared examples Test the increase of status count Remove duplicated test Enable fronzen literal
* Improve GraphQL Authorization DSLLuke Duncalfe2019-02-261-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously GraphQL field authorization happened like this: class ProjectType field :my_field, MyFieldType do authorize :permission end end This change allowed us to authorize like this instead: class ProjectType field :my_field, MyFieldType, authorize: :permission end A new initializer registers the `authorize` metadata keyword on GraphQL Schema Objects and Fields, and we can collect this data within the context of Instrumentation like this: field.metadata[:authorize] The previous functionality of authorize is still being used for mutations, as the #authorize method here is called at during the code that executes during the mutation, rather than when a field resolves. https://gitlab.com/gitlab-org/gitlab-ce/issues/57828
* Merge branch 'bvl-user-status-message-35463' into 'master'Rémy Coutable2018-08-011-0/+13
|\ | | | | | | | | | | | | Allow users to set a status Closes #35463 See merge request gitlab-org/gitlab-ce!20614
| * Show the status of a user in interactionsBob Van Landuyt2018-07-301-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The status is shown for - The author of a commit when viewing a commit - Notes on a commit (regular/diff) - The user that triggered a pipeline when viewing a pipeline - The author of a merge request when viewing a merge request - The author of notes on a merge request (regular/diff) - The author of an issue when viewing an issue - The author of notes on an issue - The author of a snippet when viewing a snippet - The author of notes on a snippet - A user's profile page - The list of members of a group/user
* | Merge branch 'feature/gb/login-activity-metrics' into 'master'Sean McGivern2018-07-311-0/+11
|\ \ | | | | | | | | | | | | | | | | | | Add user authentication activity metrics Closes #47789 See merge request gitlab-org/gitlab-ce!20668
| * | Improve readability and move custom matchers to better placeGrzegorz Bizon2018-07-271-0/+11
| | |
* | | Add mutation toggling WIP state of merge requestsBob Van Landuyt2018-07-251-0/+9
| |/ |/| | | | | | | This is mainly the setup of mutations for GraphQL. Including authorization and basic return type-structure.
* | Delete UserActivities and related workers43312-remove_user_activity_workersImre Farkas2018-07-181-5/+0
|/
* Resolve "Rename the `Master` role to `Maintainer`" BackendMark Chao2018-07-111-1/+1
|
* Refactor rspec matchers in read_only_spec.rbBrett Walker2018-07-071-0/+15
|
* Expose permissions on types in GraphQLBob Van Landuyt2018-06-281-2/+27
| | | | | This adds a reusable way to expose permissions for a user to types in GraphQL.
* Bring changes from EELin Jen-Shin2018-06-221-0/+7
|
* Allow querying a single MR within a projectBob Van Landuyt2018-06-151-0/+6
| | | | | | | | This allows the user to get a single MR nested in a GraphQL project query. Since we need the full path and the iid anyway, this makes more sense than having a root query that needs the full path as well.
* Initial setup GraphQL using graphql-ruby 1.8Bob Van Landuyt2018-06-061-7/+16
| | | | | | | | | - All definitions have been replaced by classes: http://graphql-ruby.org/schema/class_based_api.html - Authorization & Presentation have been refactored to work in the class based system - Loaders have been replaced by resolvers - Times are now coersed as ISO 8601
* Add a minimal GraphQL APINick Thomas2018-06-051-0/+31
|
* Merge branch 'sh-add-uncached-query-limiter' into 'master'Rémy Coutable2018-06-051-15/+50
|\ | | | | | | | | Remove N+1 query for author in issues API See merge request gitlab-org/gitlab-ce!19345
| * Remove N+1 query for author in issues APIsh-add-uncached-query-limiterStan Hu2018-06-041-15/+50
| | | | | | | | | | | | | | This was being masked by the statement cache because only one author was used per issue in the test.. Also adds support for an Rspec matcher `exceed_all_query_limit`.
* | Revert "Add a new have_html_escaped_body_text that match an HTML-escaped text"Takuya Noguchi2018-06-031-5/+0
|/ | | | This reverts commit 517598ba10793efa02cb90379f78ab97c9c5b25d.
* Move spec helpers/matchers/shared examples/contexts to their relevant folderRémy Coutable2018-04-232-0/+90
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add matcher for emojiBob Van Landuyt2018-04-111-0/+5
|
* Replace the `project/issues/issues.feature` spinach test with an rspec analogblackst0ne2018-04-031-0/+11
|
* Add matcher to match elements by idstc-geo-local-only-counts-matcherToon Claes2018-03-061-0/+24
| | | | | Initially added in gitlab-org/gitlab-ee!4864 and gitlab-org/gitlab-ee!4689.
* Return only limited pagination headers for search API endpointsJarka Kadlecová2018-02-061-0/+6
|
* Add Colors to GitLab Flavored MarkdownTony Rom2018-01-291-0/+21
|
* Adds Rubocop rule for line break around conditionals🙈 jacopo beschi 🙉2018-01-111-0/+1
|
* Allow password authentication to be disabled entirelyMarkus Koller2017-11-231-1/+5
|
* Fix encoding bugs in Gitlab::Git::UserJacob Vosmaer (GitLab)2017-11-231-0/+9
|
* Merge branch '36099-api-responses-missing-x-content-type-options-header' ↵Douwe Maan2017-11-081-0/+5
| | | | | | | | | | | into '10-1-stable' Include X-Content-Type-Options (XCTO) header into API responses See merge request gitlab/gitlabhq!2211 (cherry picked from commit 6c818e77f2abeef2dd7b17a269611b018701fa79) e087e075 Include X-Content-Type-Options (XCTO) header into API responses
* Add Projects::Clusters::ApplicationsController testsAlessio Caiazza2017-11-031-1/+1
|
* Replace the 'project/shortcuts.feature' spinach test with an rspec analogreplace_project_shortcuts.featureVitaliy @blackst0ne Klachkov2017-09-221-0/+6
|
* Improve 'spec/features/profiles/*' specsVitaliy @blackst0ne Klachkov2017-09-161-0/+6
|
* Enable Layout/TrailingWhitespace cop and auto-correct offensesRobert Speicher2017-08-151-1/+1
|
* Enable the Layout/SpaceBeforeBlockBraces coprc/enable-the-Layout/SpaceBeforeBlockBraces-copRémy Coutable2017-08-091-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Support references to group milestonesSean McGivern2017-08-071-1/+1
| | | | | Group milestones can only be referred to by name, not IID. They also do not support cross-project references.
* Resolve "Lazy load images on the Frontend"Tim Zallmann2017-07-241-2/+2
|
* Introduce have_gitlab_http_status34964-have_gitlab_http_statusLin Jen-Shin2017-07-151-0/+14
| | | | | | | | | | | | | | So that whenever this failed: expect(response).to have_gitlab_http_status(200) We see what's the response there. Here's an example: ``` 1) API::Settings Settings PUT /application/settings custom repository storage type set in the config updates application settings Failure/Error: expect(response).to have_gitlab_http_status(200) expected the response to have status code 200 but it was 400. The response was: {"error":"password_authentication_enabled, signin_enabled are mutually exclusive"} ```
* Revert unnecesarry changesShinya Maeda2017-07-051-1/+1
|
* zj nice catchies 3Shinya Maeda2017-07-051-1/+5
|
* Improved AccessMatchers and testsShinya Maeda2017-07-051-3/+23
|
* Add a UTF-8 encoding matcherJacob Vosmaer2017-06-301-0/+9
|
* Make membership required for create_user_by_membershipShinya Maeda2017-06-281-3/+3
|
* use go instead of let procShinya Maeda2017-06-281-4/+4
|