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

Added Test Case for Document of Record generation #1007

Merged
merged 4 commits into from
Dec 12, 2023
Merged

Added Test Case for Document of Record generation #1007

merged 4 commits into from
Dec 12, 2023

Conversation

barshat7
Copy link
Contributor

@barshat7 barshat7 commented Dec 5, 2023

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

*/

describe('Document of Record Test', () => {
const formId = "L2NvbnRlbnQvZm9ybXMvYWYvY29yZS1jb21wb25lbnRzLWl0L3NhbXBsZXMvZG9jdW1lbnQtb2YtcmVjb3JkL2Rvci1mb3Jt";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please get the form id from list forms API, you can check here for reference,

return cy.request("GET", `/adobe/forms/af/listforms?cursor=${cursor}&limit=${limit}`).then(({body}) => {
. formId is an implementation detail and it should not be exposed to customer,

};
if (cy.af.isLatestAddon()) {
// use cursor based API if latest AddOn
getFormId(formPath, "", 20)
Copy link
Collaborator

Choose a reason for hiding this comment

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

you do not need to set a limit

cursor = body.cursor;
return getFormId(path, cursor, limit);
} else {
throw new Error("form not found");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Test case is throwing an error

}

// Use this API if forms addon is old
const getFormIdDeprecated = (path, offset = 0, limit = 20) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove this, it is not required.

Copy link
Collaborator

@rismehta rismehta left a comment

Choose a reason for hiding this comment

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

check comments

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f5ef16a) 80.29% compared to head (6f1b68f) 80.29%.

Additional details and impacted files
@@            Coverage Diff            @@
##                dev    #1007   +/-   ##
=========================================
  Coverage     80.29%   80.29%           
  Complexity      729      729           
=========================================
  Files            89       89           
  Lines          2045     2045           
  Branches        271      271           
=========================================
  Hits           1642     1642           
  Misses          251      251           
  Partials        152      152           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@barshat7 barshat7 requested a review from rismehta December 7, 2023 08:25
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove the thumbnails from the test collateral ?

Copy link
Collaborator

@rismehta rismehta left a comment

Choose a reason for hiding this comment

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

check comments

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

 Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Use list form api to get form Id

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation
@rismehta rismehta merged commit c111101 into dev Dec 12, 2023
4 checks passed
@rismehta rismehta deleted the dor-test branch December 12, 2023 09:40
github-actions bot pushed a commit that referenced this pull request Dec 18, 2023
* Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

 Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Use list form api to get form Id

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

* DOR Test check

* Added Test case for Document of Record generation

* Skipping DOR generation test until DOR enabled in CI
github-actions bot pushed a commit that referenced this pull request Dec 18, 2023
* Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

 Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Use list form api to get form Id

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

* DOR Test check

* Added Test case for Document of Record generation

* Skipping DOR generation test until DOR enabled in CI
github-actions bot pushed a commit that referenced this pull request Dec 19, 2023
* Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

 Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Use list form api to get form Id

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

Added Test Case for Document of Record generation

* DOR Test check

* Added Test case for Document of Record generation

* Skipping DOR generation test until DOR enabled in CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants