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
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-29 15:06:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-29 15:06:40 +0300
commitd64e3a8b281d355c7d51d04df52fab407b8cc76d (patch)
tree282d6cc62eacd3fb4a0f6841ae52ae4a709e303f /doc
parent833eadad8cac85b99871842854c9a676a607e2da (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/development/api_graphql_styleguide.md4
-rw-r--r--doc/development/testing_guide/end_to_end/feature_flags.md25
-rw-r--r--doc/development/testing_guide/end_to_end/index.md1
3 files changed, 30 insertions, 0 deletions
diff --git a/doc/development/api_graphql_styleguide.md b/doc/development/api_graphql_styleguide.md
index 05786319d96..f7d45b3882a 100644
--- a/doc/development/api_graphql_styleguide.md
+++ b/doc/development/api_graphql_styleguide.md
@@ -146,6 +146,10 @@ query($project_path: ID!) {
}
```
+To ensure that we get consistent ordering, we will append an ordering on the primary
+key, in descending order. This is usually `id`, so basically we will add `order(id: :desc)`
+to the end of the relation. A primary key _must_ be available on the underlying table.
+
### Exposing permissions for a type
To expose permissions the current user has on a resource, you can call
diff --git a/doc/development/testing_guide/end_to_end/feature_flags.md b/doc/development/testing_guide/end_to_end/feature_flags.md
new file mode 100644
index 00000000000..3238ec716bf
--- /dev/null
+++ b/doc/development/testing_guide/end_to_end/feature_flags.md
@@ -0,0 +1,25 @@
+# Testing with feature flags
+
+To run a specific test with a feature flag enabled you can use the `QA::Runtime::Feature` class to enabled and disable feature flags ([via the API](../../../api/features.md)).
+
+```ruby
+context "with feature flag enabled" do
+ before do
+ Runtime::Feature.enable('feature_flag_name')
+ end
+
+ it "feature flag test" do
+ # Execute a test with a feature flag enabled
+ end
+
+ after do
+ Runtime::Feature.disable('feature_flag_name')
+ end
+end
+```
+
+## Running a scenario with a feature flag enabled
+
+It's also possible to run an entire scenario with a feature flag enabled, without having to edit existing tests or write new ones.
+
+Please see the [QA readme](https://gitlab.com/gitlab-org/gitlab/tree/master/qa#running-tests-with-a-feature-flag-enabled) for details.
diff --git a/doc/development/testing_guide/end_to_end/index.md b/doc/development/testing_guide/end_to_end/index.md
index a9fb4be284e..27470eb2752 100644
--- a/doc/development/testing_guide/end_to_end/index.md
+++ b/doc/development/testing_guide/end_to_end/index.md
@@ -130,6 +130,7 @@ Continued reading:
- [Quick Start Guide](quick_start_guide.md)
- [Style Guide](style_guide.md)
- [Best Practices](best_practices.md)
+- [Testing with feature flags](feature_flags.md)
## Where can I ask for help?