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

Add Hash Parsing for DSMNY #328

Merged
merged 7 commits into from
Feb 9, 2019
Merged

Add Hash Parsing for DSMNY #328

merged 7 commits into from
Feb 9, 2019

Conversation

pr1sm
Copy link
Collaborator

@pr1sm pr1sm commented Feb 9, 2019

Changes

  • Allow Special Parsing to run when using variants (if site is special)
  • Adjust DSM parser to parse for the hash property scripts
  • Adjust Checkout process to use computed hash (if available)

Checks

  • CI passes
  • Coverage (<2%∆)
  • Manual Checks
    • Check that monitor successfully computes hash
      • Use interactive-mock-server to setup a mock endpoint structure for DSM
      • Adjust ENV to use DsmParser when mock server is used
      • Enable Mock Server and run a task
      • Ensure Hash is properly computed

#314 is partially addressed, DSM US works properly

@pr1sm pr1sm added type:bug Something isn't working area:task-runner Related to Nebula's Task Runner package focus:monitor things involving site monitoring labels Feb 9, 2019
@pr1sm pr1sm added this to the Beta 6 Release milestone Feb 9, 2019
@pr1sm pr1sm requested a review from walmat February 9, 2019 06:09
Copy link
Collaborator Author

@pr1sm pr1sm left a comment

Choose a reason for hiding this comment

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

First pass to get my bearings, I'll make the changes, then remove [WIP] status when I'm done

This commit addresses the following PR changes
- Variant calculation is moved to the correct location (_monitorSpecial)
- findHashProperty has been integrated into parseProductPageForHash
- parseProductPageForHash has been completed and debug logs are added
- dsmParser run method has been implemented to store the hash
- addToCart form parameters have been adjusted to just accept an
  optional hash
- addToCart checkout method now passes the hash along to form method
Copy link
Owner

@walmat walmat left a comment

Choose a reason for hiding this comment

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

Looks good to me!

This commit fixes a bug that prevented DSM US from performing the
hash property calculation. Cheerio Parsing bugs have also been
fixed to get the script text properly.
@pr1sm pr1sm changed the title [WIP] Add Hash Parsing for DSML & DSMNY Add Hash Parsing for DSMNY Feb 9, 2019
@pr1sm
Copy link
Collaborator Author

pr1sm commented Feb 9, 2019

The current method works well for DSM US, I think I'll go ahead and merge this, then make a separate PR for DSML. Since the drop is coming soon, I'll experiment and find a fix, but at least we can release beta 6 knowing DSM US is patched

@pr1sm
Copy link
Collaborator Author

pr1sm commented Feb 9, 2019

merging...

@pr1sm pr1sm merged commit 019638a into b1.0.0-beta.6 Feb 9, 2019
@pr1sm pr1sm deleted the issue_314 branch February 9, 2019 10:17
@pr1sm pr1sm modified the milestones: Beta 6 Release, Beta 5.3 Release Feb 9, 2019
pr1sm added a commit that referenced this pull request Feb 9, 2019
* started working on dsm hash parsing

* reverted funko change until we do more research

* added in backup hashes

* moved variant below special parsing type

* small changes

* Address PR Changes

This commit addresses the following PR changes
- Variant calculation is moved to the correct location (_monitorSpecial)
- findHashProperty has been integrated into parseProductPageForHash
- parseProductPageForHash has been completed and debug logs are added
- dsmParser run method has been implemented to store the hash
- addToCart form parameters have been adjusted to just accept an
  optional hash
- addToCart checkout method now passes the hash along to form method

* Fix Cheerio Parsing

This commit fixes a bug that prevented DSM US from performing the
hash property calculation. Cheerio Parsing bugs have also been
fixed to get the script text properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:task-runner Related to Nebula's Task Runner package focus:monitor things involving site monitoring type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants