-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
213 changed files
with
1,529 additions
and
77 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
38 changes: 38 additions & 0 deletions
38
app/src/androidTest/java/com/android_g/egg/PlatLogoActivityTest.kt
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,38 @@ | ||
package com.android_g.egg | ||
|
||
|
||
import android.widget.ImageView | ||
import androidx.test.espresso.Espresso.onView | ||
import androidx.test.espresso.Espresso.pressBack | ||
import androidx.test.espresso.action.ViewActions.click | ||
import androidx.test.espresso.assertion.ViewAssertions.matches | ||
import androidx.test.espresso.matcher.ViewMatchers.* | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import androidx.test.filters.LargeTest | ||
import com.dede.android_eggs.EasterEggsActivityBaseTest | ||
import com.dede.android_eggs.R | ||
import org.hamcrest.Matchers.* | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
/** | ||
* Android Gingerbread PlatLogoActivity test | ||
*/ | ||
@LargeTest | ||
@RunWith(AndroidJUnit4::class) | ||
class PlatLogoActivityTest : EasterEggsActivityBaseTest() { | ||
|
||
@Test | ||
fun platLogoActivityTest() { | ||
|
||
testPlatLogo(R.string.title_android_g) | ||
|
||
onView(allOf(withId(android.R.id.content), | ||
withChild(`is`(instanceOf(ImageView::class.java))))) | ||
.check(matches(isDisplayed())) | ||
.perform(click()) | ||
|
||
pressBack() | ||
} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
app/src/androidTest/java/com/android_h/egg/PlatLogoActivityTest.kt
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,38 @@ | ||
package com.android_h.egg | ||
|
||
|
||
import android.widget.ImageView | ||
import androidx.test.espresso.Espresso.onView | ||
import androidx.test.espresso.Espresso.pressBack | ||
import androidx.test.espresso.action.ViewActions.click | ||
import androidx.test.espresso.assertion.ViewAssertions.matches | ||
import androidx.test.espresso.matcher.ViewMatchers.* | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import androidx.test.filters.LargeTest | ||
import com.dede.android_eggs.EasterEggsActivityBaseTest | ||
import com.dede.android_eggs.R | ||
import org.hamcrest.Matchers.* | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
/** | ||
* Android Honeycomb PlatLogo test | ||
*/ | ||
@LargeTest | ||
@RunWith(AndroidJUnit4::class) | ||
class PlatLogoActivityTest : EasterEggsActivityBaseTest() { | ||
|
||
@Test | ||
fun platLogoActivityTest() { | ||
|
||
testPlatLogo(R.string.title_android_h) | ||
|
||
onView(allOf(withId(android.R.id.content), | ||
withChild(`is`(instanceOf(ImageView::class.java))))) | ||
.check(matches(isDisplayed())) | ||
.perform(click()) | ||
|
||
pressBack() | ||
} | ||
|
||
} |
74 changes: 74 additions & 0 deletions
74
app/src/androidTest/java/com/android_i/egg/PlatLogoActivityTest.kt
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,74 @@ | ||
package com.android_i.egg | ||
|
||
|
||
import android.view.InputDevice | ||
import android.view.MotionEvent | ||
import android.view.View | ||
import android.view.ViewConfiguration | ||
import android.widget.ImageView | ||
import androidx.test.espresso.Espresso.onView | ||
import androidx.test.espresso.Espresso.pressBack | ||
import androidx.test.espresso.UiController | ||
import androidx.test.espresso.ViewAction | ||
import androidx.test.espresso.action.GeneralLocation | ||
import androidx.test.espresso.action.MotionEvents | ||
import androidx.test.espresso.action.Press | ||
import androidx.test.espresso.assertion.ViewAssertions.matches | ||
import androidx.test.espresso.matcher.ViewMatchers.* | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import androidx.test.filters.LargeTest | ||
import com.dede.android_eggs.EasterEggsActivityBaseTest | ||
import com.dede.android_eggs.R | ||
import org.hamcrest.Matcher | ||
import org.hamcrest.Matchers.* | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
/** | ||
* Android Ice Cream Sandwich PlatLogo test | ||
*/ | ||
@LargeTest | ||
@RunWith(AndroidJUnit4::class) | ||
class PlatLogoActivityTest : EasterEggsActivityBaseTest() { | ||
|
||
@Test | ||
fun platLogoActivityTest() { | ||
|
||
testPlatLogo(R.string.title_android_i) | ||
|
||
// PlatLogoActivity | ||
onView(allOf(withId(android.R.id.content), | ||
withChild(`is`(instanceOf(ImageView::class.java))))) | ||
.check(matches(isDisplayed())) | ||
.perform(object : ViewAction { | ||
override fun getConstraints(): Matcher<View> { | ||
return isDisplayingAtLeast(90) | ||
} | ||
|
||
override fun getDescription(): String { | ||
return "MotionEvent down" | ||
} | ||
|
||
override fun perform(uiController: UiController, view: View) { | ||
MotionEvents.sendDown( | ||
uiController, | ||
GeneralLocation.CENTER.calculateCoordinates(view), | ||
Press.FINGER.describePrecision(), | ||
InputDevice.SOURCE_UNKNOWN, | ||
MotionEvent.BUTTON_PRIMARY | ||
) | ||
// launch Nyandroid | ||
uiController.loopMainThreadForAtLeast(ViewConfiguration.getLongPressTimeout() * 2 * 3L) | ||
} | ||
}) | ||
|
||
// Nyandroid | ||
onView(allOf(withId(android.R.id.content), | ||
withChild(`is`(instanceOf(Nyandroid.Board::class.java))))) | ||
.check(matches(isDisplayed())) | ||
|
||
// popup | ||
pressBack() | ||
} | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
app/src/androidTest/java/com/android_j/egg/PlatLogoActivityTest.kt
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,41 @@ | ||
package com.android_j.egg | ||
|
||
|
||
import android.widget.ImageView | ||
import androidx.test.espresso.Espresso.onView | ||
import androidx.test.espresso.Espresso.pressBack | ||
import androidx.test.espresso.action.ViewActions.click | ||
import androidx.test.espresso.action.ViewActions.longClick | ||
import androidx.test.espresso.assertion.ViewAssertions.matches | ||
import androidx.test.espresso.matcher.ViewMatchers.* | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import androidx.test.filters.LargeTest | ||
import com.dede.android_eggs.EasterEggsActivityBaseTest | ||
import com.dede.android_eggs.R | ||
import org.hamcrest.Matchers.* | ||
import org.junit.Ignore | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
/** | ||
* Android Jelly Bean PlatLogo test | ||
*/ | ||
@LargeTest | ||
@RunWith(AndroidJUnit4::class) | ||
class PlatLogoActivityTest : EasterEggsActivityBaseTest() { | ||
|
||
@Test | ||
@Ignore("Failed on Gradle Managed Devices") | ||
fun platLogoActivityTest() { | ||
|
||
testPlatLogo(R.string.title_android_j) | ||
|
||
onView(allOf(withId(android.R.id.content), | ||
withChild(`is`(instanceOf(ImageView::class.java))))) | ||
.check(matches(isDisplayed())) | ||
.perform(click(), longClick()) | ||
|
||
pressBack() | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
app/src/androidTest/java/com/android_k/egg/PlatLogoActivityTest.kt
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,44 @@ | ||
package com.android_k.egg | ||
|
||
|
||
import android.widget.FrameLayout | ||
import android.widget.ImageView | ||
import androidx.test.espresso.Espresso.onView | ||
import androidx.test.espresso.Espresso.pressBack | ||
import androidx.test.espresso.action.ViewActions.click | ||
import androidx.test.espresso.action.ViewActions.longClick | ||
import androidx.test.espresso.assertion.ViewAssertions.matches | ||
import androidx.test.espresso.matcher.ViewMatchers.* | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import androidx.test.filters.LargeTest | ||
import com.dede.android_eggs.EasterEggsActivityBaseTest | ||
import com.dede.android_eggs.R | ||
import org.hamcrest.Matchers.* | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
/** | ||
* Android KitKat PlatLogo test | ||
*/ | ||
@LargeTest | ||
@RunWith(AndroidJUnit4::class) | ||
class PlatLogoActivityTest : EasterEggsActivityBaseTest() { | ||
|
||
@Test | ||
fun platLogoActivityTest() { | ||
|
||
testPlatLogo(R.string.title_android_k) | ||
|
||
onView(allOf(withId(android.R.id.content), | ||
withChild(`is`(instanceOf(FrameLayout::class.java))))) | ||
.check(matches(isDisplayed())) | ||
.perform(click(), longClick()) | ||
|
||
onView(withChild(`is`(instanceOf(ImageView::class.java)))) | ||
.check(matches(isDisplayed())) | ||
.perform(longClick()) | ||
|
||
pressBack() | ||
} | ||
|
||
} |
Oops, something went wrong.