Skip to content

Commit

Permalink
Added Test case for Document of Record generation
Browse files Browse the repository at this point in the history
  • Loading branch information
barshat7 committed Dec 12, 2023
1 parent 5b67e01 commit ca992ab
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ui.tests/test-module/specs/documentOfRecordTest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ describe('Document of Record Test', () => {


it('should download document of record', () => {
cy.window().then($window => {
return cy.window().then($window => {
if($window.guideBridge && $window.guideBridge.isConnected()) {
const bridge = $window.guideBridge;
const data = bridge.getFormModel().exportData();
const formdata = new FormData();
formdata.append("data", JSON.stringify(data));
var requestOptions = {
const data = bridge.getFormModel().exportData();
const formdata = new FormData();
formdata.append("data", JSON.stringify(data));
const requestOptions = {
method: 'POST',
body: formdata,
redirect: 'follow'
};
if (true) {
if (cy.af.isLatestAddon()) {
// use cursor based API if latest AddOn
return getFormId(formPath)
.then(formId => {
fetch(`/adobe/forms/af/dor/${formId}`, requestOptions)
return fetch(`/adobe/forms/af/dor/${formId}`, requestOptions)
.then(response => {
const contentType = response.headers.get('Content-Type');
expect(contentType).to.equal("application/pdf")
Expand Down

0 comments on commit ca992ab

Please sign in to comment.