Skip to content

Make layout testing code pub#2310

Merged
voidpumpkin merged 1 commit into
yewstack:masterfrom
ranile:yew_tests
Dec 28, 2021
Merged

Make layout testing code pub#2310
voidpumpkin merged 1 commit into
yewstack:masterfrom
ranile:yew_tests

Conversation

@ranile
Copy link
Copy Markdown
Member

@ranile ranile commented Dec 28, 2021

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

@ranile ranile added this to the v0.20 milestone Dec 28, 2021
github-actions[bot]
github-actions Bot previously approved these changes Dec 28, 2021
@ranile ranile 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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