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

Make layout testing code pub #2310

Merged
merged 1 commit into from Dec 28, 2021
Merged

Conversation

hamza1311
Copy link
Member

Description

This PR exposes the previously private layout_tests module under yew::tests::layout_tests.

Fixes #1413

TODO

  • Documentation
    It would be great if someone can describe the diff_layouts function. I'm can't come up with a way to describe that in docs.

Checklist

  • I have run cargo make pr-flow
  • I have reviewed my own code
  • I have added tests

@hamza1311 hamza1311 added this to the v0.20 milestone Dec 28, 2021
github-actions[bot]
github-actions bot previously approved these changes Dec 28, 2021
@hamza1311 hamza1311 changed the title make layout testing code public Make layout testing code pub Dec 28, 2021
pub expected: &'a str,
}

pub fn diff_layouts(layouts: Vec<TestLayout<'_>>) {
Copy link
Member

Choose a reason for hiding this comment

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

What does layout mean in this context?
From the code it does not seem like it renders anything 🤔

Copy link
Member

Choose a reason for hiding this comment

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

nvm i looked at the tests bellow, this does seem to be comparing html

Copy link
Member

@voidpumpkin voidpumpkin left a comment

Choose a reason for hiding this comment

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

Cool i will definitely use this in the future

@voidpumpkin
Copy link
Member

I think i will open a separate PR to add docs and rename these tests to snapshot tests, so for now I'm merging this in

@voidpumpkin voidpumpkin merged commit c91364b into yewstack:master Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew Area: The main yew crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose component testing code to outsiders
2 participants