@@ -22,6 +22,7 @@ const sitesSelectors = require('../../libs/commons/sitesSelectors'),
2222 * Testing FileInput with Sites Editor
2323 */
2424describe ( 'Page - Authoring' , function ( ) {
25+ let toggle_array = [ ] ;
2526 // we can use these values to log in
2627
2728 const dropFileInputInContainer = function ( ) {
@@ -91,6 +92,11 @@ describe('Page - Authoring', function () {
9192 beforeEach ( function ( ) {
9293 // this is done since cypress session results in 403 sometimes
9394 cy . openAuthoring ( pagePath ) ;
95+ cy . fetchFeatureToggles ( ) . then ( ( response ) => {
96+ if ( response . status === 200 ) {
97+ toggle_array = response . body . enabled ;
98+ }
99+ } ) ;
94100 } ) ;
95101
96102 it ( 'insert FileInput in form container' , function ( ) {
@@ -103,6 +109,7 @@ describe('Page - Authoring', function () {
103109 } )
104110
105111 it ( 'verify mime type is disabled when extensions are present' , function ( ) {
112+ if ( toggle_array . includes ( "FT_FORMS-18927" ) ) {
106113 // Setup component
107114 dropFileInputInContainer ( ) ;
108115 cy . openEditableToolbar ( sitesSelectors . overlays . overlay . component + fileInputEditPathSelector ) ;
@@ -122,18 +129,24 @@ describe('Page - Authoring', function () {
122129
123130 cy . get ( '.cq-dialog-cancel' ) . click ( ) ;
124131 cy . deleteComponentByPath ( fileInputDrop ) ;
132+ }
125133 } ) ;
126134 } )
127135
128136 context ( 'Open Sites Editor' , function ( ) {
129- const pagePath = "/content/core-components-examples/library/adaptive-form/fileinput" ,
137+ const pagePath = "/content/core-components-examples/library/adaptive-form/fileinput" ,
130138 fileInputEditPath = pagePath + afConstants . RESPONSIVE_GRID_DEMO_SUFFIX + "/guideContainer/fileinput" ,
131139 fileInputEditPathSelector = "[data-path='" + fileInputEditPath + "']" ,
132140 fileInputDrop = pagePath + afConstants . RESPONSIVE_GRID_DEMO_SUFFIX + '/guideContainer/' + afConstants . components . forms . resourceType . formfileinput . split ( "/" ) . pop ( ) ;
133141
134142 beforeEach ( function ( ) {
135143 // this is done since cypress session results in 403 sometimes
136144 cy . openAuthoring ( pagePath ) ;
145+ cy . fetchFeatureToggles ( ) . then ( ( response ) => {
146+ if ( response . status === 200 ) {
147+ toggle_array = response . body . enabled ;
148+ }
149+ } ) ;
137150 } ) ;
138151
139152 it ( 'insert aem forms FileInput' , function ( ) {
0 commit comments