Skip to content

Commit 58e07d3

Browse files
test cases fixed
1 parent 396b6cb commit 58e07d3

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv3/basic/.content.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<fileinput7
107107
jcr:primaryType="nt:unstructured"
108108
jcr:title="File Input - 7"
109-
sling:resourceType="core/fd/components/form/fileinput/v2/fileinput"
109+
sling:resourceType="core/fd/components/form/fileinput/v3/fileinput"
110110
accept="[audio/*, video/*, image/*, text/*, application/pdf,.ifc]"
111111
fieldType="file-input"
112112
readOnly="{Boolean}false"

ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const sitesSelectors = require('../../libs/commons/sitesSelectors'),
2222
* Testing FileInput with Sites Editor
2323
*/
2424
describe('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

Comments
 (0)