diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 15:12:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 15:12:17 +0000 |
commit | c48bbe6650648fa034696de25983418981e695eb (patch) | |
tree | 0dcf30de46ba62585746d9e5f8fa6ceb52df7d28 /doc/development/testing_guide/end_to_end | |
parent | c7b2529418eb0fb802637709eafe8016a4d106b0 (diff) | |
download | gitlab-ce-c48bbe6650648fa034696de25983418981e695eb.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/testing_guide/end_to_end')
-rw-r--r-- | doc/development/testing_guide/end_to_end/best_practices.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/development/testing_guide/end_to_end/best_practices.md b/doc/development/testing_guide/end_to_end/best_practices.md index bfda94b1f1d..b17ca9e6f8f 100644 --- a/doc/development/testing_guide/end_to_end/best_practices.md +++ b/doc/development/testing_guide/end_to_end/best_practices.md @@ -62,13 +62,13 @@ In those and similar cases we need to include the test case link by other means. To illustrate, there are two tests in the shared examples in [`qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb): ```ruby -shared_examples 'unselected maintainer' do |testcase| +RSpec.shared_examples 'unselected maintainer' do |testcase| it 'user fails to push', testcase: testcase do ... end end -shared_examples 'selected developer' do |testcase| +RSpec.shared_examples 'selected developer' do |testcase| it 'user pushes and merges', testcase: testcase do ... end @@ -415,7 +415,7 @@ except(page).to have_no_text('hidden') Unfortunately, that's not automatically the case for the predicate methods that we add to our [page objects](page_objects.md). We need to [create our own negatable matchers](https://relishapp.com/rspec/rspec-expectations/v/3-9/docs/custom-matchers/define-a-custom-matcher#matcher-with-separate-logic-for-expect().to-and-expect().not-to). -The initial example uses the `have_job` matcher which is derived from the +The initial example uses the `have_job` matcher which is derived from the [`has_job?` predicate method of the `Page::Project::Pipeline::Show` page object](https://gitlab.com/gitlab-org/gitlab/-/blob/87864b3047c23b4308f59c27a3757045944af447/qa/qa/page/project/pipeline/show.rb#L53). To create a negatable matcher, we use `has_no_job?` for the negative case: |