undo gradle update (breaks CI?), remove testbutler
This commit is contained in:
parent
aaff664be4
commit
d8cd3e71aa
|
@ -27,7 +27,7 @@ android {
|
||||||
versionCode 11
|
versionCode 11
|
||||||
versionName "1.0.beta1"
|
versionName "1.0.beta1"
|
||||||
|
|
||||||
testInstrumentationRunner "org.pixeldroid.app.testUtility.TestRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
testInstrumentationRunnerArguments clearPackageData: 'true'
|
testInstrumentationRunnerArguments clearPackageData: 'true'
|
||||||
}
|
}
|
||||||
lintOptions{
|
lintOptions{
|
||||||
|
@ -188,9 +188,6 @@ dependencies {
|
||||||
* Not in release, so not mentioned in licenses list
|
* Not in release, so not mentioned in licenses list
|
||||||
*/
|
*/
|
||||||
|
|
||||||
androidTestImplementation 'com.linkedin.testbutler:test-butler-library:2.2.1'
|
|
||||||
androidTestUtil 'com.linkedin.testbutler:test-butler-app:2.2.1'
|
|
||||||
|
|
||||||
// debugImplementation required vs testImplementation: https://issuetracker.google.com/issues/128612536
|
// debugImplementation required vs testImplementation: https://issuetracker.google.com/issues/128612536
|
||||||
//noinspection FragmentGradleConfiguration
|
//noinspection FragmentGradleConfiguration
|
||||||
stagingImplementation("androidx.fragment:fragment-testing:1.3.3") {
|
stagingImplementation("androidx.fragment:fragment-testing:1.3.3") {
|
||||||
|
|
|
@ -9,22 +9,16 @@ import androidx.test.espresso.assertion.ViewAssertions.matches
|
||||||
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
|
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
|
||||||
import androidx.test.espresso.matcher.ViewMatchers.withId
|
import androidx.test.espresso.matcher.ViewMatchers.withId
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
|
import org.junit.*
|
||||||
import androidx.test.uiautomator.UiDevice
|
|
||||||
import androidx.test.uiautomator.UiSelector
|
|
||||||
import com.linkedin.android.testbutler.TestButler
|
|
||||||
import org.pixeldroid.app.testUtility.clearData
|
import org.pixeldroid.app.testUtility.clearData
|
||||||
import org.pixeldroid.app.testUtility.initDB
|
import org.pixeldroid.app.testUtility.initDB
|
||||||
import org.pixeldroid.app.utils.db.AppDatabase
|
import org.pixeldroid.app.utils.db.AppDatabase
|
||||||
import org.junit.After
|
|
||||||
import org.junit.Before
|
|
||||||
import org.junit.Rule
|
|
||||||
import org.junit.Test
|
|
||||||
import org.junit.rules.Timeout
|
import org.junit.rules.Timeout
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.pixeldroid.app.testUtility.waitForView
|
import org.pixeldroid.app.testUtility.waitForView
|
||||||
|
|
||||||
@RunWith(AndroidJUnit4::class)
|
@RunWith(AndroidJUnit4::class)
|
||||||
|
@Ignore("Ignore until we can get TestButler to work on CI")
|
||||||
class LoginActivityOfflineTest {
|
class LoginActivityOfflineTest {
|
||||||
|
|
||||||
private lateinit var context: Context
|
private lateinit var context: Context
|
||||||
|
@ -36,8 +30,8 @@ class LoginActivityOfflineTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
fun before() {
|
fun before() {
|
||||||
TestButler.setWifiState(false)
|
//TestButler.setWifiState(false)
|
||||||
TestButler.setGsmState(false)
|
//TestButler.setGsmState(false)
|
||||||
context = ApplicationProvider.getApplicationContext<Context>()
|
context = ApplicationProvider.getApplicationContext<Context>()
|
||||||
db = initDB(context)
|
db = initDB(context)
|
||||||
db.clearAllTables()
|
db.clearAllTables()
|
||||||
|
@ -59,8 +53,8 @@ class LoginActivityOfflineTest {
|
||||||
|
|
||||||
@After
|
@After
|
||||||
fun after() {
|
fun after() {
|
||||||
TestButler.setWifiState(true)
|
//TestButler.setWifiState(true)
|
||||||
TestButler.setGsmState(true)
|
//TestButler.setGsmState(true)
|
||||||
db.close()
|
db.close()
|
||||||
clearData()
|
clearData()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package org.pixeldroid.app.testUtility
|
package org.pixeldroid.app.testUtility
|
||||||
|
/*
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.test.runner.AndroidJUnitRunner
|
import androidx.test.runner.AndroidJUnitRunner
|
||||||
import com.linkedin.android.testbutler.TestButler
|
import com.linkedin.android.testbutler.TestButler
|
||||||
|
@ -15,4 +15,6 @@ class TestRunner: AndroidJUnitRunner() {
|
||||||
TestButler.teardown(targetContext)
|
TestButler.teardown(targetContext)
|
||||||
super.finish(resultCode, results)
|
super.finish(resultCode, results)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
|
@ -1,13 +1,13 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.5.0'
|
ext.kotlin_version = '1.4.32'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.2.0'
|
classpath 'com.android.tools.build:gradle:4.1.3'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
|
Loading…
Reference in New Issue