File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
selenium/test/pageobjects Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -26,19 +26,22 @@ module.exports = class FeatureFlagsAdminTab extends AdminTab {
2626 }
2727 }
2828
29- async enable ( name ) {
29+ async enable ( name , isExperimental = false ) {
3030 let state = await this . getState ( name )
3131 if ( ! await state . isSelected ( ) ) {
3232 await this . driver . findElement ( this . getParentCheckboxLocator ( name ) ) . click ( )
33- await delay ( 1000 )
34- const dialog = await this . driver . wait (
35- until . elementLocated ( By . css ( 'dialog#ff-exp-dialog[open]' ) ) ,
36- 10000 // 10 seconds timeout
37- ) ;
38-
39- await dialog . findElement ( ACCEPT_ENABLE_EXPERIMENTAL_FEATURE_FLAG ) . click ( )
40- await dialog . findElement ( CONFIRM_ENABLE_EXPERIMENTAL_FEATURE_FLAG ) . click ( )
41- return delay ( 1000 )
33+ if ( isExperimental ) {
34+ await delay ( 1000 )
35+ const dialog = await this . driver . wait (
36+ until . elementLocated ( By . css ( 'dialog#ff-exp-dialog[open]' ) ) ,
37+ 10000 // 10 seconds timeout
38+ )
39+ await dialog . findElement ( ACCEPT_ENABLE_EXPERIMENTAL_FEATURE_FLAG ) . click ( )
40+ await dialog . findElement ( CONFIRM_ENABLE_EXPERIMENTAL_FEATURE_FLAG ) . click ( )
41+ return delay ( 1000 )
42+ } else {
43+ return Promise . resolve ( )
44+ }
4245 } else {
4346 return Promise . resolve ( )
4447 }
You can’t perform that action at this time.
0 commit comments