Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Hohenner <ahohenner@gitlab.com>2023-07-10 23:55:20 +0300
committerAndy Hohenner <ahohenner@gitlab.com>2023-07-10 23:55:20 +0300
commit2238ac9541edebf1a7e99b4bd0c059dc0c8cd402 (patch)
tree9fb9514897fbda9e6afbc8494f6ecf170be116be
parent8d0c13a1b8f8d7915fd79503edac78d93df5786d (diff)
Simplifying the rulesdoc/test-naming
-rw-r--r--doc/development/testing_guide/end_to_end/test_naming.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/development/testing_guide/end_to_end/test_naming.md b/doc/development/testing_guide/end_to_end/test_naming.md
index 515190333b8..d716daaf7ba 100644
--- a/doc/development/testing_guide/end_to_end/test_naming.md
+++ b/doc/development/testing_guide/end_to_end/test_naming.md
@@ -34,14 +34,15 @@ end
1. Keep descriptions as concise as possible.
1. Long descriptions or multiple conditionals could be a sign it should be split up (additional `context` blocks)
1. The outermost `Rspec.describe` block should be [the DevOps stage name](https://about.gitlab.com/handbook/product/categories/#devops-stages)
-1. Inside that block is a `describe` block with the name of the feature being tested
-1. Inside that block are optional `context` blocks with names that define what the conditions being tested are
+1. Inside the `Rspec.describe` block is a `describe` block with the name of the feature being tested
+1. Optional `context` blocks define what the conditions being tested are
1. `context` blocks descriptions should begin with `when`, `with`, `without`, `for`, `and`, `on`, `in`, `as`, or `if` to match the [rubocop rule](https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording)
-1. The innermost `it` block describes the pass/fail criteria for the test
+1. The `it` block describes the pass/fail criteria for the test
1. In `shared_examples` with a single example a `specify` block can be used instead of a named `it` block
### Conventions flowchart
+
```mermaid
graph TB
rspec_describe{`RSpec.describe`\nis\nDevOps Stage Name?}