diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-04 06:09:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-04 06:09:49 +0300 |
commit | edf27428120b9726e34e577e5b1d3371c74baf1d (patch) | |
tree | 3e59d3def1ef3eb3ce5832f8daf6bbcd09acd841 /qa/spec | |
parent | 73fd5a897364c6f91f86a0dd6d4b566c2574ca6e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/spec')
-rw-r--r-- | qa/spec/support/matchers/have_assignee.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_child_pipeline.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_content.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_design.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_element.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_file_content.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_issue.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_job.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_package.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_pipeline.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_related_issue_item.rb | 15 | ||||
-rw-r--r-- | qa/spec/support/matchers/have_snippet_description.rb | 15 |
12 files changed, 180 insertions, 0 deletions
diff --git a/qa/spec/support/matchers/have_assignee.rb b/qa/spec/support/matchers/have_assignee.rb new file mode 100644 index 00000000000..5e7aa2162b2 --- /dev/null +++ b/qa/spec/support/matchers/have_assignee.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HaveAssignee + RSpec::Matchers.define :have_assignee do |assignee| + match do |page_object| + page_object.has_assignee?(assignee) + end + + match_when_negated do |page_object| + page_object.has_no_assignee?(assignee) + end + end + end +end diff --git a/qa/spec/support/matchers/have_child_pipeline.rb b/qa/spec/support/matchers/have_child_pipeline.rb new file mode 100644 index 00000000000..d05d9d4209a --- /dev/null +++ b/qa/spec/support/matchers/have_child_pipeline.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HaveChildPipeline + RSpec::Matchers.define :have_child_pipeline do + match do |page_object| + page_object.has_child_pipeline? + end + + match_when_negated do |page_object| + page_object.has_no_child_pipeline? + end + end + end +end diff --git a/qa/spec/support/matchers/have_content.rb b/qa/spec/support/matchers/have_content.rb new file mode 100644 index 00000000000..66b30b3b6e4 --- /dev/null +++ b/qa/spec/support/matchers/have_content.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HaveContent + RSpec::Matchers.define :have_content do |content| + match do |page_object| + page_object.has_content?(content) + end + + match_when_negated do |page_object| + page_object.has_no_content?(content) + end + end + end +end diff --git a/qa/spec/support/matchers/have_design.rb b/qa/spec/support/matchers/have_design.rb new file mode 100644 index 00000000000..85f1367297a --- /dev/null +++ b/qa/spec/support/matchers/have_design.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HaveDesign + RSpec::Matchers.define :have_design do |design| + match do |page_object| + page_object.has_design?(design) + end + + match_when_negated do |page_object| + page_object.has_no_design?(design) + end + end + end +end diff --git a/qa/spec/support/matchers/have_element.rb b/qa/spec/support/matchers/have_element.rb new file mode 100644 index 00000000000..bf74a78a3b5 --- /dev/null +++ b/qa/spec/support/matchers/have_element.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HaveElement + RSpec::Matchers.define :have_element do |element, **kwargs| + match do |page_object| + page_object.has_element?(element, **kwargs) + end + + match_when_negated do |page_object| + page_object.has_no_element?(element, **kwargs) + end + end + end +end diff --git a/qa/spec/support/matchers/have_file_content.rb b/qa/spec/support/matchers/have_file_content.rb new file mode 100644 index 00000000000..e42ece6d59e --- /dev/null +++ b/qa/spec/support/matchers/have_file_content.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HaveFileContent + RSpec::Matchers.define :have_file_content do |file_content, file_number| + match do |page_object| + page_object.has_file_content?(file_content, file_number) + end + + match_when_negated do |page_object| + page_object.has_no_file_content?(file_content, file_number) + end + end + end +end diff --git a/qa/spec/support/matchers/have_issue.rb b/qa/spec/support/matchers/have_issue.rb new file mode 100644 index 00000000000..7ef30f22726 --- /dev/null +++ b/qa/spec/support/matchers/have_issue.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HaveIssue + RSpec::Matchers.define :have_issue do |issue| + match do |page_object| + page_object.has_issue?(issue) + end + + match_when_negated do |page_object| + page_object.has_no_issue?(issue) + end + end + end +end diff --git a/qa/spec/support/matchers/have_job.rb b/qa/spec/support/matchers/have_job.rb new file mode 100644 index 00000000000..89829915fce --- /dev/null +++ b/qa/spec/support/matchers/have_job.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HaveJob + RSpec::Matchers.define :have_job do |job| + match do |page_object| + page_object.has_job?(job) + end + + match_when_negated do |page_object| + page_object.has_no_job?(job) + end + end + end +end diff --git a/qa/spec/support/matchers/have_package.rb b/qa/spec/support/matchers/have_package.rb new file mode 100644 index 00000000000..86e9bfee4d1 --- /dev/null +++ b/qa/spec/support/matchers/have_package.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HavePackage + RSpec::Matchers.define :have_package do |package| + match do |page_object| + page_object.has_package?(package) + end + + match_when_negated do |page_object| + page_object.has_no_package?(package) + end + end + end +end diff --git a/qa/spec/support/matchers/have_pipeline.rb b/qa/spec/support/matchers/have_pipeline.rb new file mode 100644 index 00000000000..2bfd49d671a --- /dev/null +++ b/qa/spec/support/matchers/have_pipeline.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HavePipeline + RSpec::Matchers.define :have_pipeline do + match do |page_object| + page_object.has_pipeline? + end + + match_when_negated do |page_object| + page_object.has_no_pipeline? + end + end + end +end diff --git a/qa/spec/support/matchers/have_related_issue_item.rb b/qa/spec/support/matchers/have_related_issue_item.rb new file mode 100644 index 00000000000..89403f2422a --- /dev/null +++ b/qa/spec/support/matchers/have_related_issue_item.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HaveRelatedIssueItem + RSpec::Matchers.define :have_related_issue_item do + match do |page_object| + page_object.has_related_issue_item? + end + + match_when_negated do |page_object| + page_object.has_no_related_issue_item? + end + end + end +end diff --git a/qa/spec/support/matchers/have_snippet_description.rb b/qa/spec/support/matchers/have_snippet_description.rb new file mode 100644 index 00000000000..7c407aefc83 --- /dev/null +++ b/qa/spec/support/matchers/have_snippet_description.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Matchers + module HaveSnippetDescription + RSpec::Matchers.define :have_snippet_description do |description| + match do |page_object| + page_object.has_snippet_description?(description) + end + + match_when_negated do |page_object| + page_object.has_no_snippet_description? + end + end + end +end |