Skip to content

Commit 8bf1456

Browse files
committed
access DCDO flag directly in step_definitions/projects.rb
1 parent 3e5ec1a commit 8bf1456

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

dashboard/test/ui/features/step_definitions/projects.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
require 'dynamic_config/dcdo'
2+
3+
# The "view more" links in the public project gallery for App Lab and Game Lab
4+
# are controlled by DCDO so we can quickly hide them if there are
5+
# inappropriate projects. This enviroment lets us test "view more" link
6+
# visibility without updating the tests every time we toggle the flag.
17
And(/^I confirm correct visibility of view more links$/) do
2-
if ENV['HIDE_VIEW_MORE_LINKS'] == 'true'
8+
hidden_view_more_links = DCDO.get('image_moderation', {})['limited_project_gallery']
9+
if hidden_view_more_links
310
steps %Q{
411
And the project gallery contains 5 view more links
512
And element ".ui-project-app-type-area:eq(4)" contains text "App Lab"

dashboard/test/ui/runner.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -677,12 +677,6 @@ def run_feature(browser, feature, options)
677677
# BrowserStack was reporting Windows 6.0 and 6.1, causing different baselines
678678
run_environment['APPLITOOLS_HOST_OS'] = 'Windows 6x' unless browser['mobile']
679679

680-
# The "view more" links in the public project gallery for App Lab and Game Lab
681-
# are controlled by DCDO so we can quickly hide them if there are
682-
# inappropriate projects. This enviroment lets us test "view more" link
683-
# visibility without updating the tests every time we toggle the flag.
684-
run_environment['HIDE_VIEW_MORE_LINKS'] = DCDO.get('image_moderation', {})['limited_project_gallery'].to_s
685-
686680
max_reruns = how_many_reruns?(test_run_string)
687681

688682
html_log = html_output_filename(test_run_string, options)

0 commit comments

Comments
 (0)