Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,12 @@
<sly data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}"/>
<sly data-sly-test.useIframe="${form.useIframe != 'false'}">
<sly data-sly-test.formLocaleString="${form.locale || 'en'}"/>
<sly data-sly-set.dataRef="${request.requestParameterMap['dataRef'] ? request.requestParameterMap['dataRef'][0].toString :'' @ context='attribute'}"/>
<sly data-sly-set.wcmmode="${!wcmmode.edit?'wcmmode=DISABLED':''}"/>
<sly data-sly-set.formUrlParams="${wcmmode ? '?':''}${wcmmode}${dataRef ? '&dataRef=' :''}${dataRef}"/>
<iframe title="${form.title}"
role="${form.roleAttribute || ''}"
class="cmp-aemform__iframecontent"
src="${request.contextPath}${resource.path}.iframe.${formLocaleString}.html${formUrlParams}"
width="100%;"
data-form-page-path="${form.formEditPagePath}"></iframe>
<iframe title="${form.title}"
role="${form.roleAttribute || ''}"
class="cmp-aemform__iframecontent"
src="${request.contextPath}${resource.path}.iframe.${formLocaleString}.html?dataRef=${request.requestParameterMap['dataRef'] != null ? request.requestParameterMap['dataRef'][0].toString : '' @ context='attribute'}${!wcmmode.edit ? '&wcmmode={0}':'' @ format=[wcmmode.toString]}"
width="100%;"
data-form-page-path="${form.formEditPagePath}"></iframe>
<sly data-sly-test="${form.useIframe != 'false' && form.height == 'auto'}"
data-sly-call="${clientLib.all @ categories=['core.forms.components.aemform.v2.iframeResizer']}"/>
</sly>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ describe("Sites with Aem Embed Container", () => {
cy.get('.cmp-adaptiveform-container').should('have.length', 1);
cy.get('.cmp-adaptiveform-container').find('.cmp-adaptiveform-textinput__widget').should('have.length', 11);
})

it('Test iframe src with dataRef', () => {
cy.visit(pagePath+"?dataRef='testingDataRef'")
cy.get('.cmp-aemform__iframecontent').should('have.attr', 'src').should('include', "?wcmmode=DISABLED&dataRef='testingDataRef'");
});

it('Test iframe src without dataRef', () => {
cy.get('.cmp-aemform__iframecontent').should('have.attr', 'src').should('include', "?wcmmode=DISABLED");
});
})

context('aem embed container in iframe mode with custom height ', function () {
Expand Down