-
Notifications
You must be signed in to change notification settings - Fork 108
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
[Request] Per-module metadata #299
Comments
Is there anything wrong with defining multiple showkase roots? I took a brief look at the generation code and it doesn't seem like a super difficult change, so would be happy to try putting together a PR to enable this behaviour, if this is a reasonable change to make. |
@jd565 Thank you for raising this. I have the same requirement where multiple teams would be working in the same repo but in different modules and we want to have separate screenshot test (showkase + paparazzi synergy) coverage for each team. We don't want one team's regression to leak into other team's workflow. But as of now, it's not possible because Showkase aggregates everything from the project. I'd really nice to have this feature! |
@jd565 @iamutkarshtiwari In theory, your project can have multiple |
@vinaygaba We do this in the setup right now so each module has it's own ShowkaseRoot that is used, and it works, but the ShowkaseRoot in module B includes all previews from module A if B depends on A, so each test has some filtering to only include the previews that start with a specific package name to filter out previews from another module |
@jd565 I am using |
We have a multi-module project where we want to use showkase with paparazzi for screenshot testing of previews. Right now the generated metadata from showkase contains a single list of all the showkase previews inside project, with that metadata only available from the root project, meaning that all the screenshot tests have to be run from the root module, or another module that depends on root.
We would find it very useful if each module could have a generated metadata file listing the showkase components in that module, then the root module can aggregate all of them. With this change, each module could contain the screenshot tests for that module, enabling developers to run the screenshot tests in module they have changed while excluding testing modules that haven't changed.
For example:
In a multi-module project e.g.
App
| -> A
| -> B
| -> C
Would have a
Showkase.getMetadata()
function in App (root module), as well as generating aAppModuleShowkaseMetadata
,AModuleShowkaseMetadata
,BModuleShowkaseMetadata
,CModuleShowkaseMetadata
.I did investigate using the
ShowkaseMetadata_x
generated file (which has a list of annotated functions), but those annotations are BINARY retention so can't be used for reflection. This is also generated on a per-file basis while a per-module aggregated file would be useful here.The text was updated successfully, but these errors were encountered: