Skip to content

Releases: open-tool/ultron

Improved framework extensions

19 Mar 22:34
Compare
Choose a tag to compare

27 added withSuitableRoot() extension

It allows to avoid such exception like:

Waited for the root of the view hierarchy to have window focus and not request layout for 10 seconds.

Read wiki to learn more details


28 Simplified framework extension

Take a loot at wiki

2.0.4

31 Dec 12:26
Compare
Choose a tag to compare

Update build tools version to 33.0.1


Add Espresso TextView color assertions:

fun hasCurrentTextColor(@ColorRes colorRes: Int)
fun hasCurrentHintTextColor(@ColorRes colorRes: Int)
fun hasShadowColor(@ColorRes colorRes: Int)
fun hasHighlightColor(@ColorRes colorRes: Int)

For example:

<TextView
    android:id="@+id/last_event_status"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textColor="@color/colorPrimary"
    android:textColorHint="@color/colorHint"
    android:shadowColor="@color/colorShadow"
    android:textColorHighlight="@color/colorHighlight"
    android:text="@string/button_text" />

Could be asserted by

fun assertTextViewColors() {
    withId(R.id.last_event_status)
        .hasCurrentTextColor(R.color.colorPrimary)
        .hasCurrentHintTextColor(R.color.colorHint)
        .hasShadowColor(R.color.colorShadow)
        .hasHighlightColor(R.color.colorHighlight)
}

2.0.3

27 Dec 07:43
Compare
Choose a tag to compare

New cool feature:

  • Custom assertion of any operation - read wiki

New cool exception message.

  • It contains a full history of exceptions that happened during operation performance
  • It provides a detailed an clear information of that's going on wrong.
    (feedback is appreciated)

Simplified Ultron extensions:

If you already have custom operations, you are going to find deprecated methods. Custom operation assertion is not working with deprecated extensions. Please modify your extensions.
It's really easy to support, just delete several lines and use new methods as it's described in samples.

Deleted - EspressoActionType.CUSTOM. In case you use it just delete the line. By default will be used CommonOperationType.DEFAULT.

Compose rule factory methods

07 Sep 11:09
Compare
Choose a tag to compare

Add new methods to create compose rule:

fun createDefaultUltronComposeRule(): ComposeContentTestRule
fun createEmptyUltronComposeRule(): ComposeTestRule

Compose support

03 Sep 13:44
739220b
Compare
Choose a tag to compare

An amazing support of compose UI testing.

Read wike to know how it works

Espresso 3.4.0

03 Sep 13:39
0c80d4a
Compare
Choose a tag to compare

Upd Espresso libs versions to 3.4.0 and also some other libs.

Upd javaCompatibility version to JavaVersion.VERSION_1_8

1.0.18

12 May 19:55
ffdd908
Compare
Choose a tag to compare

#17 Add click actions on different view points:.

  • clickTopLeft(offsetX: Int = 0, offsetY: Int = 0)
  • clickTopCenter(offsetY: Int)
  • clickTopRight(offsetX: Int = 0, offsetY: Int = 0)
  • clickCenterRight(offsetX: Int = 0)
  • clickBottomRight(offsetX: Int = 0, offsetY: Int = 0)
  • clickBottomCenter(offsetY: Int = 0)
  • clickBottomLeft(offsetX: Int = 0, offsetY: Int = 0)
  • clickCenterLeft(offsetX: Int = 0)

Thanks to @flotnik

1.0.17

14 Mar 17:59
Compare
Choose a tag to compare

#15 Fix RecyclerView item search

1.0.16

22 Feb 19:00
Compare
Choose a tag to compare

Features:

  • #14 Add scroll offset param for UltronRecyclerView item providers

scrollOffset: Int = 0 specifies an amount of items that are scrolled from target one.

//affected methods
item(..., scrollOffset: Int = 0): UltronRecyclerViewItem 
firstItemMatched(..., scrollOffset: Int = 0): UltronRecyclerViewItem 
itemMatched(..., scrollOffset: Int = 0): UltronRecyclerViewItem 
lastItemMatched(..., scrollOffset: Int = 0): UltronRecyclerViewItem

getItem(..., scrollOffset: Int = 0): T
getFirstItemMatched(..., scrollOffset: Int = 0): T
getItemMatched(..., scrollOffset: Int = 0): T
getLastItemMatched(..., scrollOffset: Int = 0): T

You don't need to worry about out of range error. In case item position + scrollOffset is greater then RecyclerView size it is scrolled to the last item.

  • #14 Add method for UltronRecyclerView:

assertNotEmpty() throws an exception if RecyclerVIew is empty.

1.0.15

20 Feb 10:10
Compare
Choose a tag to compare

Features:

  • #12 Add exists() assertion for espresso.
    It throws an exception if view doesn't exist in hierarchy.
    Add this method for Matcher<View>, ViewInteraction, DataInteraction

  • #12 Add the name of the rule as description param of ConditionsExecutor.execute method
    Read Add your SetUps and TearDowns to Allure report for details.

Fix:

  • #13 modified item search to avoid

Can't create handler inside thread that has not called Looper.prepare()

This error come from espresso-contrib:3.3.0.