Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Code submission for FLIP fest 'JS Testing Feature: Multiple return values from interaction 30' #57

Merged
merged 32 commits into from
Dec 8, 2021

Conversation

hichana
Copy link
Contributor

@hichana hichana commented Oct 29, 2021

Closes N/A

Description

Our code submission for FLIP fest issue #30 -- changes include:

  • a tuple as the return type from sendTransaction and executeTransaction, which also provides error messaging to other functions in the library that implement them.
  • refactored library internal methods to facilitate the new return types, including jest helper functions
  • refactored tests
  • updated all relevant documentation, including CHANGLOG.md

For contributor use:

  • [x ] Targeted PR against master branch
  • [x ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • [x ] Code follows the standards mentioned here
  • [x ] Updated relevant documentation
  • [x ] Re-reviewed Files changed in the Github PR explorer
  • [n/a ] Added appropriate labels

Copy link
Collaborator

@MaxStalker MaxStalker 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! :)
I've left some comments here and there.

dev-test/utilities.test.js Outdated Show resolved Hide resolved
docs/api.md Outdated Show resolved Hide resolved
docs/api.md Outdated Show resolved Hide resolved
docs/api.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/account.js Outdated Show resolved Hide resolved
src/contract.js Outdated Show resolved Hide resolved
@hichana
Copy link
Contributor Author

hichana commented Nov 3, 2021

Hi @MaxStalker -- thanks for the review. All the changes have been made, but happy to change further if required. Thank you

dev-test/metadata.test.js Outdated Show resolved Hide resolved
dev-test/utilities.test.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/account.js Outdated Show resolved Hide resolved
@hichana
Copy link
Contributor Author

hichana commented Nov 4, 2021

Hi @MaxStalker , I made all suggested changes for the flow-js-testing flip #30. I tried to be as thorough as possible, like making sure all errors were handled correctly and args passed in order to let flow-cadut handle them instead of the flow types lib. All tests pass and everything seems to work well. Latest branch/commit HERE.

I also resolved the merge conflicts within this github PR, and then pulled those changes back to my local master branch. Unfortunately tests are not passing now. I can run my latest work in the branch I pasted above and everything passes, but then running in the now merged version things fail. Please let me know if we can chat to resolve at your earliest convenience. It seems like our work is not aligning with your latest release, which seems to have happened after our initial fork of the library.

@kerrywei kerrywei requested a review from MaxStalker November 4, 2021 17:46
Copy link
Collaborator

@MaxStalker MaxStalker left a comment

Choose a reason for hiding this comment

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

Looks great! 🤩
I would suggest to run npm run prettify to align the code.

@hichana
Copy link
Contributor Author

hichana commented Nov 4, 2021

Ran prettify @MaxStalker!

Copy link
Collaborator

@MaxStalker MaxStalker left a comment

Choose a reason for hiding this comment

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

Some more small tweaks, お願いします 🙇‍♂️

src/interaction.js Outdated Show resolved Hide resolved
src/interaction.js Outdated Show resolved Hide resolved
src/interaction.js Outdated Show resolved Hide resolved
src/interaction.js Outdated Show resolved Hide resolved
@hichana
Copy link
Contributor Author

hichana commented Nov 5, 2021

大丈夫!Thanks for catching that limit disappeared @MaxStalker . Re-added and committed to this PR branch.

Copy link
Collaborator

@MaxStalker MaxStalker left a comment

Choose a reason for hiding this comment

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

お疲れ様です! 🙇

@MaxStalker MaxStalker changed the base branch from master to max/fli-merge December 8, 2021 16:08
@MaxStalker MaxStalker merged commit b7e98aa into onflow:max/fli-merge Dec 8, 2021
MaxStalker pushed a commit that referenced this pull request Dec 8, 2021
* Code submission for FLIP fest 'JS Testing Feature: Multiple return values from interaction 30' (#57)

* squash merge of TeamExponential work for flip 30

* add fixes to final submission requested by Max

* add remaining fixes for Max feedback

* get basic fixes done requested by Max

* update all usage of args for sendTransaction to allow flow-cadut to to resolve types

* update all points where executeScript is used to make sure args used correctly, allowing flow-cadut to resolve

* remove fcl/types

* revert package-lock.json to master plus package.json changes after running `npm install`

* revert ports in tests back to 8080, remove testMatch for 'dev-test' in package.json

* squash merge of latest changes per Max feedback

* make package.json flow-cadut match recent release from Max

* revert package-lock.json to master verion

* update version in package.json to match Max release, run npm install to update package-lock

* ran npm install

* squash merge latest updates/fixes

* replace package-lock.json

* revert package-lock.json

* remove try catch from tests

* remove onflow/types

* remove space

* prettify

* update cadut to release version

* add fix to generated code to mitigate error running tests

* ran prettify

* re-add 'limit' prop and usage in interaction.js

Co-authored-by: justjoolz <[email protected]>
Co-authored-by: Maksim Daunarovich <[email protected]>

* Bump version to next major release

* Add release notes with breaking changes.

Co-authored-by: Matt Chana <[email protected]>
Co-authored-by: justjoolz <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants