Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Move test crates into a "testing" folder and add a ui (trybuild) test and ui-test helpers #567

Merged
merged 11 commits into from
Jun 17, 2022

Conversation

jsdw
Copy link
Collaborator

@jsdw jsdw commented Jun 15, 2022

  • move test things into a testing folder to avoid polluting the root too much with test bits.
  • add a ui-tests crate with utils to make it easier to generate metadata and use trybuild to check that it compiles properly (or not).
  • add a few UI tests to prove the concept and test a couple of obvious bits.

@jsdw
Copy link
Collaborator Author

jsdw commented Jun 15, 2022

This will fail until #565 is merged in (as one of the tests is for that failure), but is good to go otherwise.

@jsdw jsdw requested a review from a team June 15, 2022 18:09
pub use metadata_test_runner::MetadataTestRunner;

/// Given some pallet metadata, generate a [`RuntimeMetadataPrefixed`] struct.
/// We default to a duff extrinsic type, and register a fake `DispatchError` type
Copy link
Member

Choose a reason for hiding this comment

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

What is "duff"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Whoops; british slang maybe?! (Every chance I just made it up/misused it too). I just mean that it's no good/made up/naff! I'll tweak the wording!

Copy link
Member

Choose a reason for hiding this comment

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

:) That's awesome to know. TIL: Duff.

Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

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

👍

@@ -0,0 +1,15 @@
[package]
name = "ui-tests"
version = "0.1.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: should we keep in sync with ?

name = "subxt-integration"
version = "0.21.0"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup, good catch!

@jsdw jsdw merged commit 9cf63ba into master Jun 17, 2022
@jsdw jsdw deleted the jsdw-metadata-ui-test-scaffold branch June 17, 2022 13:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants