Skip to content

Commit 7a0feb6

Browse files
brettchabotcopybara-androidxtest
authored andcommitted
Reference doc cleanup.
Fix doc generation warnings by documenting previously missing parameters, fixing links, etc. PiperOrigin-RevId: 597654058
1 parent 106acc8 commit 7a0feb6

File tree

13 files changed

+65
-13
lines changed

13 files changed

+65
-13
lines changed

core/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
**Bug Fixes**
88
Update Activity Scenario reference documentation to fix missing links
99

10+
* Reference doc cleanup - document previously missing parameters, fix links, etc
11+
1012
**New Features**
1113

1214
**Breaking Changes**

core/java/androidx/test/core/app/ActivityScenario.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public static <A extends Activity> ActivityScenario<A> launch(Class<A> activityC
206206

207207
/**
208208
* @see #launch(Class)
209+
* @param activityClass an activity class to launch
209210
* @param activityOptions an activity options bundle to be passed along with the intent to start
210211
* activity.
211212
*/
@@ -241,6 +242,7 @@ public static <A extends Activity> ActivityScenario<A> launch(Intent startActivi
241242
* Launches an activity by a given intent and activity options and constructs ActivityScenario
242243
* with the activity. @see #launch(Intent)
243244
*
245+
* @param startActivityIntent an intent to start the activity
244246
* @param activityOptions an activity options bundle to be passed along with the intent to start
245247
* activity.
246248
*/
@@ -279,6 +281,7 @@ public static <A extends Activity> ActivityScenario<A> launchActivityForResult(
279281
* Launches an activity of a given class and activity options and constructs ActivityScenario with
280282
* the activity. @see #launchActivityForResult(Class)
281283
*
284+
* @param activityClass an activity class to launch
282285
* @param activityOptions an activity options bundle to be passed along with the intent to start
283286
* activity.
284287
*/
@@ -318,6 +321,7 @@ public static <A extends Activity> ActivityScenario<A> launchActivityForResult(
318321
* Launches an activity by a given intent and constructs ActivityScenario with the activity. @see
319322
* #launchActivityForResult(Intent)
320323
*
324+
* @param startActivityIntent an intent to start the activity
321325
* @param activityOptions an activity options bundle to be passed along with the intent to start
322326
* activity.
323327
*/

espresso/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The following artifacts were released:
1818

1919
* Fix typo in AdapterDataLoaderAction error message
2020
* Remove Kotlin collect stdlib calls in Java from espresso
21+
* Reference doc cleanup - document previously missing parameters, fix links, etc
2122

2223
**New Features**
2324

espresso/contrib/java/androidx/test/espresso/contrib/DrawerActions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
/**
3737
* Espresso actions for using a {@link DrawerLayout}.
3838
*
39-
* @see <a href="http://developer.android.com/design/patterns/navigation-drawer.html">Navigation
40-
* drawer design guide</a>
39+
* <p>See <a href="http://developer.android.com/design/patterns/navigation-drawer.html">Navigation
40+
* drawer design guide</a>
4141
*/
4242
public final class DrawerActions {
4343
private static final AtomicInteger nextId = new AtomicInteger();

espresso/contrib/java/androidx/test/espresso/contrib/PickerActions.java

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,22 @@
3030
/**
3131
* Espresso action for interacting with {@link DatePicker} and {@link TimePicker}.
3232
*
33-
* @see <a href="http://developer.android.com/guide/topics/ui/controls/pickers.html">Pickers API
34-
* guide</a>
33+
* <p>See <a href="http://developer.android.com/guide/topics/ui/controls/pickers.html">Pickers API
34+
* guide</a>
3535
*/
3636
public final class PickerActions {
3737

3838
private PickerActions() {
3939
// no Instance
4040
}
4141

42-
/** Returns a {@link ViewAction} that sets a date on a {@link DatePicker}. */
42+
/**
43+
* Returns a {@link ViewAction} that sets a date on a {@link DatePicker}.
44+
*
45+
* @param year The year.
46+
* @param monthOfYear The month which is starting from zero.
47+
* @param dayOfMonth The day of the month.
48+
*/
4349
public static ViewAction setDate(final int year, final int monthOfYear, final int dayOfMonth) {
4450

4551
// monthOfYear which starts with zero in DatePicker widget.
@@ -58,15 +64,19 @@ public String getDescription() {
5864
return "set date";
5965
}
6066

61-
@SuppressWarnings("unchecked")
6267
@Override
6368
public Matcher<View> getConstraints() {
6469
return allOf(isAssignableFrom(DatePicker.class), isDisplayed());
6570
}
6671
};
6772
}
6873

69-
/** Returns a {@link ViewAction} that sets a time on a {@link TimePicker}. */
74+
/**
75+
* Returns a {@link ViewAction} that sets a time on a {@link TimePicker}.
76+
*
77+
* @param hours the hour to set, in the range (0-23).
78+
* @param minutes the minute to set, in the range (0-59).
79+
*/
7080
public static ViewAction setTime(final int hours, final int minutes) {
7181

7282
return new ViewAction() {
@@ -83,7 +93,6 @@ public String getDescription() {
8393
return "set time";
8494
}
8595

86-
@SuppressWarnings("unchecked")
8796
@Override
8897
public Matcher<View> getConstraints() {
8998
return allOf(isAssignableFrom(TimePicker.class), isDisplayed());

espresso/core/java/androidx/test/espresso/DataInteraction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ private DisplayDataMatcher(
236236
*
237237
* @param adapterMatcher matcher that matches an {@link AdapterView}
238238
* @param dataMatcher the data matcher for matching a {@link View} by it's adapter data
239+
* @param rootMatcher matcher for view's root
240+
* @param atPosition optional position of the view to match
239241
* @param adapterViewProtocol the {@link AdapterViewProtocol} used for this data interaction
240242
* @deprecated use {@link #displayDataMatcher(Matcher, Matcher, Matcher, Integer,
241243
* AdapterViewProtocol)} instead.

espresso/core/java/androidx/test/espresso/remote/NoopRemoteInteraction.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ public boolean isRemoteProcess() {
3434
return false;
3535
}
3636

37+
/**
38+
* Creates a callable to run Espresso check interaction on remote processes
39+
*
40+
* @param rootMatcher the root matcher to use.
41+
* @param viewMatcher the view matcher to use.
42+
* @param iBinders a list of binders to pass along to the remote process instance
43+
* @param viewAssertion the view assertion to use.
44+
* @return the created Callable
45+
*/
3746
@Override
3847
public Callable<Void> createRemoteCheckCallable(
3948
Matcher<Root> rootMatcher,
@@ -48,6 +57,15 @@ public Void call() throws Exception {
4857
};
4958
}
5059

60+
/**
61+
* Creates a callable to run Espresso perform interaction on remote processes
62+
*
63+
* @param rootMatcher the root matcher to use.
64+
* @param viewMatcher the view matcher to use.
65+
* @param iBinders a list of binders to pass along to the remote process instance
66+
* @param viewActions one or more actions to execute.
67+
* @return
68+
*/
5169
@Override
5270
public Callable<Void> createRemotePerformCallable(
5371
Matcher<Root> rootMatcher,

espresso/core/java/androidx/test/espresso/remote/RemoteInteraction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public interface RemoteInteraction {
4444
* @param rootMatcher the root matcher to use.
4545
* @param viewMatcher the view matcher to use.
4646
* @param iBinders a list of binders to pass along to the remote process instance
47+
* @param viewAssert the view assertion to use.
4748
* @return a {@link Callable} that will perform the check pending completion of the task.
4849
*/
4950
Callable<Void> createRemoteCheckCallable(
@@ -60,8 +61,8 @@ Callable<Void> createRemoteCheckCallable(
6061
*
6162
* @param rootMatcher the root matcher to use.
6263
* @param viewMatcher the view matcher to use.
63-
* @param viewActions one or more actions to execute.
6464
* @param iBinders a list of binders to pass along to the remote process instance
65+
* @param viewActions one or more actions to execute.
6566
* @return a {@link Callable} that performs the action.
6667
*/
6768
Callable<Void> createRemotePerformCallable(

espresso/intents/java/androidx/test/espresso/intent/Intents.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ public static OngoingStubbing intending(Matcher<Intent> matcher) {
157157
* Intents.init is called.
158158
*
159159
* @param matcher the {@link Matcher} to be applied to captured intents
160-
* @throws AssertionFailedError if the given {@link Matcher} did not match any or matched more
161-
* than one of the recorded intents
160+
* @throws junit.framework.AssertionFailedError if the given {@link Matcher} did not match any or
161+
* matched more than one of the recorded intents
162162
*/
163163
public static void intended(Matcher<Intent> matcher) {
164164
intended(matcher, times(1));
@@ -171,8 +171,9 @@ public static void intended(Matcher<Intent> matcher) {
171171
* that Intents.init is called.
172172
*
173173
* @param matcher the {@link Matcher} to be applied to captured intents
174-
* @throws AssertionFailedError if the given {@link Matcher} did not match the expected number of
175-
* recorded intents
174+
* @param verificationMode the verification mode to use
175+
* @throws junit.framework.AssertionFailedError if the given {@link Matcher} did not match the
176+
* expected number of recorded intents
176177
*/
177178
public static void intended(
178179
final Matcher<Intent> matcher, final VerificationMode verificationMode) {

espresso/remote/java/androidx/test/espresso/remote/EspressoRemote.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,15 @@ public synchronized boolean isRemoteProcess() {
173173
return isRemoteProcess;
174174
}
175175

176+
/**
177+
* Creates a callable to run Espresso check interaction on remote processes
178+
*
179+
* @param rootMatcher the root matcher to use.
180+
* @param viewMatcher the view matcher to use.
181+
* @param iBinders a list of binders to pass along to the remote process instance
182+
* @param viewAssertion the view assertion to use.
183+
* @return the Callable
184+
*/
176185
@Override
177186
public synchronized Callable<Void> createRemoteCheckCallable(
178187
final Matcher<Root> rootMatcher,

0 commit comments

Comments
 (0)