summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalmyr <walmyr@gitlab.com>2019-05-23 15:21:54 +0000
committerWalmyr <walmyr@gitlab.com>2019-05-23 15:21:54 +0000
commit9a65c821ec7eebb4d3e605a09f72f4c1e97e2cf0 (patch)
tree9a0bd4edc514593252f881744c6d3b4c58380782
parent1fc3627596c684e3f054d5324a7782a9b9ab182d (diff)
downloadgitlab-ce-docs/improve-writing-tests-doc.tar.gz
Apply suggestion to qa/docs/WRITING_TESTS_FROM_SCRATCH.mddocs/improve-writing-tests-doc
-rw-r--r--qa/docs/WRITING_TESTS_FROM_SCRATCH.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/qa/docs/WRITING_TESTS_FROM_SCRATCH.md b/qa/docs/WRITING_TESTS_FROM_SCRATCH.md
index 3ff71e94c73..309fcc4064c 100644
--- a/qa/docs/WRITING_TESTS_FROM_SCRATCH.md
+++ b/qa/docs/WRITING_TESTS_FROM_SCRATCH.md
@@ -367,7 +367,7 @@ With that in mind, resources can be a project, an epic, an issue, a label, a com
As you saw in the tests' pre-conditions and the optimization sections, we're already creating some of these resources, and we are doing that by calling the `fabricate_via_api!` method.
-> We could be using the `fabricate!` method instead, which would use the `fabricate_via_api!` method if it exists, and fallback to GUI fabrication otherwise, but we recommend being explicit to make it clear what the test does. Also, we recommend fabricating resources via API since this makes tests faster and more reliable, unless the test is focusing in the GUI itself, or there's no GUI coverage for that specific part in any other test.
+> We could be using the `fabricate!` method instead, which would use the `fabricate_via_api!` method if it exists, and fallback to GUI fabrication otherwise, but we recommend being explicit to make it clear what the test does. Also, we recommend fabricating resources via API since this makes tests faster and more reliable, unless the test is focusing on the GUI itself, or there's no GUI coverage for that specific part in any other test.
For our test suite example, the [project resource](https://gitlab.com/gitlab-org/gitlab-ee/blob/d3584e80b4236acdf393d815d604801573af72cc/qa/qa/resource/project.rb#L55) already had a `fabricate_via_api!` method available, while other resources don't have it, so we will have to create them, like for the issue and label resources. Also, we will have to make a small change in the project resource to expose its `id` attribute so that we can refer to it when fabricating the issue.