File tree 3 files changed +29
-7
lines changed
dashboard/test/ui/features 3 files changed +29
-7
lines changed Original file line number Diff line number Diff line change @@ -72,5 +72,6 @@ Scenario: Can See App Lab/Game Lab View More Links
72
72
Then I wait until element "#public-gallery" is visible
73
73
Then I wait until element ".ui-project-app-type-area" is in the DOM
74
74
And the project gallery contains 7 project types
75
+ And the project gallery contains 7 view more links
75
76
And element ".ui-project-app-type-area:eq(4)" contains text "View more App Lab projects"
76
77
And element ".ui-project-app-type-area:eq(5)" contains text "View more Game Lab projects"
Original file line number Diff line number Diff line change @@ -19,12 +19,7 @@ Scenario: Public Gallery Shows Expected Project Types
19
19
And element ".ui-project-app-type-area:eq(5)" contains text "Game Lab"
20
20
And element ".ui-project-app-type-area:eq(6)" contains text "Pre-reader"
21
21
22
- Scenario : View More Links Do NOT Show for App Lab and Game Lab
22
+ Scenario : View More Links for App Lab and Game Lab Based on DCDO
23
23
Then I wait until element ".ui-project-app-type-area" is in the DOM
24
24
And the project gallery contains 7 project types
25
- And the project gallery contains 5 view more links
26
- And element ".ui-project-app-type-area:eq(0)" contains text "View more Play Lab projects"
27
- And element ".ui-project-app-type-area:eq(4)" contains text "App Lab"
28
- And element ".ui-project-app-type-area:eq(4)" does not contain text "View more"
29
- And element ".ui-project-app-type-area:eq(5)" contains text "Game Lab"
30
- And element ".ui-project-app-type-area:eq(5)" does not contain text "View more"
25
+ And I confirm correct visibility of view more links
Original file line number Diff line number Diff line change
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 lets us test "view more" link
6
+ # visibility without updating the tests every time we toggle the flag.
7
+ And ( /^I confirm correct visibility of view more links$/ ) do
8
+ dcdo_flag = DCDO . get ( 'image_moderation' , { } ) [ 'limited_project_gallery' ]
9
+ hidden_view_more_links = dcdo_flag . nil? ? true : dcdo_flag
10
+ if hidden_view_more_links
11
+ steps %Q{
12
+ And the project gallery contains 5 view more links
13
+ And element ".ui-project-app-type-area:eq(4)" contains text "App Lab"
14
+ And element ".ui-project-app-type-area:eq(4)" does not contain text "View more"
15
+ And element ".ui-project-app-type-area:eq(5)" contains text "Game Lab"
16
+ And element ".ui-project-app-type-area:eq(5)" does not contain text "View more"
17
+ }
18
+ else
19
+ steps %Q{
20
+ And the project gallery contains 7 view more links
21
+ And element ".ui-project-app-type-area:eq(4)" contains text "View more App Lab projects"
22
+ And element ".ui-project-app-type-area:eq(5)" contains text "View more Game Lab projects"
23
+ }
24
+ end
25
+ end
26
+
1
27
And ( /^I give user "([^"]*)" project validator permission$/ ) do |name |
2
28
require_rails_env
3
29
user = User . find_by_email_or_hashed_email ( @users [ name ] [ :email ] )
You can’t perform that action at this time.
0 commit comments