[go: nahoru, domu]

blob: eb10bb0e1a479307e174f84eab7c54516868fb75 [file] [log] [blame]
Nick Anthony726179f2020-06-18 11:38:15 -04001// Signature format: 3.0
2package androidx.ui.test {
3
4 public final class ActionsKt {
Filip Pavlis659ea722020-07-13 14:14:32 +01005 method @Deprecated public static <T extends kotlin.Function<? extends java.lang.Boolean>> void callSemanticsAction(androidx.ui.test.SemanticsNodeInteraction, androidx.ui.semantics.SemanticsPropertyKey<androidx.ui.semantics.AccessibilityAction<T>> key, kotlin.jvm.functions.Function1<? super T,kotlin.Unit> invocation);
6 method @Deprecated public static void callSemanticsAction(androidx.ui.test.SemanticsNodeInteraction, androidx.ui.semantics.SemanticsPropertyKey<androidx.ui.semantics.AccessibilityAction<kotlin.jvm.functions.Function0<java.lang.Boolean>>> key);
7 method @Deprecated public static androidx.ui.test.SemanticsNodeInteraction doClick(androidx.ui.test.SemanticsNodeInteraction);
8 method @Deprecated public static androidx.ui.test.SemanticsNodeInteraction doGesture(androidx.ui.test.SemanticsNodeInteraction, kotlin.jvm.functions.Function1<? super androidx.ui.test.GestureScope,kotlin.Unit> block);
9 method @Deprecated public static androidx.ui.test.SemanticsNodeInteraction doPartialGesture(androidx.ui.test.SemanticsNodeInteraction, kotlin.jvm.functions.Function1<? super androidx.ui.test.PartialGestureScope,kotlin.Unit> block);
10 method @Deprecated public static androidx.ui.test.SemanticsNodeInteraction doScrollTo(androidx.ui.test.SemanticsNodeInteraction);
11 method public static androidx.ui.test.SemanticsNodeInteraction performClick(androidx.ui.test.SemanticsNodeInteraction);
12 method public static androidx.ui.test.SemanticsNodeInteraction performGesture(androidx.ui.test.SemanticsNodeInteraction, kotlin.jvm.functions.Function1<? super androidx.ui.test.GestureScope,kotlin.Unit> block);
13 method public static androidx.ui.test.SemanticsNodeInteraction performPartialGesture(androidx.ui.test.SemanticsNodeInteraction, kotlin.jvm.functions.Function1<? super androidx.ui.test.PartialGestureScope,kotlin.Unit> block);
14 method public static androidx.ui.test.SemanticsNodeInteraction performScrollTo(androidx.ui.test.SemanticsNodeInteraction);
15 method public static <T extends kotlin.Function<? extends java.lang.Boolean>> void performSemanticsAction(androidx.ui.test.SemanticsNodeInteraction, androidx.ui.semantics.SemanticsPropertyKey<androidx.ui.semantics.AccessibilityAction<T>> key, kotlin.jvm.functions.Function1<? super T,kotlin.Unit> invocation);
16 method public static void performSemanticsAction(androidx.ui.test.SemanticsNodeInteraction, androidx.ui.semantics.SemanticsPropertyKey<androidx.ui.semantics.AccessibilityAction<kotlin.jvm.functions.Function0<java.lang.Boolean>>> key);
Nick Anthony726179f2020-06-18 11:38:15 -040017 }
18
19 public final class AnimationClockTestRule implements org.junit.rules.TestRule {
20 ctor public AnimationClockTestRule();
21 method public void advanceClock(long milliseconds);
22 method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description? description);
23 method public androidx.ui.test.TestAnimationClock getClock();
24 method public boolean isPaused();
25 method public void pauseClock();
26 method public void resumeClock();
27 property public final androidx.ui.test.TestAnimationClock clock;
28 property public final boolean isPaused;
29 }
30
31 public final class AssertionsKt {
32 method public static androidx.ui.test.SemanticsNodeInteraction assert(androidx.ui.test.SemanticsNodeInteraction, androidx.ui.test.SemanticsMatcher matcher, kotlin.jvm.functions.Function0<java.lang.String>? messagePrefixOnError = null);
33 method public static androidx.ui.test.SemanticsNodeInteractionCollection assertAll(androidx.ui.test.SemanticsNodeInteractionCollection, androidx.ui.test.SemanticsMatcher matcher);
34 method public static androidx.ui.test.SemanticsNodeInteractionCollection assertAny(androidx.ui.test.SemanticsNodeInteractionCollection, androidx.ui.test.SemanticsMatcher matcher);
35 method public static androidx.ui.test.SemanticsNodeInteractionCollection assertCountEquals(androidx.ui.test.SemanticsNodeInteractionCollection, int expectedSize);
36 method public static androidx.ui.test.SemanticsNodeInteraction assertHasClickAction(androidx.ui.test.SemanticsNodeInteraction);
37 method public static androidx.ui.test.SemanticsNodeInteraction assertHasNoClickAction(androidx.ui.test.SemanticsNodeInteraction);
38 method public static androidx.ui.test.SemanticsNodeInteraction assertIsDisplayed(androidx.ui.test.SemanticsNodeInteraction);
39 method public static androidx.ui.test.SemanticsNodeInteraction assertIsEnabled(androidx.ui.test.SemanticsNodeInteraction);
40 method public static androidx.ui.test.SemanticsNodeInteraction assertIsHidden(androidx.ui.test.SemanticsNodeInteraction);
41 method public static androidx.ui.test.SemanticsNodeInteraction assertIsInMutuallyExclusiveGroup(androidx.ui.test.SemanticsNodeInteraction);
42 method public static androidx.ui.test.SemanticsNodeInteraction assertIsNotDisplayed(androidx.ui.test.SemanticsNodeInteraction);
43 method public static androidx.ui.test.SemanticsNodeInteraction assertIsNotEnabled(androidx.ui.test.SemanticsNodeInteraction);
44 method public static androidx.ui.test.SemanticsNodeInteraction assertIsNotHidden(androidx.ui.test.SemanticsNodeInteraction);
45 method public static androidx.ui.test.SemanticsNodeInteraction assertIsOff(androidx.ui.test.SemanticsNodeInteraction);
46 method public static androidx.ui.test.SemanticsNodeInteraction assertIsOn(androidx.ui.test.SemanticsNodeInteraction);
47 method public static androidx.ui.test.SemanticsNodeInteraction assertIsSelectable(androidx.ui.test.SemanticsNodeInteraction);
48 method public static androidx.ui.test.SemanticsNodeInteraction assertIsSelected(androidx.ui.test.SemanticsNodeInteraction);
49 method public static androidx.ui.test.SemanticsNodeInteraction assertIsToggleable(androidx.ui.test.SemanticsNodeInteraction);
50 method public static androidx.ui.test.SemanticsNodeInteraction assertIsUnselected(androidx.ui.test.SemanticsNodeInteraction);
51 method public static androidx.ui.test.SemanticsNodeInteraction assertLabelEquals(androidx.ui.test.SemanticsNodeInteraction, String value);
52 method public static androidx.ui.test.SemanticsNodeInteraction assertRangeInfoEquals(androidx.ui.test.SemanticsNodeInteraction, androidx.ui.semantics.AccessibilityRangeInfo value);
53 method public static androidx.ui.test.SemanticsNodeInteraction assertTextEquals(androidx.ui.test.SemanticsNodeInteraction, String value);
54 method public static androidx.ui.test.SemanticsNodeInteraction assertValueEquals(androidx.ui.test.SemanticsNodeInteraction, String value);
55 }
56
57 public abstract sealed class BaseGestureScope {
58 }
59
60 public final class BitmapHelpersKt {
61 method public static void assertPixelColor-9bBi3KA(android.graphics.Bitmap, long expected, int x, int y, kotlin.jvm.functions.Function1<? super androidx.ui.graphics.Color,java.lang.String> error = { color -> return "Pixel(" + x + ", " + y + ") expected to be " + expected + ", but was " + color });
62 method public static void assertPixels(android.graphics.Bitmap, androidx.ui.unit.IntSize? expectedSize = null, kotlin.jvm.functions.Function1<? super androidx.ui.unit.IntOffset,androidx.ui.graphics.Color> expectedColorProvider);
63 method public static void assertShape--mmofgM(android.graphics.Bitmap, androidx.ui.unit.Density density, float horizontalPadding, float verticalPadding, long backgroundColor, long shapeColor, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, float shapeOverlapPixelCount = 1.0f);
64 method public static void assertShape-t2RoSCg(android.graphics.Bitmap, androidx.ui.unit.Density density, androidx.ui.graphics.Shape shape, long shapeColor, long backgroundColor, androidx.ui.graphics.Shape backgroundShape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, float sizeX = width.toFloat(), float sizeY = height.toFloat(), float shapeSizeX = sizeX, float shapeSizeY = sizeY, float centerX = width / 2.0, float centerY = height / 2.0, float shapeOverlapPixelCount = 1.0f);
65 method @RequiresApi(android.os.Build.VERSION_CODES.O) public static android.graphics.Bitmap captureToBitmap(androidx.ui.test.SemanticsNodeInteraction);
66 method @RequiresApi(android.os.Build.VERSION_CODES.O) public static android.graphics.Bitmap captureToBitmap(android.view.View);
67 method public static boolean contains(androidx.ui.graphics.Path, androidx.ui.geometry.Offset offset);
68 }
69
70 public final class BoundsAssertionsKt {
71 method public static androidx.ui.test.SemanticsNodeInteraction assertHeightIsAtLeast-Gf70O4E(androidx.ui.test.SemanticsNodeInteraction, float expectedMinHeight);
72 method public static androidx.ui.test.SemanticsNodeInteraction assertHeightIsEqualTo-Gf70O4E(androidx.ui.test.SemanticsNodeInteraction, float expectedHeight);
Filip Pavlisb06d5d92020-06-19 21:12:06 +010073 method public static void assertIsEqualTo-552lcfo(float, float expected, String subject = "", float tolerance = null(0.5));
74 method public static void assertIsNotEqualTo-552lcfo(float, float unexpected, String subject = "", float tolerance = null(0.5));
75 method public static androidx.ui.test.SemanticsNodeInteraction assertLeftPositionInRootIsEqualTo-Gf70O4E(androidx.ui.test.SemanticsNodeInteraction, float expectedTop);
Filip Pavlis0794a7a2020-06-18 22:21:15 +010076 method public static androidx.ui.test.SemanticsNodeInteraction assertPositionInRootIsEqualTo-jINh5Q8(androidx.ui.test.SemanticsNodeInteraction, float expectedLeft, float expectedTop);
Filip Pavlisb06d5d92020-06-19 21:12:06 +010077 method public static androidx.ui.test.SemanticsNodeInteraction assertTopPositionInRootIsEqualTo-Gf70O4E(androidx.ui.test.SemanticsNodeInteraction, float expectedTop);
Nick Anthony726179f2020-06-18 11:38:15 -040078 method public static androidx.ui.test.SemanticsNodeInteraction assertWidthIsAtLeast-Gf70O4E(androidx.ui.test.SemanticsNodeInteraction, float expectedMinWidth);
79 method public static androidx.ui.test.SemanticsNodeInteraction assertWidthIsEqualTo-Gf70O4E(androidx.ui.test.SemanticsNodeInteraction, float expectedWidth);
Filip Pavlis0794a7a2020-06-18 22:21:15 +010080 method public static float getAlignmentLinePosition(androidx.ui.test.SemanticsNodeInteraction, androidx.ui.core.AlignmentLine line);
81 method public static androidx.ui.unit.Bounds getBoundsInRoot(androidx.ui.test.SemanticsNodeInteraction);
Nick Anthony726179f2020-06-18 11:38:15 -040082 }
83
Nick Anthony726179f2020-06-18 11:38:15 -040084 public interface ComposeBenchmarkScope<T> extends androidx.ui.test.ComposeExecutionControl {
85 method public void createTestCase();
86 method public void disposeContent();
87 method public void draw();
88 method public void drawFinish();
89 method public void drawPrepare();
90 method public void emitContent();
91 method public T! getTestCase();
92 method public void invalidateViews();
93 method public void measureWithSpec(int widthSpec, int heightSpec);
94 method public void requestLayout();
95 }
96
97 public final class ComposeBenchmarkScopeKt {
98 method public static <T> void setupContent(androidx.ui.test.ComposeBenchmarkScope<T>);
99 }
100
101 public interface ComposeExecutionControl {
102 method public void capturePreviewPictureToActivity();
103 method public void doFrame();
104 method public void drawToBitmap();
105 method public boolean getDidLastRecomposeHaveChanges();
106 method public int getMeasuredHeight();
107 method public int getMeasuredWidth();
108 method public boolean hasPendingChanges();
109 method public kotlinx.coroutines.Job launchRecomposeIn(kotlinx.coroutines.CoroutineScope coroutineScope);
110 method public void layout();
111 method public void measure();
112 method public void recompose();
113 property public abstract boolean didLastRecomposeHaveChanges;
114 property public abstract int measuredHeight;
115 property public abstract int measuredWidth;
116 }
117
118 public final class ComposeExecutionControlKt {
119 method public static void assertHasPendingChanges(androidx.ui.test.ComposeExecutionControl);
120 method public static void assertLastRecomposeHadChanges(androidx.ui.test.ComposeExecutionControl);
121 method public static void assertLastRecomposeHadNoChanges(androidx.ui.test.ComposeExecutionControl);
122 method public static void assertMeasureSizeIsPositive(androidx.ui.test.ComposeExecutionControl);
123 method public static void assertNoPendingChanges(androidx.ui.test.ComposeExecutionControl);
124 method public static void doFramesAssertAllHadChangesExceptLastOne(androidx.ui.test.ComposeExecutionControl, int numberOfFramesToBeStable);
125 method public static int doFramesUntilNoChangesPending(androidx.ui.test.ComposeExecutionControl, int maxAmountOfFrames = 10);
126 method public static void recomposeAssertHadChanges(androidx.ui.test.ComposeExecutionControl);
127 }
128
129 public interface ComposeTestCase {
130 method @androidx.compose.Composable public void emitContent();
131 }
132
133 public interface ComposeTestCaseSetup {
134 method public void performTestWithEventsControl(kotlin.jvm.functions.Function1<? super androidx.ui.test.ComposeExecutionControl,kotlin.Unit> block);
135 }
136
137 public interface ComposeTestRule extends org.junit.rules.TestRule {
138 method @androidx.ui.test.ExperimentalTesting public androidx.ui.test.ComposeTestCaseSetup forGivenTestCase(androidx.ui.test.ComposeTestCase testCase);
139 method public androidx.ui.test.AnimationClockTestRule getClockTestRule();
140 method public androidx.ui.unit.Density getDensity();
141 method public android.util.DisplayMetrics getDisplayMetrics();
142 method public void setContent(kotlin.jvm.functions.Function0<kotlin.Unit> composable);
143 property public abstract androidx.ui.test.AnimationClockTestRule clockTestRule;
144 property public abstract androidx.ui.unit.Density density;
145 property public abstract android.util.DisplayMetrics displayMetrics;
146 }
147
148 public final class ComposeTestRuleKt {
149 method public static androidx.ui.test.ComposeTestRule createComposeRule(androidx.compose.Recomposer? recomposer = null, boolean disableTransitions = false, boolean disableBlinkingCursor = true);
150 }
151
152 public final class DisableTransitions implements org.junit.rules.TestRule {
153 ctor public DisableTransitions();
154 method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description? description);
155 }
156
157 public final class DisableTransitions.DisableTransitionsStatement extends org.junit.runners.model.Statement {
158 ctor public DisableTransitions.DisableTransitionsStatement(org.junit.runners.model.Statement base);
159 method public void evaluate();
160 }
161
162 public final class ErrorMessagesKt {
163 }
164
165 @kotlin.RequiresOptIn(message="This testing API is experimental and is likely to be changed or removed" + " entirely") public @interface ExperimentalTesting {
166 }
167
168 public final class FiltersKt {
Filip Pavlis659ea722020-07-13 14:14:32 +0100169 method public static androidx.ui.test.SemanticsMatcher hasAnyAncestor(androidx.ui.test.SemanticsMatcher matcher);
170 method public static androidx.ui.test.SemanticsMatcher hasAnyChild(androidx.ui.test.SemanticsMatcher matcher);
171 method public static androidx.ui.test.SemanticsMatcher hasAnyDescendant(androidx.ui.test.SemanticsMatcher matcher);
172 method public static androidx.ui.test.SemanticsMatcher hasAnySibling(androidx.ui.test.SemanticsMatcher matcher);
Nick Anthony726179f2020-06-18 11:38:15 -0400173 method public static androidx.ui.test.SemanticsMatcher hasClickAction();
174 method public static androidx.ui.test.SemanticsMatcher hasImeAction(androidx.ui.input.ImeAction actionType);
175 method public static androidx.ui.test.SemanticsMatcher hasInputMethodsSupport();
176 method public static androidx.ui.test.SemanticsMatcher hasLabel(String label, boolean ignoreCase = false);
177 method public static androidx.ui.test.SemanticsMatcher hasNoClickAction();
178 method public static androidx.ui.test.SemanticsMatcher hasNoScrollAction();
Filip Pavlis659ea722020-07-13 14:14:32 +0100179 method public static androidx.ui.test.SemanticsMatcher hasParent(androidx.ui.test.SemanticsMatcher matcher);
Nick Anthony726179f2020-06-18 11:38:15 -0400180 method public static androidx.ui.test.SemanticsMatcher hasRangeInfo(androidx.ui.semantics.AccessibilityRangeInfo rangeInfo);
181 method public static androidx.ui.test.SemanticsMatcher hasScrollAction();
182 method public static androidx.ui.test.SemanticsMatcher hasSubstring(String substring, boolean ignoreCase = false);
183 method public static androidx.ui.test.SemanticsMatcher hasTestTag(String testTag);
184 method public static androidx.ui.test.SemanticsMatcher hasText(String text, boolean ignoreCase = false);
185 method public static androidx.ui.test.SemanticsMatcher hasValue(String value);
186 method public static androidx.ui.test.SemanticsMatcher isDialog();
187 method public static androidx.ui.test.SemanticsMatcher isEnabled();
188 method public static androidx.ui.test.SemanticsMatcher isHidden();
189 method public static androidx.ui.test.SemanticsMatcher isInMutuallyExclusiveGroup();
190 method public static androidx.ui.test.SemanticsMatcher isNotEnabled();
191 method public static androidx.ui.test.SemanticsMatcher isNotHidden();
192 method public static androidx.ui.test.SemanticsMatcher isOff();
193 method public static androidx.ui.test.SemanticsMatcher isOn();
194 method public static androidx.ui.test.SemanticsMatcher isPopup();
195 method public static androidx.ui.test.SemanticsMatcher isRoot();
196 method public static androidx.ui.test.SemanticsMatcher isSelectable();
197 method public static androidx.ui.test.SemanticsMatcher isSelected();
198 method public static androidx.ui.test.SemanticsMatcher isToggleable();
199 method public static androidx.ui.test.SemanticsMatcher isUnselected();
200 }
201
202 public final class FindersKt {
Filip Pavlis659ea722020-07-13 14:14:32 +0100203 method @Deprecated public static androidx.ui.test.SemanticsNodeInteraction find(androidx.ui.test.SemanticsMatcher matcher, boolean useUnmergedTree = false);
204 method @Deprecated public static androidx.ui.test.SemanticsNodeInteractionCollection findAll(androidx.ui.test.SemanticsMatcher matcher, boolean useUnmergedTree = false);
205 method @Deprecated public static androidx.ui.test.SemanticsNodeInteractionCollection findAllByLabel(String label, boolean ignoreCase = false, boolean useUnmergedTree = false);
206 method @Deprecated public static androidx.ui.test.SemanticsNodeInteractionCollection findAllByTag(String testTag, boolean useUnmergedTree = false);
207 method @Deprecated public static androidx.ui.test.SemanticsNodeInteractionCollection findAllByText(String text, boolean ignoreCase = false, boolean useUnmergedTree = false);
208 method @Deprecated public static androidx.ui.test.SemanticsNodeInteraction findByLabel(String label, boolean ignoreCase = false, boolean useUnmergedTree = false);
209 method @Deprecated public static androidx.ui.test.SemanticsNodeInteraction findBySubstring(String text, boolean ignoreCase = false, boolean useUnmergedTree = false);
210 method @Deprecated public static androidx.ui.test.SemanticsNodeInteraction findByTag(String testTag, boolean useUnmergedTree = false);
211 method @Deprecated public static androidx.ui.test.SemanticsNodeInteraction findByText(String text, boolean ignoreCase = false, boolean useUnmergedTree = false);
212 method @Deprecated public static androidx.ui.test.SemanticsNodeInteraction findRoot(boolean useUnmergedTree = false);
213 method public static androidx.ui.test.SemanticsNodeInteractionCollection onAllNodes(androidx.ui.test.SemanticsMatcher matcher, boolean useUnmergedTree = false);
214 method public static androidx.ui.test.SemanticsNodeInteractionCollection onAllNodesWithLabel(String label, boolean ignoreCase = false, boolean useUnmergedTree = false);
215 method public static androidx.ui.test.SemanticsNodeInteractionCollection onAllNodesWithTag(String testTag, boolean useUnmergedTree = false);
216 method public static androidx.ui.test.SemanticsNodeInteractionCollection onAllNodesWithText(String text, boolean ignoreCase = false, boolean useUnmergedTree = false);
217 method public static androidx.ui.test.SemanticsNodeInteraction onNode(androidx.ui.test.SemanticsMatcher matcher, boolean useUnmergedTree = false);
218 method public static androidx.ui.test.SemanticsNodeInteraction onNodeWithLabel(String label, boolean ignoreCase = false, boolean useUnmergedTree = false);
219 method public static androidx.ui.test.SemanticsNodeInteraction onNodeWithSubstring(String text, boolean ignoreCase = false, boolean useUnmergedTree = false);
220 method public static androidx.ui.test.SemanticsNodeInteraction onNodeWithTag(String testTag, boolean useUnmergedTree = false);
221 method public static androidx.ui.test.SemanticsNodeInteraction onNodeWithText(String text, boolean ignoreCase = false, boolean useUnmergedTree = false);
222 method public static androidx.ui.test.SemanticsNodeInteraction onRoot(boolean useUnmergedTree = false);
Nick Anthony726179f2020-06-18 11:38:15 -0400223 }
224
225 public final class GestureScope extends androidx.ui.test.BaseGestureScope {
226 }
227
228 public final class GestureScopeKt {
Filip Pavlis659ea722020-07-13 14:14:32 +0100229 method public static void cancel(androidx.ui.test.PartialGestureScope);
230 method public static void click(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset position = center);
231 method public static void doubleClick(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset position = center, androidx.ui.unit.Duration delay = androidx.ui.test.GestureScopeKt.doubleClickDelay);
232 method public static void down(androidx.ui.test.PartialGestureScope, int pointerId, androidx.ui.geometry.Offset position);
233 method public static void down(androidx.ui.test.PartialGestureScope, androidx.ui.geometry.Offset position);
Nick Anthony726179f2020-06-18 11:38:15 -0400234 method public static inline float getBottom(androidx.ui.test.BaseGestureScope);
235 method public static androidx.ui.geometry.Offset getBottomCenter(androidx.ui.test.BaseGestureScope);
236 method public static androidx.ui.geometry.Offset getBottomLeft(androidx.ui.test.BaseGestureScope);
237 method public static androidx.ui.geometry.Offset getBottomRight(androidx.ui.test.BaseGestureScope);
238 method public static androidx.ui.geometry.Offset getCenter(androidx.ui.test.BaseGestureScope);
239 method public static androidx.ui.geometry.Offset getCenterLeft(androidx.ui.test.BaseGestureScope);
240 method public static androidx.ui.geometry.Offset getCenterRight(androidx.ui.test.BaseGestureScope);
241 method public static inline float getCenterX(androidx.ui.test.BaseGestureScope);
242 method public static inline float getCenterY(androidx.ui.test.BaseGestureScope);
243 method public static androidx.ui.unit.PxBounds getGlobalBounds(androidx.ui.test.BaseGestureScope);
244 method public static inline int getHeight(androidx.ui.test.BaseGestureScope);
245 method public static inline float getLeft(androidx.ui.test.BaseGestureScope);
246 method public static inline float getRight(androidx.ui.test.BaseGestureScope);
247 method public static androidx.ui.unit.IntSize getSize(androidx.ui.test.BaseGestureScope);
248 method public static inline float getTop(androidx.ui.test.BaseGestureScope);
249 method public static androidx.ui.geometry.Offset getTopCenter(androidx.ui.test.BaseGestureScope);
250 method public static androidx.ui.geometry.Offset getTopLeft(androidx.ui.test.BaseGestureScope);
251 method public static androidx.ui.geometry.Offset getTopRight(androidx.ui.test.BaseGestureScope);
252 method public static inline int getWidth(androidx.ui.test.BaseGestureScope);
253 method public static androidx.ui.geometry.Offset localToGlobal(androidx.ui.test.BaseGestureScope, androidx.ui.geometry.Offset position);
Filip Pavlis659ea722020-07-13 14:14:32 +0100254 method public static void longClick(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset position = center, androidx.ui.unit.Duration duration = androidx.ui.core.gesture.ConstantsKt.LongPressTimeout + 100.milliseconds);
255 method public static void move(androidx.ui.test.PartialGestureScope);
256 method public static void moveBy(androidx.ui.test.PartialGestureScope, int pointerId, androidx.ui.geometry.Offset delta);
257 method public static void moveBy(androidx.ui.test.PartialGestureScope, androidx.ui.geometry.Offset delta);
Nick Anthony726179f2020-06-18 11:38:15 -0400258 method public static void movePointerBy(androidx.ui.test.PartialGestureScope, int pointerId, androidx.ui.geometry.Offset delta);
259 method public static void movePointerTo(androidx.ui.test.PartialGestureScope, int pointerId, androidx.ui.geometry.Offset position);
Filip Pavlis659ea722020-07-13 14:14:32 +0100260 method public static void moveTo(androidx.ui.test.PartialGestureScope, int pointerId, androidx.ui.geometry.Offset position);
261 method public static void moveTo(androidx.ui.test.PartialGestureScope, androidx.ui.geometry.Offset position);
Nick Anthony726179f2020-06-18 11:38:15 -0400262 method public static androidx.ui.geometry.Offset percentOffset(androidx.ui.test.BaseGestureScope, @FloatRange(from=-1.0, to=1.0) float x = 0f, @FloatRange(from=-1.0, to=1.0) float y = 0f);
Filip Pavlis659ea722020-07-13 14:14:32 +0100263 method public static void pinch(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset start0, androidx.ui.geometry.Offset end0, androidx.ui.geometry.Offset start1, androidx.ui.geometry.Offset end1, androidx.ui.unit.Duration duration = 400.milliseconds);
264 method @Deprecated public static void sendCancel(androidx.ui.test.PartialGestureScope);
265 method @Deprecated public static void sendClick(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset position = center);
266 method @Deprecated public static void sendDoubleClick(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset position = center, androidx.ui.unit.Duration delay = androidx.ui.test.GestureScopeKt.doubleClickDelay);
267 method @Deprecated public static void sendDown(androidx.ui.test.PartialGestureScope, int pointerId, androidx.ui.geometry.Offset position);
268 method @Deprecated public static void sendDown(androidx.ui.test.PartialGestureScope, androidx.ui.geometry.Offset position);
269 method @Deprecated public static void sendLongClick(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset position = center, androidx.ui.unit.Duration duration = androidx.ui.core.gesture.ConstantsKt.LongPressTimeout + 100.milliseconds);
270 method @Deprecated public static void sendMove(androidx.ui.test.PartialGestureScope);
271 method @Deprecated public static void sendMoveBy(androidx.ui.test.PartialGestureScope, int pointerId, androidx.ui.geometry.Offset delta);
272 method @Deprecated public static void sendMoveBy(androidx.ui.test.PartialGestureScope, androidx.ui.geometry.Offset delta);
273 method @Deprecated public static void sendMoveTo(androidx.ui.test.PartialGestureScope, int pointerId, androidx.ui.geometry.Offset position);
274 method @Deprecated public static void sendMoveTo(androidx.ui.test.PartialGestureScope, androidx.ui.geometry.Offset position);
275 method @Deprecated public static void sendPinch(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset start0, androidx.ui.geometry.Offset end0, androidx.ui.geometry.Offset start1, androidx.ui.geometry.Offset end1, androidx.ui.unit.Duration duration = 400.milliseconds);
276 method @Deprecated public static void sendSwipe(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset start, androidx.ui.geometry.Offset end, androidx.ui.unit.Duration duration = 200.milliseconds);
277 method @Deprecated public static void sendSwipeDown(androidx.ui.test.GestureScope);
278 method @Deprecated public static void sendSwipeLeft(androidx.ui.test.GestureScope);
279 method @Deprecated public static void sendSwipeRight(androidx.ui.test.GestureScope);
280 method @Deprecated public static void sendSwipeUp(androidx.ui.test.GestureScope);
281 method @Deprecated public static void sendSwipeWithVelocity(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset start, androidx.ui.geometry.Offset end, @FloatRange(from=0.0) float endVelocity, androidx.ui.unit.Duration duration = 200.milliseconds);
282 method @Deprecated public static void sendUp(androidx.ui.test.PartialGestureScope, int pointerId = 0);
283 method public static void swipe(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset start, androidx.ui.geometry.Offset end, androidx.ui.unit.Duration duration = 200.milliseconds);
284 method public static void swipeDown(androidx.ui.test.GestureScope);
285 method public static void swipeLeft(androidx.ui.test.GestureScope);
286 method public static void swipeRight(androidx.ui.test.GestureScope);
287 method public static void swipeUp(androidx.ui.test.GestureScope);
288 method public static void swipeWithVelocity(androidx.ui.test.GestureScope, androidx.ui.geometry.Offset start, androidx.ui.geometry.Offset end, @FloatRange(from=0.0) float endVelocity, androidx.ui.unit.Duration duration = 200.milliseconds);
289 method public static void up(androidx.ui.test.PartialGestureScope, int pointerId = 0);
Nick Anthony726179f2020-06-18 11:38:15 -0400290 }
291
292 public final class KeyInputHelpersKt {
Filip Pavlis659ea722020-07-13 14:14:32 +0100293 method public static boolean performKeyPress(androidx.ui.test.SemanticsNodeInteraction, androidx.ui.core.keyinput.KeyEvent2 keyEvent);
Nick Anthony726179f2020-06-18 11:38:15 -0400294 }
295
296 public final class OutputKt {
Filip Pavlis86dc4df2020-07-07 20:08:33 +0100297 method public static void printToLog(androidx.ui.test.SemanticsNodeInteraction, String tag, @IntRange(from=0) int maxDepth = 2147483647);
298 method public static void printToLog(androidx.ui.test.SemanticsNodeInteractionCollection, String tag, @IntRange(from=0) int maxDepth = 0);
299 method public static String printToString(androidx.ui.test.SemanticsNodeInteraction, @IntRange(from=0) int maxDepth = 2147483647);
300 method public static String printToString(androidx.ui.test.SemanticsNodeInteractionCollection, @IntRange(from=0) int maxDepth = 0);
Nick Anthony726179f2020-06-18 11:38:15 -0400301 }
302
303 public final class PartialGestureScope extends androidx.ui.test.BaseGestureScope {
304 }
305
306 public final class SelectionResult {
307 ctor public SelectionResult(java.util.List<androidx.ui.core.semantics.SemanticsNode> selectedNodes, String? customErrorOnNoMatch);
308 method public String? getCustomErrorOnNoMatch();
309 method public java.util.List<androidx.ui.core.semantics.SemanticsNode> getSelectedNodes();
310 }
311
312 public final class SelectorsKt {
Nick Anthony726179f2020-06-18 11:38:15 -0400313 method public static androidx.ui.test.SemanticsNodeInteractionCollection filter(androidx.ui.test.SemanticsNodeInteractionCollection, androidx.ui.test.SemanticsMatcher matcher);
314 method public static androidx.ui.test.SemanticsNodeInteraction filterToOne(androidx.ui.test.SemanticsNodeInteractionCollection, androidx.ui.test.SemanticsMatcher matcher);
Filip Pavlis659ea722020-07-13 14:14:32 +0100315 method public static androidx.ui.test.SemanticsNodeInteractionCollection onAncestors(androidx.ui.test.SemanticsNodeInteraction);
316 method public static androidx.ui.test.SemanticsNodeInteraction onChild(androidx.ui.test.SemanticsNodeInteraction);
317 method public static androidx.ui.test.SemanticsNodeInteraction onChildAt(androidx.ui.test.SemanticsNodeInteraction, int index);
318 method public static androidx.ui.test.SemanticsNodeInteractionCollection onChildren(androidx.ui.test.SemanticsNodeInteraction);
319 method public static androidx.ui.test.SemanticsNodeInteraction onFirst(androidx.ui.test.SemanticsNodeInteractionCollection);
320 method public static androidx.ui.test.SemanticsNodeInteraction onLast(androidx.ui.test.SemanticsNodeInteractionCollection);
321 method public static androidx.ui.test.SemanticsNodeInteraction onParent(androidx.ui.test.SemanticsNodeInteraction);
322 method public static androidx.ui.test.SemanticsNodeInteraction onSibling(androidx.ui.test.SemanticsNodeInteraction);
323 method public static androidx.ui.test.SemanticsNodeInteractionCollection onSiblings(androidx.ui.test.SemanticsNodeInteraction);
Nick Anthony726179f2020-06-18 11:38:15 -0400324 }
325
326 public final class SemanticsMatcher {
327 ctor public SemanticsMatcher(String description, kotlin.jvm.functions.Function1<? super androidx.ui.core.semantics.SemanticsNode,java.lang.Boolean> matcher);
328 method public infix androidx.ui.test.SemanticsMatcher and(androidx.ui.test.SemanticsMatcher other);
329 method public String getDescription();
330 method public boolean matches(androidx.ui.core.semantics.SemanticsNode node);
331 method public boolean matchesAny(Iterable<androidx.ui.core.semantics.SemanticsNode> nodes);
332 method public operator androidx.ui.test.SemanticsMatcher not();
333 method public infix androidx.ui.test.SemanticsMatcher or(androidx.ui.test.SemanticsMatcher other);
Aurimas Liutikasafd4a792020-06-22 13:35:25 -0700334 field public static final androidx.ui.test.SemanticsMatcher.Companion Companion;
Nick Anthony726179f2020-06-18 11:38:15 -0400335 }
336
337 public static final class SemanticsMatcher.Companion {
338 method public <T> androidx.ui.test.SemanticsMatcher expectValue(androidx.ui.semantics.SemanticsPropertyKey<T> key, T? expectedValue);
Nick Anthony726179f2020-06-18 11:38:15 -0400339 method public <T> androidx.ui.test.SemanticsMatcher keyIsDefined(androidx.ui.semantics.SemanticsPropertyKey<T> key);
340 method public <T> androidx.ui.test.SemanticsMatcher keyNotDefined(androidx.ui.semantics.SemanticsPropertyKey<T> key);
Nick Anthony726179f2020-06-18 11:38:15 -0400341 }
342
343 public final class SemanticsNodeInteraction {
344 method public void assertDoesNotExist();
345 method public androidx.ui.test.SemanticsNodeInteraction assertExists(String? errorMessageOnFail = null);
346 method public androidx.ui.core.semantics.SemanticsNode fetchSemanticsNode(String? errorMessageOnFail = null);
347 }
348
349 public final class SemanticsNodeInteractionCollection {
Alexandre Eliasc6d20b32020-07-02 01:38:15 -0700350 ctor public SemanticsNodeInteractionCollection(internal boolean useUnmergedTree, internal androidx.ui.test.SemanticsSelector selector);
Nick Anthony726179f2020-06-18 11:38:15 -0400351 method public java.util.List<androidx.ui.core.semantics.SemanticsNode> fetchSemanticsNodes(String? errorMessageOnFail = null);
352 method public operator androidx.ui.test.SemanticsNodeInteraction get(int index);
353 }
354
355 public final class SemanticsSelector {
356 ctor public SemanticsSelector(String description, boolean requiresExactlyOneNode, androidx.ui.test.SemanticsSelector? chainedInputSelector, kotlin.jvm.functions.Function1<? super java.lang.Iterable<androidx.ui.core.semantics.SemanticsNode>,androidx.ui.test.SelectionResult> selector);
357 method public String getDescription();
358 method public androidx.ui.test.SelectionResult map(Iterable<androidx.ui.core.semantics.SemanticsNode> nodes, String errorOnFail);
359 }
360
361 public final class SemanticsSelectorKt {
362 }
363
Nick Anthony726179f2020-06-18 11:38:15 -0400364 public final class StateRestorationTester {
365 ctor public StateRestorationTester(androidx.ui.test.ComposeTestRule composeTestRule);
366 method public void emulateSavedInstanceStateRestore();
367 method public void setContent(kotlin.jvm.functions.Function0<kotlin.Unit> composable);
368 }
369
370 public final class SynchronizationKt {
Filip Pavlisa4d73a52020-07-14 11:30:00 +0100371 method public static <T> T! runOnIdle(kotlin.jvm.functions.Function0<? extends T> action);
372 method @Deprecated public static <T> T! runOnIdleCompose(kotlin.jvm.functions.Function0<? extends T> action);
Nick Anthony726179f2020-06-18 11:38:15 -0400373 method public static <T> T! runOnUiThread(kotlin.jvm.functions.Function0<? extends T> action);
374 method public static void waitForIdle();
375 }
376
377 public interface TestAnimationClock extends androidx.animation.AnimationClockObservable {
378 method public void advanceClock(long milliseconds);
379 method public boolean isIdle();
380 method public boolean isPaused();
381 method public void pauseClock();
382 method public void resumeClock();
383 property public abstract boolean isIdle;
384 property public abstract boolean isPaused;
385 }
386
387 public final class TextActionsKt {
Filip Pavlis659ea722020-07-13 14:14:32 +0100388 method @Deprecated public static void doClearText(androidx.ui.test.SemanticsNodeInteraction, boolean alreadyHasFocus = false);
389 method @Deprecated public static void doReplaceText(androidx.ui.test.SemanticsNodeInteraction, String text, boolean alreadyHasFocus = false);
390 method @Deprecated public static void doSendImeAction(androidx.ui.test.SemanticsNodeInteraction, boolean alreadyHasFocus = false);
391 method @Deprecated public static void doSendText(androidx.ui.test.SemanticsNodeInteraction, String text, boolean alreadyHasFocus = false);
392 method public static void performImeAction(androidx.ui.test.SemanticsNodeInteraction, boolean alreadyHasFocus = false);
393 method public static void performTextClearance(androidx.ui.test.SemanticsNodeInteraction, boolean alreadyHasFocus = false);
394 method public static void performTextInput(androidx.ui.test.SemanticsNodeInteraction, String text, boolean alreadyHasFocus = false);
395 method public static void performTextReplacement(androidx.ui.test.SemanticsNodeInteraction, String text, boolean alreadyHasFocus = false);
Nick Anthony726179f2020-06-18 11:38:15 -0400396 }
397
398}
399
400package androidx.ui.test.android {
401
402 public final class AndroidComposeTestCaseRunnerKt {
403 method public static <T extends androidx.ui.test.ComposeTestCase> androidx.ui.test.ComposeBenchmarkScope<T> createAndroidComposeBenchmarkRunner(kotlin.jvm.functions.Function0<? extends T> testCaseFactory, androidx.activity.ComponentActivity activity);
404 }
405
406 public final class AndroidComposeTestCaseSetup implements androidx.ui.test.ComposeTestCaseSetup {
407 ctor public AndroidComposeTestCaseSetup(androidx.ui.test.ComposeTestCase testCase, androidx.activity.ComponentActivity activity);
408 method public void performTestWithEventsControl(kotlin.jvm.functions.Function1<? super androidx.ui.test.ComposeExecutionControl,kotlin.Unit> block);
409 }
410
411 public final class AndroidComposeTestRule<T extends androidx.activity.ComponentActivity> implements androidx.ui.test.ComposeTestRule {
412 ctor public AndroidComposeTestRule(androidx.test.ext.junit.rules.ActivityScenarioRule<T> activityRule, androidx.compose.Recomposer? recomposer, boolean disableTransitions, boolean disableBlinkingCursor);
413 method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description? description);
414 method @androidx.ui.test.ExperimentalTesting public androidx.ui.test.ComposeTestCaseSetup forGivenTestCase(androidx.ui.test.ComposeTestCase testCase);
415 method public androidx.test.ext.junit.rules.ActivityScenarioRule<T> getActivityRule();
416 method public androidx.ui.test.AnimationClockTestRule getClockTestRule();
417 method public androidx.ui.unit.Density getDensity();
418 method public android.util.DisplayMetrics getDisplayMetrics();
419 method public androidx.compose.Recomposer? getRecomposer();
420 method public void setContent(kotlin.jvm.functions.Function0<kotlin.Unit> composable);
421 property public androidx.ui.test.AnimationClockTestRule clockTestRule;
422 property public androidx.ui.unit.Density density;
423 property public android.util.DisplayMetrics displayMetrics;
424 }
425
426 public final class AndroidComposeTestRule.AndroidComposeStatement extends org.junit.runners.model.Statement {
427 ctor public AndroidComposeTestRule.AndroidComposeStatement(org.junit.runners.model.Statement base);
428 method public void evaluate();
429 }
430
431 public final class AndroidComposeTestRuleKt {
432 method public static inline <reified T extends androidx.activity.ComponentActivity> androidx.ui.test.android.AndroidComposeTestRule<T>! AndroidComposeTestRule(androidx.compose.Recomposer? recomposer = null, boolean disableTransitions = false, boolean disableBlinkingCursor = true);
433 }
434
435 public final class ComposeIdlingResourceKt {
436 method public static void registerComposeWithEspresso();
437 method public static void registerTestClock(androidx.ui.test.TestAnimationClock clock);
438 method public static void unregisterComposeFromEspresso();
439 method public static void unregisterTestClock(androidx.ui.test.TestAnimationClock clock);
440 }
441
Filip Pavlisd8a0b6f2020-07-01 15:17:33 +0100442 public final class ComposeNotIdleException extends java.lang.Throwable {
443 ctor public ComposeNotIdleException(String? message, Throwable? cause);
444 }
445
Nick Anthony726179f2020-06-18 11:38:15 -0400446 public final class WindowCaptureKt {
447 }
448
449}
450
451package androidx.ui.test.android.fake {
452
453 public final class FakeViewStructureKt {
454 }
455
456}
457