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
// | |
// TestRailObservation.swift | |
// | |
import Foundation | |
import XCTest | |
class TestRailObservation: NSObject, XCTestObservation { | |
// Add a user / pass or key for testrail generation | |
var testrailUsername: String = "" |
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
@RunWith(AndroidJUnit4::class) | |
class SampleTest { | |
@get:Rule | |
var activityScenarioRule = ActivityScenarioRule(SampleActivity::class.java) | |
@Test | |
fun allCheckBoxesShouldNotBeDisplayed() { | |
onView(withId(R.id.tasksContainer)).check(descendantsWithIdInvisible(R.id.checkbox)) | |
} |
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
public static Matcher<View> withTextColor(final int color) { | |
Checks.checkNotNull(color); | |
return new BoundedMatcher<View, EditText>(EditText.class) { | |
@Override | |
public boolean matchesSafely(EditText warning) { | |
return color == warning.getCurrentTextColor(); | |
} | |
@Override | |
public void describeTo(Description description) { |
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
public class CustomMatchers { | |
public static Matcher<View> withBackground(final int resourceId) { | |
return new TypeSafeMatcher<View>() { | |
@Override | |
public boolean matchesSafely(View view) { | |
return sameBitmap(view.getContext(), view.getBackground(), resourceId); | |
} | |
@Override |