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

[TestHarness] Deprecate testharness #1743

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Conversation

alexvanyo
Copy link
Collaborator

Deprecates testharness with the replacement of DeviceConfigurationOverride.

This PR also replaces the internal usage in some other module's tests, and provides a migration guide to the new methods.

@@ -110,6 +110,7 @@ dependencies {
implementation(libs.androidx.core)
testImplementation(libs.androidx.core)
implementation(libs.kotlin.coroutines.android)
implementation(libs.compose.ui.test)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added for use in the ReplaceWith in the @Deprecated annotation.

@@ -70,6 +70,32 @@ import kotlin.math.floor
* the [isScreenRound] will be left unchanged.
*/
@Composable
@Deprecated(
replaceWith = ReplaceWith(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This isn't a perfect ReplaceWith - the resulting code will likely be far more verbose than necessary, with the assumption that usually only one or a couple parameters were specified, but it brings in the imports and can then be edited down to the important ones.

@alexvanyo alexvanyo marked this pull request as ready for review January 25, 2024 22:51
@bentrengrove
Copy link
Collaborator

This looks good, let me branch off Compose 1.6 before we merge this in though

@bentrengrove bentrengrove merged commit 0d0198d into main Jan 30, 2024
9 checks passed
@bentrengrove bentrengrove deleted the av/deprecate-test-harness branch January 30, 2024 05:37
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.

[Test Harness] Deprecate with replacement of DeviceConfigurationOverride
2 participants