-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mostly fix release packaging issues for new screenshot apis.
- Generate kotlin_module files in locations matching maven artifact name, and ensure they are retained in produced .aar/classes.jar to ensure extension functions are recognized - Don't rename ListenableFuture in espresso core - since androidx.test.core uses the actual ListenableFuture dependency - Bump version to prep for next release There is still an issue with the ViewInteraction.captureToImage extension, which gradle does not recognize for an unknown reason. Partially fixes #1139 PiperOrigin-RevId: 400057476
- Loading branch information
1 parent
b2f681d
commit be1b585
Showing
12 changed files
with
94 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
espresso/core/java/androidx/test/espresso/release_jarjar_rules_stage2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rule androidx.test.espresso.core.internal.deps.guava.util.concurrent.ListenableFuture com.google.common.util.concurrent.ListenableFuture |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...esso/core/javatests/androidx/test/espresso/screenshot/ViewInteractionCaptureJavaTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package androidx.test.espresso.screenshot; | ||
|
||
import static androidx.test.espresso.Espresso.onView; | ||
import static androidx.test.espresso.matcher.ViewMatchers.withId; | ||
import static com.google.common.truth.Truth.assertThat; | ||
|
||
import android.graphics.Bitmap; | ||
import androidx.test.core.graphics.BitmapStorage; | ||
import androidx.test.ext.junit.rules.ActivityScenarioRule; | ||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
import androidx.test.ui.app.MainActivity; | ||
import java.io.IOException; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
/** A simple scuba test to ensure captureToImage works from hjava */ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ViewInteractionCaptureJavaTest { | ||
|
||
@Rule | ||
public ActivityScenarioRule<MainActivity> activityScenarioRule = | ||
new ActivityScenarioRule<>(MainActivity.class); | ||
|
||
@Test | ||
public void viewInteractionCapture() throws IOException { | ||
Bitmap bitmap = ViewInteractionCapture.captureToBitmap(onView(withId(R.id.layout))); | ||
|
||
assertThat(bitmap).isNotNull(); | ||
|
||
BitmapStorage.writeToTestStorage(bitmap, "viewInteractionCapture"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters