Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasKaminsky committed Sep 25, 2020
2 parents 1cadee3 + c781447 commit ac08ef2
Show file tree
Hide file tree
Showing 66 changed files with 1,793 additions and 1,145 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scripts/analysis/findbugs-results.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
320
319
2 changes: 1 addition & 1 deletion scripts/analysis/lint-results.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 81 warnings</span>
<span class="mdl-layout-title">Lint Report: 80 warnings</span>
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void showShares() {
"users",
false,
"",
OCShare.DEFAULT_PERMISSION)
OCShare.NO_PERMISSION)
.execute(client).isSuccess());

// share folder to circle
Expand Down
7 changes: 6 additions & 1 deletion src/androidTest/java/com/owncloud/android/AbstractIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_USER_ID;
import static org.junit.Assert.assertTrue;


Expand Down Expand Up @@ -96,7 +97,7 @@ public static void beforeAll() {
Account temp = new Account("test@https://server.com", MainApp.getAccountType(targetContext));
platformAccountManager.addAccountExplicitly(temp, "password", null);
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_OC_BASE_URL, "https://server.com");
platformAccountManager.setUserData(temp, AccountUtils.Constants.KEY_USER_ID, "test");
platformAccountManager.setUserData(temp, KEY_USER_ID, "test");

final UserAccountManager userAccountManager = UserAccountManagerImpl.fromContext(targetContext);
account = userAccountManager.getAccountByName("test@https://server.com");
Expand Down Expand Up @@ -381,4 +382,8 @@ private String createName() {

return name;
}

public static String getUserId(User user) {
return AccountManager.get(targetContext).getUserData(user.toPlatformAccount(), KEY_USER_ID);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class AuthenticatorActivityIT {
}

@Test
@Suppress("TooGenericExceptionCaught")
fun tryCatch() {
val color = try {
Color.parseColor("1")
Expand All @@ -43,6 +44,7 @@ class AuthenticatorActivityIT {
}

@Test
@Suppress("TooGenericExceptionCaught")
fun tryCatch2() {
val color = try {
Color.parseColor("")
Expand All @@ -54,6 +56,7 @@ class AuthenticatorActivityIT {
}

@Test
@Suppress("TooGenericExceptionCaught")
fun tryCatch3() {
val color = try {
Color.parseColor(null)
Expand All @@ -65,6 +68,7 @@ class AuthenticatorActivityIT {
}

@Test
@Suppress("TooGenericExceptionCaught")
fun tryCatch4() {
val color = try {
Color.parseColor("abc")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public void writeThenReadAsParcelable() {
mFile.setEtag(ETAG);
mFile.setSharedViaLink(true);
mFile.setSharedWithSharee(true);
mFile.setPublicLink(PUBLIC_LINK);
mFile.setPermissions(PERMISSIONS);
mFile.setRemoteId(REMOTE_ID);
mFile.setUpdateThumbnailNeeded(true);
Expand Down Expand Up @@ -122,7 +121,6 @@ public void writeThenReadAsParcelable() {
assertThat(fileReadFromParcel.getEtag(), is(ETAG));
assertThat(fileReadFromParcel.isSharedViaLink(), is(true));
assertThat(fileReadFromParcel.isSharedWithSharee(), is(true));
assertThat(fileReadFromParcel.getPublicLink(), is(PUBLIC_LINK));
assertThat(fileReadFromParcel.getPermissions(), is(PERMISSIONS));
assertThat(fileReadFromParcel.getRemoteId(), is(REMOTE_ID));
assertThat(fileReadFromParcel.isUpdateThumbnailNeeded(), is(true));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AvatarIT : AbstractIT() {
@ScreenshotTest
fun showAvatars() {
val avatarRadius = targetContext.resources.getDimension(R.dimen.list_item_avatar_icon_radius)
val width = DisplayUtils.convertDpToPixel(40f, targetContext)
val width = DisplayUtils.convertDpToPixel(2 * avatarRadius, targetContext)
val sut = testActivityRule.launchActivity(null)
val fragment = AvatarTestFragment()

Expand All @@ -56,6 +56,7 @@ class AvatarIT : AbstractIT() {
fragment.addAvatar("email@server.com", avatarRadius, width, targetContext)
}

shortSleep()
waitForIdleSync()
screenshot(sut)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ internal class AvatarTestFragment : Fragment() {
}

fun addAvatar(name: String, avatarRadius: Float, width: Int, targetContext: Context) {
val margin = 10
val margin = padding
val imageView = ImageView(targetContext)
imageView.setImageDrawable(TextDrawable.createNamedAvatar(name, avatarRadius))

Expand All @@ -56,4 +56,8 @@ internal class AvatarTestFragment : Fragment() {

list.addView(imageView)
}

companion object {
private const val padding = 10
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class FileDetailFragmentStaticServerIT : AbstractIT() {

@Test
@ScreenshotTest
fun showDetails_Sharing() {
fun showDetailsSharing() {
val sut = testActivityRule.launchActivity(null)
sut.addFragment(FileDetailFragment.newInstance(file, user, 1))

Expand Down
Loading

0 comments on commit ac08ef2

Please sign in to comment.