undo gradle update (breaks CI?), remove testbutler

This commit is contained in:
Matthieu 2021-05-09 09:44:18 +02:00
parent aaff664be4
commit d8cd3e71aa
4 changed files with 13 additions and 20 deletions

View File

@ -27,7 +27,7 @@ android {
versionCode 11
versionName "1.0.beta1"
testInstrumentationRunner "org.pixeldroid.app.testUtility.TestRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments clearPackageData: 'true'
}
lintOptions{
@ -188,9 +188,6 @@ dependencies {
* 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
//noinspection FragmentGradleConfiguration
stagingImplementation("androidx.fragment:fragment-testing:1.3.3") {

View File

@ -9,22 +9,16 @@ import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.UiSelector
import com.linkedin.android.testbutler.TestButler
import org.junit.*
import org.pixeldroid.app.testUtility.clearData
import org.pixeldroid.app.testUtility.initDB
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.runner.RunWith
import org.pixeldroid.app.testUtility.waitForView
@RunWith(AndroidJUnit4::class)
@Ignore("Ignore until we can get TestButler to work on CI")
class LoginActivityOfflineTest {
private lateinit var context: Context
@ -36,8 +30,8 @@ class LoginActivityOfflineTest {
@Before
fun before() {
TestButler.setWifiState(false)
TestButler.setGsmState(false)
//TestButler.setWifiState(false)
//TestButler.setGsmState(false)
context = ApplicationProvider.getApplicationContext<Context>()
db = initDB(context)
db.clearAllTables()
@ -59,8 +53,8 @@ class LoginActivityOfflineTest {
@After
fun after() {
TestButler.setWifiState(true)
TestButler.setGsmState(true)
//TestButler.setWifiState(true)
//TestButler.setGsmState(true)
db.close()
clearData()
}

View File

@ -1,5 +1,5 @@
package org.pixeldroid.app.testUtility
/*
import android.os.Bundle
import androidx.test.runner.AndroidJUnitRunner
import com.linkedin.android.testbutler.TestButler
@ -15,4 +15,6 @@ class TestRunner: AndroidJUnitRunner() {
TestButler.teardown(targetContext)
super.finish(resultCode, results)
}
}
}
*/

View File

@ -1,13 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.5.0'
ext.kotlin_version = '1.4.32'
repositories {
google()
mavenCentral()
}
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"
// NOTE: Do not place your application dependencies here; they belong