File tree Expand file tree Collapse file tree 7 files changed +42
-8
lines changed
dashboard/test/ui/features Expand file tree Collapse file tree 7 files changed +42
-8
lines changed Original file line number Diff line number Diff line change 227
227
"react-dom-confetti" : " ^0.0.8" ,
228
228
"react-hot-loader" : " ^1.3.1" ,
229
229
"selectize" : " ^0.12.4" ,
230
+ "wgxpath" : " ^1.2.0" ,
230
231
"whatwg-fetch" : " ^2.0.3"
231
232
}
232
233
}
Original file line number Diff line number Diff line change 2
2
* "Pointer Events Polyfill" to support pointer events on Safari
3
3
*/
4
4
import 'pepjs' ;
5
+ import wickedGoodXpath from 'wgxpath' ;
5
6
6
7
/**
7
8
* A low-performance polyfill for toBlob based on toDataURL. Adapted from:
@@ -32,3 +33,10 @@ if (SVGElement.prototype.getElementsByClassName === undefined) {
32
33
return this . querySelectorAll ( '.' + className ) ;
33
34
} ;
34
35
}
36
+
37
+ /**
38
+ * Polyfill for document.evaluate for IE
39
+ */
40
+ if ( ! document . evaluate ) {
41
+ wickedGoodXpath . install ( window ) ;
42
+ }
Original file line number Diff line number Diff line change @@ -12242,6 +12242,10 @@ websocket-extensions@>=0.1.1:
12242
12242
version "0.1.1"
12243
12243
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7"
12244
12244
12245
+ wgxpath@^1.2.0 :
12246
+ version "1.2.0"
12247
+ resolved "https://registry.yarnpkg.com/wgxpath/-/wgxpath-1.2.0.tgz#a33e4e0f86e68e074d95d50a6e533d64938f432a"
12248
+
12245
12249
whatwg-fetch@>=0.10.0, whatwg-fetch@^2.0.4 :
12246
12250
version "2.0.4"
12247
12251
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f"
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
- @no_ie
2
1
Feature : Sprite Lab
3
2
4
3
Background :
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