summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalmyr Lima <walmyr@gitlab.com>2019-04-29 17:43:15 +0200
committerWalmyr Lima <walmyr@gitlab.com>2019-05-10 15:07:22 -0500
commit645e439bf530b2a294886a29ab1e661596890c75 (patch)
tree283208d14a8182ffae75de0c44a0619e7aedcc81
parent6253502098de2b5f5e94637c74331c49b2abab25 (diff)
downloadgitlab-ce-645e439bf530b2a294886a29ab1e661596890c75.tar.gz
Add skeleton of tests' pre-conditions in the doc
-rw-r--r--qa/docs/WRITING_TESTS_FROM_SCRATCH.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/qa/docs/WRITING_TESTS_FROM_SCRATCH.md b/qa/docs/WRITING_TESTS_FROM_SCRATCH.md
index 81174dc4607..62a86c9b4d2 100644
--- a/qa/docs/WRITING_TESTS_FROM_SCRATCH.md
+++ b/qa/docs/WRITING_TESTS_FROM_SCRATCH.md
@@ -205,6 +205,38 @@ A pre-condition for each test case is defined in the `before : each` block.
For our test cases' examples, what we need to happen is that for every test the issue page is opened, and there is only one scoped label applied to it.
+#### Implementation
+
+In the following code we will focus in the test suite and test cases' pre-conditions:
+
+```ruby
+module QA
+ context 'Plan' do
+ describe 'Editing scoped labels properties on issues' do
+ before :all do
+ # TBD.
+ end
+
+ before :each do
+ # TBD.
+ end
+
+ it 'keeps the latest scoped label when adding a label with the same key of an existing one, but with a different value' do
+ ...
+ end
+
+ it 'keeps both scoped labels when adding a label with a different key' do
+ ...
+ end
+
+ def select_label_and_refresh(label)
+ ...
+ end
+ end
+ end
+end
+```
+
### 6. Test cases using Page Objects
> Page Objects are auto-loaded in the `qa/qa.rb` file and available in all the `*_spec.rb` files.