Merge branch 'receive_share' into 'master'
Receive shares Closes #289 See merge request pixeldroid/PixelDroid!337
This commit is contained in:
commit
09c35a25f7
|
@ -7,6 +7,14 @@ variables:
|
|||
TARGET: "default"
|
||||
|
||||
|
||||
before_script:
|
||||
- export GRADLE_USER_HOME=`pwd`/.gradle
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .gradle/wrapper
|
||||
- .gradle/caches
|
||||
|
||||
# Basic android and gradle stuff
|
||||
# Check linting
|
||||
lintDebug:
|
||||
|
|
|
@ -103,17 +103,17 @@ dependencies {
|
|||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
|
||||
implementation 'androidx.paging:paging-runtime-ktx:3.0.0-rc01'
|
||||
implementation 'androidx.paging:paging-runtime-ktx:3.0.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1'
|
||||
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.3.1"
|
||||
implementation "androidx.lifecycle:lifecycle-common-java8:2.3.1"
|
||||
implementation "androidx.annotation:annotation:1.2.0"
|
||||
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
||||
implementation "androidx.activity:activity-ktx:1.2.2"
|
||||
implementation "androidx.activity:activity-ktx:1.2.3"
|
||||
|
||||
// Use the most recent version of CameraX
|
||||
def cameraX_version = '1.0.0-rc05'
|
||||
def cameraX_version = '1.0.0'
|
||||
implementation "androidx.camera:camera-core:${cameraX_version}"
|
||||
implementation "androidx.camera:camera-camera2:${cameraX_version}"
|
||||
// CameraX Lifecycle library
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package org.pixeldroid.app
|
||||
/*
|
||||
|
||||
import android.content.Context
|
||||
import androidx.test.core.app.ActivityScenario
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
|
@ -9,33 +9,20 @@ 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 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
|
||||
|
||||
companion object {
|
||||
fun switchAirplaneMode() {
|
||||
val device = UiDevice.getInstance(getInstrumentation())
|
||||
device.openQuickSettings()
|
||||
device.findObject(UiSelector().textContains("Airplane")).click()
|
||||
device.pressHome()
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var db: AppDatabase
|
||||
|
||||
@get:Rule
|
||||
|
@ -43,7 +30,8 @@ class LoginActivityOfflineTest {
|
|||
|
||||
@Before
|
||||
fun before() {
|
||||
switchAirplaneMode()
|
||||
//TestButler.setWifiState(false)
|
||||
//TestButler.setGsmState(false)
|
||||
context = ApplicationProvider.getApplicationContext<Context>()
|
||||
db = initDB(context)
|
||||
db.clearAllTables()
|
||||
|
@ -52,19 +40,22 @@ class LoginActivityOfflineTest {
|
|||
|
||||
@Test
|
||||
fun emptyDBandOfflineModeDisplayCorrectMessage() {
|
||||
waitForView(R.id.login_activity_connection_required)
|
||||
onView(withId(R.id.login_activity_connection_required)).check(matches(isDisplayed()))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun retryButtonReloadsLoginActivity() {
|
||||
waitForView(R.id.login_activity_connection_required_button)
|
||||
onView(withId(R.id.login_activity_connection_required_button)).perform(click())
|
||||
onView(withId(R.id.login_activity_connection_required)).check(matches(isDisplayed()))
|
||||
}
|
||||
|
||||
@After
|
||||
fun after() {
|
||||
switchAirplaneMode()
|
||||
//TestButler.setWifiState(true)
|
||||
//TestButler.setGsmState(true)
|
||||
db.close()
|
||||
clearData()
|
||||
}
|
||||
}*/
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.pixeldroid.app.testUtility
|
||||
/*
|
||||
import android.os.Bundle
|
||||
import androidx.test.runner.AndroidJUnitRunner
|
||||
import com.linkedin.android.testbutler.TestButler
|
||||
|
||||
|
||||
class TestRunner: AndroidJUnitRunner() {
|
||||
override fun onStart() {
|
||||
TestButler.setup(targetContext)
|
||||
super.onStart()
|
||||
}
|
||||
|
||||
override fun finish(resultCode: Int, results: Bundle) {
|
||||
TestButler.teardown(targetContext)
|
||||
super.finish(resultCode, results)
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
|
@ -33,7 +33,18 @@
|
|||
android:name="org.pixeldroid.app.postCreation.PostCreationActivity"
|
||||
android:screenOrientation="sensorPortrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
tools:ignore="LockedOrientationActivity" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="image/*" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="image/*" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="org.pixeldroid.app.profile.FollowsActivity"
|
||||
android:screenOrientation="sensorPortrait"
|
||||
|
|
Loading…
Reference in New Issue