Skip to content

Add contract test for suggested reviewers dropdown

Mark Lapierre requested to merge ml-suggested-reviewer-contract-test into master

What does this MR do and why?

Adds a contract test for the Suggested Reviewers feature, specifically the dropdown element that appears in a merge request that lists suggested reviewers, and the backend endpoint that provides the data..

  • Adds new dev packages to packages.json and associated changes to yarn.lock.
  • Adds a script jest:contract to packages.json to run the consumer contract tests.
  • Adds a rake task contracts:merge_requests:pact:verify:suggested_reviewers to run the provider contact tests.

Note: Contract tests don't run in CI yet. Work to enable that will be tracked in #370405 (closed)

Part of gitlab-org/quality/quality-engineering/team-tasks#1410 (closed)

How to set up and validate locally

To run the consumer tests:

yarn install
yarn jest:contract ee/spec/contracts/consumer/specs/project/merge_request/show.spec.js

To run the provider tests:

bundle exec rake contracts:merge_requests:pact:verify:suggested_reviewers 

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mark Lapierre

Merge request reports

Loading