Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom function test cases #1206

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b5f4c72
added tests for customFunctionsEdgeDelivery
Apr 24, 2024
c28d102
changed edge delivery config for test cases
Apr 24, 2024
3c8a133
FORMS-13753 Fixing regression related to dataRef parameter (#1155)
rismehta Apr 2, 2024
55a0bcf
disable exposing view layer for customization (#1156)
barshat7 Apr 2, 2024
8530b50
FORMS-13484: Update the help link for Embed (v2) (#1154)
s1mahanty Apr 3, 2024
dfe32c5
Invalid event customization (#1157)
rismehta Apr 3, 2024
a1a8555
CQ-4348557 adding another div to stop footer getting resized (#1122)
im-shiv Apr 3, 2024
eca9cc9
FORMS-13810: Add the field to allow custom message for format in date…
s1mahanty Apr 4, 2024
2b89ab0
FORMS-13829 Drop Down View not getting updated, even if model is upda…
sakshi-arora1 Apr 4, 2024
5d1e1a4
fixed issue for Persian language (#1162)
devgurjar Apr 4, 2024
2532f2d
Added Aria Invalid attribute (#1149)
pavi41 Apr 9, 2024
4ba0e6d
FORMS-13871 text shouldn't show checkbox for rich text title (#1173)
im-shiv Apr 10, 2024
f059101
datepicker readonly does not work when edit or display format set (#1…
barshat7 Apr 10, 2024
77544d7
FORMS-12667 Update type property on replacing checkboxgroup to radio …
dmaurya929 Apr 10, 2024
7a3862d
FORMS-13760 Date picker display value not working during prefill (#1180)
rismehta Apr 10, 2024
ad32b54
Move core component to 0.13.0 spec version (#1181)
rismehta Apr 11, 2024
3f2eb05
datepicker timezone issue on view layer fixed (#1168)
barshat7 Apr 11, 2024
556a100
Updating spec version to 0.13.0 (#1186)
rismehta Apr 13, 2024
82a2a68
Added condition on description and error message in aria-describedby
Apr 16, 2024
12d0324
FORMS-12203: Added localization changes and test cases (#1152)
shivangimittal791 Apr 17, 2024
a3565a8
FORMS-13851 Support for language in date picker and number input (#1169)
rismehta Apr 18, 2024
3d5e173
FORMS-12822 : format should not be visible when no pattern is selecte…
AnurudraS Apr 22, 2024
7e90adb
FORMS-14013 - Fixing default value check in dropdown (#1199)
TalmizAhmed Apr 23, 2024
ef0453b
Revert "FORMS-14013 - Fixing default value check in dropdown (#1199)"
rismehta Apr 23, 2024
7841e47
FORMS-13209 - Added support for form submission handlers and correcte…
arunattri26 Apr 23, 2024
c707a57
FORMS-13935 update examples for aemcomponents.dev (#1204)
barshat7 Apr 29, 2024
2db297c
FORMS-14013 - Testcase added - Fixing Dropdown that had a selected va…
TalmizAhmed Apr 29, 2024
bc2bea4
Forms 11746 allow attaching same file (#1201)
rajatofficial Apr 29, 2024
64e76c1
Read-only is not working in file-attachment (#1200)
pavi41 Apr 30, 2024
d528c58
Readonly & Disable were not working in TNC component (#1211)
pavi41 May 2, 2024
88807eb
FORMS-14018 - Fix for dropdown not working when enumNames are not pro…
TalmizAhmed May 2, 2024
1947221
Moving to 15860 image (#1212)
rismehta May 2, 2024
b1aa879
FORMS-13811 | Adding rendition for hCaptcha (#1174)
navneet-ag May 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions it/content/src/main/content/META-INF/vault/filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<filter root="/content/experience-fragments" mode="update"/>
<filter root="/content/dam/formsanddocuments/core-components-it" mode="update"/>
<filter root="/conf/global/settings/workflow/models/core-component-it-test" mode="update"/>
<filter root="/conf/global/settings/cloudconfigs/edge-delivery-service-configuration" mode="update"/>
<filter root="/conf/core-components-it" mode="update"/>
<filter root="/conf/wknd" mode="update"/>
<filter root="/conf/datalayerContainer" mode="update"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="sling:Folder"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="cq:Page">
<jcr:content
cq:lastModified="{Date}2024-04-22T09:56:19.511+05:30"
cq:lastModifiedBy="admin"
cq:template="/libs/core/franklin/shell/components/configuration/page/template"
jcr:primaryType="cq:PageContent"
jcr:title="Edge Delivery Service Configuration"
sling:configPropertyInherit="true"
sling:resourceType="core/franklin/shell/components/configuration/page"
auxiliaryScripts="[https://cdn.jsdelivr.net/gh/adobe/universal-editor-cors@latest/dist/universal-editor-embedded.js,module:scripts/editor-support.js]"
edgeHost="preview"
owner="adobe-rnd"
repo="aem-boilerplate-forms"/>
</jcr:root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="sling:Folder"
lcFolder="{Long}0"
type="lcFolder">
<jcr:content
jcr:primaryType="nt:unstructured"
jcr:title="customfunctionedgedelivery"/>
</jcr:root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:dam="http://www.day.com/dam/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:fd="http://www.adobe.com/aemfd/fd/1.0"
jcr:primaryType="dam:Asset">
<jcr:content
cq:conf="\0"
jcr:lastModified="{Date}2023-05-25T17:02:27.993+05:30"
jcr:primaryType="dam:AssetContent"
sling:resourceType="fd/fm/af/render"
guide="1"
type="guide">
<metadata
fd:version="2.1"
jcr:language="en"
jcr:primaryType="nt:unstructured"
xmp:CreatorTool="AEM Forms AF Wizard"
allowedRenderFormat="HTML"
author="admin"
dorType="none"
formmodel="none"
themeRef="/libs/fd/af/themes/canvas"
title="customfunctionedgedelivery"/>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="sling:Folder"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:fd="http://www.adobe.com/aemfd/fd/1.0"
jcr:primaryType="cq:Page">
<jcr:content
cq:deviceGroups="[/etc/mobile/groups/responsive]"
cq:lastModified="{Date}2024-04-22T13:21:45.537+05:30"
cq:lastModifiedBy="admin"
cq:template="/conf/core-components-examples/settings/wcm/templates/af-blank-v2"
jcr:language="en"
jcr:primaryType="cq:PageContent"
jcr:title="CustomFunctionEdgeDelivery"
sling:configRef="/conf/forms/core-components-it/samples/customfunctionedgedelivery/customfunctionedgedelivery/"
sling:resourceType="forms-components-examples/components/page">
<guideContainer
fd:version="2.1"
jcr:primaryType="nt:unstructured"
sling:resourceType="forms-components-examples/components/form/container"
dorType="none"
fieldType="form"
thankYouOption="page"
themeRef="/libs/fd/af/themes/canvas"
title="CustomFunctionEdgeDelivery">
<textinput
jcr:created="{Date}2024-04-22T13:15:32.967+05:30"
jcr:createdBy="admin"
jcr:lastModified="{Date}2024-04-22T13:15:55.362+05:30"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
jcr:title="FirstName"
sling:resourceType="forms-components-examples/components/form/textinput"
enabled="{Boolean}true"
fieldType="text-input"
hideTitle="false"
name="textinput1713771933465"
readOnly="{Boolean}false"
textIsRich="[true,true,true]"
unboundFormElement="{Boolean}false"
visible="{Boolean}true">
<fd:rules
fd:valueCommit="[{&quot;nodeName&quot;:&quot;ROOT&quot;\,&quot;items&quot;:[{&quot;nodeName&quot;:&quot;STATEMENT&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;EVENT_SCRIPTS&quot;\,&quot;items&quot;:[{&quot;nodeName&quot;:&quot;EVENT_CONDITION&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;EVENT_AND_COMPARISON&quot;\,&quot;items&quot;:[{&quot;nodeName&quot;:&quot;COMPONENT&quot;\,&quot;value&quot;:{&quot;id&quot;:&quot;$form.textinput1713771933465&quot;\,&quot;type&quot;:&quot;STRING&quot;\,&quot;name&quot;:&quot;textinput1713771933465&quot;}}\,{&quot;nodeName&quot;:&quot;EVENT_AND_COMPARISON_OPERATOR&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;is changed&quot;\,&quot;value&quot;:null}}\,{&quot;nodeName&quot;:&quot;PRIMITIVE_EXPRESSION&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;STRING_LITERAL&quot;\,&quot;value&quot;:null}}]}\,&quot;nested&quot;:false}\,{&quot;nodeName&quot;:&quot;Then&quot;\,&quot;value&quot;:null}\,{&quot;nodeName&quot;:&quot;BLOCK_STATEMENTS&quot;\,&quot;items&quot;:[{&quot;nodeName&quot;:&quot;BLOCK_STATEMENT&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;SET_VALUE_STATEMENT&quot;\,&quot;items&quot;:[{&quot;nodeName&quot;:&quot;VALUE_FIELD&quot;\,&quot;value&quot;:{&quot;id&quot;:&quot;$form.textinput_19260487031713771941968&quot;\,&quot;displayName&quot;:&quot;FullName&quot;\,&quot;type&quot;:&quot;STRING&quot;\,&quot;displayPath&quot;:&quot;FORM/FullName/&quot;\,&quot;name&quot;:&quot;textinput_19260487031713771941968&quot;\,&quot;parent&quot;:&quot;$form&quot;}}\,{&quot;nodeName&quot;:&quot;to&quot;\,&quot;value&quot;:null}\,{&quot;nodeName&quot;:&quot;EXPRESSION&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;FUNCTION_CALL&quot;\,&quot;parentNodeName&quot;:&quot;EXPRESSION&quot;\,&quot;functionName&quot;:{&quot;id&quot;:&quot;getFullName&quot;\,&quot;displayName&quot;:&quot;Concats first name and last name&quot;\,&quot;type&quot;:&quot;STRING&quot;\,&quot;isDuplicate&quot;:false\,&quot;displayPath&quot;:&quot;&quot;\,&quot;args&quot;:[{&quot;type&quot;:&quot;STRING&quot;\,&quot;name&quot;:&quot;firstname&quot;\,&quot;description&quot;:&quot;in Stringformat&quot;}\,{&quot;type&quot;:&quot;STRING&quot;\,&quot;name&quot;:&quot;lastname&quot;\,&quot;description&quot;:&quot;in Stringformat&quot;}]\,&quot;impl&quot;:&quot;$0($1\,$2)&quot;}\,&quot;params&quot;:[{&quot;nodeName&quot;:&quot;EXPRESSION&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;COMPONENT&quot;\,&quot;value&quot;:{&quot;id&quot;:&quot;$form.textinput1713771933465&quot;\,&quot;displayName&quot;:&quot;FirstName&quot;\,&quot;type&quot;:&quot;STRING&quot;\,&quot;displayPath&quot;:&quot;FORM/FirstName/&quot;\,&quot;name&quot;:&quot;textinput1713771933465&quot;\,&quot;parent&quot;:&quot;$form&quot;}}}\,{&quot;nodeName&quot;:&quot;EXPRESSION&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;COMPONENT&quot;\,&quot;value&quot;:{&quot;id&quot;:&quot;$form.textinput_16975194051713771937311&quot;\,&quot;displayName&quot;:&quot;LastName&quot;\,&quot;type&quot;:&quot;STRING&quot;\,&quot;displayPath&quot;:&quot;FORM/LastName/&quot;\,&quot;name&quot;:&quot;textinput_16975194051713771937311&quot;\,&quot;parent&quot;:&quot;$form&quot;}}}]}}]}}]}]}}]\,&quot;isValid&quot;:true\,&quot;enabled&quot;:true\,&quot;version&quot;:1\,&quot;script&quot;:[&quot;dispatchEvent(textinput_19260487031713771941968\, 'custom:setProperty'\, {value : getFullName($field.$value\,textinput_16975194051713771937311.$value)})&quot;]\,&quot;eventName&quot;:&quot;Value Commit&quot;\,&quot;ruleType&quot;:&quot;&quot;\,&quot;description&quot;:&quot;&quot;}]"
jcr:primaryType="nt:unstructured"
validationStatus="valid"/>
<fd:events
jcr:primaryType="nt:unstructured"
change="[if(contains($event.payload.changes[].propertyName\, 'value')\, dispatchEvent(textinput_19260487031713771941968\, 'custom:setProperty'\, {value : getFullName($field.$value\,textinput_16975194051713771937311.$value)})\, {})]"/>
</textinput>
<textinput_1697519405
jcr:created="{Date}2024-04-22T13:15:37.110+05:30"
jcr:createdBy="admin"
jcr:lastModified="{Date}2024-04-22T13:16:02.569+05:30"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
jcr:title="LastName"
sling:resourceType="forms-components-examples/components/form/textinput"
enabled="{Boolean}true"
fieldType="text-input"
hideTitle="false"
name="textinput_16975194051713771937311"
readOnly="{Boolean}false"
textIsRich="[true,true,true]"
unboundFormElement="{Boolean}false"
visible="{Boolean}true">
<fd:rules
fd:valueCommit="[{&quot;nodeName&quot;:&quot;ROOT&quot;\,&quot;items&quot;:[{&quot;nodeName&quot;:&quot;STATEMENT&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;EVENT_SCRIPTS&quot;\,&quot;items&quot;:[{&quot;nodeName&quot;:&quot;EVENT_CONDITION&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;EVENT_AND_COMPARISON&quot;\,&quot;items&quot;:[{&quot;nodeName&quot;:&quot;COMPONENT&quot;\,&quot;value&quot;:{&quot;id&quot;:&quot;$form.textinput_16975194051713771937311&quot;\,&quot;type&quot;:&quot;STRING&quot;\,&quot;name&quot;:&quot;textinput_16975194051713771937311&quot;}}\,{&quot;nodeName&quot;:&quot;EVENT_AND_COMPARISON_OPERATOR&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;is changed&quot;\,&quot;value&quot;:null}}\,{&quot;nodeName&quot;:&quot;PRIMITIVE_EXPRESSION&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;STRING_LITERAL&quot;\,&quot;value&quot;:null}}]}\,&quot;nested&quot;:false}\,{&quot;nodeName&quot;:&quot;Then&quot;\,&quot;value&quot;:null}\,{&quot;nodeName&quot;:&quot;BLOCK_STATEMENTS&quot;\,&quot;items&quot;:[{&quot;nodeName&quot;:&quot;BLOCK_STATEMENT&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;SET_VALUE_STATEMENT&quot;\,&quot;items&quot;:[{&quot;nodeName&quot;:&quot;VALUE_FIELD&quot;\,&quot;value&quot;:{&quot;id&quot;:&quot;$form.textinput_19260487031713771941968&quot;\,&quot;displayName&quot;:&quot;FullName&quot;\,&quot;type&quot;:&quot;STRING&quot;\,&quot;displayPath&quot;:&quot;FORM/FullName/&quot;\,&quot;name&quot;:&quot;textinput_19260487031713771941968&quot;\,&quot;parent&quot;:&quot;$form&quot;}}\,{&quot;nodeName&quot;:&quot;to&quot;\,&quot;value&quot;:null}\,{&quot;nodeName&quot;:&quot;EXPRESSION&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;FUNCTION_CALL&quot;\,&quot;parentNodeName&quot;:&quot;EXPRESSION&quot;\,&quot;functionName&quot;:{&quot;id&quot;:&quot;getFullName&quot;\,&quot;displayName&quot;:&quot;Concats first name and last name&quot;\,&quot;type&quot;:&quot;STRING&quot;\,&quot;isDuplicate&quot;:false\,&quot;displayPath&quot;:&quot;&quot;\,&quot;args&quot;:[{&quot;type&quot;:&quot;STRING&quot;\,&quot;name&quot;:&quot;firstname&quot;\,&quot;description&quot;:&quot;in Stringformat&quot;}\,{&quot;type&quot;:&quot;STRING&quot;\,&quot;name&quot;:&quot;lastname&quot;\,&quot;description&quot;:&quot;in Stringformat&quot;}]\,&quot;impl&quot;:&quot;$0($1\,$2)&quot;}\,&quot;params&quot;:[{&quot;nodeName&quot;:&quot;EXPRESSION&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;COMPONENT&quot;\,&quot;value&quot;:{&quot;id&quot;:&quot;$form.textinput1713771933465&quot;\,&quot;displayName&quot;:&quot;FirstName&quot;\,&quot;type&quot;:&quot;STRING&quot;\,&quot;displayPath&quot;:&quot;FORM/FirstName/&quot;\,&quot;name&quot;:&quot;textinput1713771933465&quot;\,&quot;parent&quot;:&quot;$form&quot;}}}\,{&quot;nodeName&quot;:&quot;EXPRESSION&quot;\,&quot;choice&quot;:{&quot;nodeName&quot;:&quot;COMPONENT&quot;\,&quot;value&quot;:{&quot;id&quot;:&quot;$form.textinput_16975194051713771937311&quot;\,&quot;displayName&quot;:&quot;LastName&quot;\,&quot;type&quot;:&quot;STRING&quot;\,&quot;displayPath&quot;:&quot;FORM/LastName/&quot;\,&quot;name&quot;:&quot;textinput_16975194051713771937311&quot;\,&quot;parent&quot;:&quot;$form&quot;}}}]}}]}}]}]}}]\,&quot;isValid&quot;:true\,&quot;enabled&quot;:true\,&quot;version&quot;:1\,&quot;script&quot;:[&quot;dispatchEvent(textinput_19260487031713771941968\, 'custom:setProperty'\, {value : getFullName(textinput1713771933465.$value\,$field.$value)})&quot;]\,&quot;eventName&quot;:&quot;Value Commit&quot;\,&quot;ruleType&quot;:&quot;&quot;\,&quot;description&quot;:&quot;&quot;}]"
jcr:primaryType="nt:unstructured"
validationStatus="valid"/>
<fd:events
jcr:primaryType="nt:unstructured"
change="[if(contains($event.payload.changes[].propertyName\, 'value')\, dispatchEvent(textinput_19260487031713771941968\, 'custom:setProperty'\, {value : getFullName(textinput1713771933465.$value\,$field.$value)})\, {})]"/>
</textinput_1697519405>
<textinput_1926048703
jcr:created="{Date}2024-04-22T13:15:41.794+05:30"
jcr:createdBy="admin"
jcr:lastModified="{Date}2024-04-22T13:16:09.535+05:30"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
jcr:title="FullName"
sling:resourceType="forms-components-examples/components/form/textinput"
enabled="{Boolean}true"
fieldType="text-input"
hideTitle="false"
name="textinput_19260487031713771941968"
readOnly="{Boolean}false"
textIsRich="[true,true,true]"
unboundFormElement="{Boolean}false"
visible="{Boolean}true"/>
<numberinput
jcr:created="{Date}2024-04-22T13:15:45.580+05:30"
jcr:createdBy="admin"
jcr:lastModified="{Date}2024-04-22T13:16:30.388+05:30"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
jcr:title="Enter Number"
sling:resourceType="forms-components-examples/components/form/numberinput"
enabled="{Boolean}true"
fieldType="number-input"
hideTitle="false"
name="numberinput1713771945779"
readOnly="{Boolean}false"
textIsRich="[true,true,true]"
type="number"
unboundFormElement="{Boolean}false"
visible="{Boolean}true"/>
</guideContainer>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
*
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2024 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
*/

describe("Form with Number Input", () => {

const pagePath = "content/forms/af/core-components-it/samples/customfunctionedgedelivery/customfunctionedgedelivery.html"
let toggle_array = [];
let formContainer = null

beforeEach(() => {
cy.previewForm(pagePath).then(p => {
formContainer = p;
})
cy.fetchFeatureToggles().then((response) => {
if (response.status === 200) {
toggle_array = response.body.enabled;
}
});
});



it(" fullName field should update on change in first name and last name ", () => {
if(toggle_array.includes("FT_FORMS-11269") && toggle_array.includes("FT_FORMS-12423")) {
Cypress.config('chromeWebSecurity',false);
console.log("cypress security is "+Cypress.config('chromeWebSecurity'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we turning off chromeWebSecurity? Ideally, our tests should mimic real-world scenarios. We should be enabling CORS headers in the URL that serves custom functions.

const firstName = Object.entries(formContainer._fields)[0];
const lastName = Object.entries(formContainer._fields)[1];
const fullName = Object.entries(formContainer._fields)[2];
cy.get(`#${firstName[0]}`).find("input").clear().type("fname").blur().then(x => {
cy.get(`#${lastName[0]}`).find("input").clear().type("lname").blur().then(x => {
cy.get(`#${fullName[0]}`).find("input").should('have.value', 'fname lname')
})
})
}
})

it(" fullNames field should update on change in first name and last name ", () => {
if(toggle_array.includes("FT_FORMS-11269") && toggle_array.includes("FT_FORMS-12423")) {
console.log("cypress security is "+Cypress.config('chromeWebSecurity'));
const firstName = Object.entries(formContainer._fields)[0];
const lastName = Object.entries(formContainer._fields)[1];
const fullName = Object.entries(formContainer._fields)[2];
cy.get(`#${firstName[0]}`).find("input").clear().type("fname").blur().then(x => {
cy.get(`#${lastName[0]}`).find("input").clear().type("lname").blur().then(x => {
cy.get(`#${fullName[0]}`).find("input").should('have.value', 'fname lname')
})
})
}
})

})