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

Handle snapshoting private preview methods and improve parameterized test naming #165

Conversation

rbro112
Copy link
Contributor

@rbro112 rbro112 commented May 29, 2024

Fixes private Preview method invocations, using Class.getDeclaredMethod as a fallback to find methods that are hidden in class.methods. We then mark the methods as accessible for invoking with reflection. Confirmed working locally on EmergeTools/nowinandroid#1

Also implements a bit nicer naming for our reflective parameterized tests. It used to just show the index of the test, but now will show something like:

reflectiveComposableInvoker[66 com.google.samples.apps.nowinandroid.feature.settings.PreviewSettingsDialog]

with the unique keyName for the composable snapshot directly in the name, making debug/attribution easier.

Copy link
Contributor Author

rbro112 commented May 29, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @rbro112 and the rest of your teammates on Graphite Graphite

Copy link

emerge-tools bot commented May 29, 2024

📸 Snapshot Test

4 added, 4 removed, 22 unchanged

Name Version Added Removed Modified Unchanged Errored Approval
Emerge snapshots sample
com.emergetools.snapshots.sample.debug
1.0 (1) 4 4 0 22 0 ✅ Approved

🛸 Powered by Emerge Tools

@rbro112 rbro112 merged commit 8c63954 into main May 29, 2024
6 checks passed
@rbro112 rbro112 deleted the ryan/handle_snapshoting_private_preview_methods_and_improve_parameterized_test_naming branch May 29, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants