Skip to content

Commit

Permalink
Merge pull request #11371 from wordpress-mobile/merge/14.3-code-freez…
Browse files Browse the repository at this point in the history
…e-to-master

Merge 14.3 code freeze into master
  • Loading branch information
jkmassel authored Feb 24, 2020
2 parents 8921c1d + 2234f67 commit f9d5993
Show file tree
Hide file tree
Showing 153 changed files with 4,828 additions and 1,737 deletions.
13 changes: 13 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
14.4
-----

14.3
-----
* Added search to set page parent screen
* Block editor: Add support for changing image sizes in Image blocks
* Block editor: Add support for upload options in Gallery block
* Block editor: Added the Button block
* Block editor: Added the Group block
* Block editor: Add scroll support inside block picker and block settings
* Block editor: Fix issue preventing correct placeholder image from displaying during image upload
* Block editor: Fix issue where adding emojis to the post title added strong HTML elements to the title of the post
* Block editor: We’ve introduced a new toolbar that floats above the block you’re editing, which makes navigating your blocks easier — especially complex ones.
* Reader Information Architecture: added tab filtering; added bottom sheet to filter and navigate the followed sites/tags posts.

14.2
-----
Expand Down
10 changes: 4 additions & 6 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ android {
if (project.hasProperty("versionName")) {
versionName project.property("versionName")
} else {
versionName "alpha-208"
versionName "alpha-210"
}
versionCode 828
versionCode 833
minSdkVersion 21
targetSdkVersion 28

Expand All @@ -67,7 +67,6 @@ android {
testInstrumentationRunner 'org.wordpress.android.WordPressTestRunner'

buildConfigField "boolean", "OFFER_GUTENBERG", "true"
buildConfigField "boolean", "INFORMATION_ARCHITECTURE_AVAILABLE", "false"
}

// Gutenberg's dependency - react-native-video is using
Expand All @@ -84,17 +83,16 @@ android {
dimension "buildType"
// Only set the release version if one isn't provided
if (!project.hasProperty("versionName")) {
versionName "14.2-rc-1"
versionName "14.3-rc-1"
}
versionCode 827
versionCode 832
buildConfigField "boolean", "ME_ACTIVITY_AVAILABLE", "false"
}

zalpha { // alpha version - enable experimental features
applicationId "org.wordpress.android"
dimension "buildType"
buildConfigField "boolean", "VIDEO_OPTIMIZATION_AVAILABLE", "true"
buildConfigField "boolean", "INFORMATION_ARCHITECTURE_AVAILABLE", "true"
}

wasabi { // "hot" version, can be installed along release, alpha or beta versions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
package org.wordpress.android.e2e;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wordpress.android.e2e.flows.LoginFlow;
import org.wordpress.android.support.BaseTest;
import org.wordpress.android.ui.accounts.LoginMagicLinkInterceptActivity;

import static org.wordpress.android.BuildConfig.E2E_SELF_HOSTED_USER_PASSWORD;
import static org.wordpress.android.BuildConfig.E2E_SELF_HOSTED_USER_SITE_ADDRESS;
import static org.wordpress.android.BuildConfig.E2E_SELF_HOSTED_USER_USERNAME;
import static org.wordpress.android.BuildConfig.E2E_WP_COM_USER_PASSWORD;
import static org.wordpress.android.BuildConfig.E2E_WP_COM_USER_SITE_ADDRESS;
import static org.wordpress.android.BuildConfig.E2E_WP_COM_USER_USERNAME;

@RunWith(AndroidJUnit4.class)
public class LoginTests extends BaseTest {
@Rule
public ActivityTestRule<LoginMagicLinkInterceptActivity> mMagicLinkActivityTestRule =
new ActivityTestRule<>(LoginMagicLinkInterceptActivity.class);

@Before
public void setUp() {
logoutIfNecessary();
}

@Test
public void loginWithEmailPassword() {
wpLogin();
}

@Test
public void loginWithSiteAddress() {
new LoginFlow().loginSiteAddress(
E2E_WP_COM_USER_SITE_ADDRESS,
E2E_WP_COM_USER_USERNAME,
E2E_WP_COM_USER_PASSWORD);
}

@Test
public void loginWithMagicLink() {
new LoginFlow().loginMagicLink(mMagicLinkActivityTestRule);
}

@Test
public void loginWithSelfHostedAccount() {
new LoginFlow().loginSiteAddress(
E2E_SELF_HOSTED_USER_SITE_ADDRESS,
E2E_SELF_HOSTED_USER_USERNAME,
E2E_SELF_HOSTED_USER_PASSWORD);
}

@After
public void tearDown() {
logoutIfNecessary();
}
}
// Disabled temporarily
//import androidx.test.ext.junit.runners.AndroidJUnit4;
//import androidx.test.rule.ActivityTestRule;
//
//import org.junit.After;
//import org.junit.Before;
//import org.junit.Rule;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.wordpress.android.e2e.flows.LoginFlow;
//import org.wordpress.android.support.BaseTest;
//import org.wordpress.android.ui.accounts.LoginMagicLinkInterceptActivity;
//
//import static org.wordpress.android.BuildConfig.E2E_SELF_HOSTED_USER_PASSWORD;
//import static org.wordpress.android.BuildConfig.E2E_SELF_HOSTED_USER_SITE_ADDRESS;
//import static org.wordpress.android.BuildConfig.E2E_SELF_HOSTED_USER_USERNAME;
//import static org.wordpress.android.BuildConfig.E2E_WP_COM_USER_PASSWORD;
//import static org.wordpress.android.BuildConfig.E2E_WP_COM_USER_SITE_ADDRESS;
//import static org.wordpress.android.BuildConfig.E2E_WP_COM_USER_USERNAME;
//
//@RunWith(AndroidJUnit4.class)
//public class LoginTests extends BaseTest {
// @Rule
// public ActivityTestRule<LoginMagicLinkInterceptActivity> mMagicLinkActivityTestRule =
// new ActivityTestRule<>(LoginMagicLinkInterceptActivity.class);
//
// @Before
// public void setUp() {
// logoutIfNecessary();
// }
//
// @Test
// public void loginWithEmailPassword() {
// wpLogin();
// }
//
// @Test
// public void loginWithSiteAddress() {
// new LoginFlow().loginSiteAddress(
// E2E_WP_COM_USER_SITE_ADDRESS,
// E2E_WP_COM_USER_USERNAME,
// E2E_WP_COM_USER_PASSWORD);
// }
//
// @Test
// public void loginWithMagicLink() {
// new LoginFlow().loginMagicLink(mMagicLinkActivityTestRule);
// }
//
// @Test
// public void loginWithSelfHostedAccount() {
// new LoginFlow().loginSiteAddress(
// E2E_SELF_HOSTED_USER_SITE_ADDRESS,
// E2E_SELF_HOSTED_USER_USERNAME,
// E2E_SELF_HOSTED_USER_PASSWORD);
// }
//
// @After
// public void tearDown() {
// logoutIfNecessary();
// }
//}
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
package org.wordpress.android.e2e;

import androidx.test.rule.ActivityTestRule;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.wordpress.android.e2e.flows.SignupFlow;
import org.wordpress.android.support.BaseTest;
import org.wordpress.android.ui.accounts.LoginMagicLinkInterceptActivity;

import static org.wordpress.android.BuildConfig.E2E_SIGNUP_DISPLAY_NAME;
import static org.wordpress.android.BuildConfig.E2E_SIGNUP_EMAIL;
import static org.wordpress.android.BuildConfig.E2E_SIGNUP_PASSWORD;
import static org.wordpress.android.BuildConfig.E2E_SIGNUP_USERNAME;

public class SignUpTests extends BaseTest {
@Rule
public ActivityTestRule<LoginMagicLinkInterceptActivity> mMagicLinkActivityTestRule =
new ActivityTestRule<>(LoginMagicLinkInterceptActivity.class);

@Before
public void setUp() {
logoutIfNecessary();
}

@Test
public void signUpWithEmail() {
SignupFlow signupFlow = new SignupFlow();
signupFlow.chooseSignupWithEmail();
signupFlow.enterEmail(E2E_SIGNUP_EMAIL, mMagicLinkActivityTestRule);
signupFlow.checkEpilogue(
E2E_SIGNUP_DISPLAY_NAME,
E2E_SIGNUP_USERNAME);
signupFlow.enterPassword(E2E_SIGNUP_PASSWORD);
signupFlow.dismissInterstitial();
signupFlow.confirmSignup();
}
}
// Disabled temporarily
//import androidx.test.rule.ActivityTestRule;
//
//import org.junit.Before;
//import org.junit.Rule;
//import org.junit.Test;
//import org.wordpress.android.e2e.flows.SignupFlow;
//import org.wordpress.android.support.BaseTest;
//import org.wordpress.android.ui.accounts.LoginMagicLinkInterceptActivity;
//
//import static org.wordpress.android.BuildConfig.E2E_SIGNUP_DISPLAY_NAME;
//import static org.wordpress.android.BuildConfig.E2E_SIGNUP_EMAIL;
//import static org.wordpress.android.BuildConfig.E2E_SIGNUP_PASSWORD;
//import static org.wordpress.android.BuildConfig.E2E_SIGNUP_USERNAME;
//
//public class SignUpTests extends BaseTest {
// @Rule
// public ActivityTestRule<LoginMagicLinkInterceptActivity> mMagicLinkActivityTestRule =
// new ActivityTestRule<>(LoginMagicLinkInterceptActivity.class);
//
// @Before
// public void setUp() {
// logoutIfNecessary();
// }
//
// @Test
// public void signUpWithEmail() {
// SignupFlow signupFlow = new SignupFlow();
// signupFlow.chooseSignupWithEmail();
// signupFlow.enterEmail(E2E_SIGNUP_EMAIL, mMagicLinkActivityTestRule);
// signupFlow.checkEpilogue(
// E2E_SIGNUP_DISPLAY_NAME,
// E2E_SIGNUP_USERNAME);
// signupFlow.enterPassword(E2E_SIGNUP_PASSWORD);
// signupFlow.dismissInterstitial();
// signupFlow.confirmSignup();
// }
//}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import android.database.sqlite.SQLiteStatement;
import android.text.TextUtils;

import androidx.annotation.Nullable;

import org.wordpress.android.models.ReaderTag;
import org.wordpress.android.models.ReaderTagList;
import org.wordpress.android.models.ReaderTagType;
Expand Down Expand Up @@ -273,7 +275,7 @@ static ReaderTagList getAllTags() {
}
}

public static ReaderTag getFirstTag() {
public static @Nullable ReaderTag getFirstTag() {
Cursor c = ReaderDatabase.getReadableDb().rawQuery("SELECT * FROM tbl_tags ORDER BY tag_slug LIMIT 1", null);
try {
if (c.moveToFirst()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,28 @@ public String getMshotsUrl(int width) {
}

public boolean isSameAs(ReaderBlog blogInfo) {
return isSameAs(blogInfo, true);
}

public boolean isSameAs(ReaderBlog blogInfo, boolean compareSubscribers) {
return blogInfo != null
&& this.blogId == blogInfo.blogId
&& this.feedId == blogInfo.feedId
&& this.isFollowing == blogInfo.isFollowing
&& this.isPrivate == blogInfo.isPrivate
&& ((this.numSubscribers == blogInfo.numSubscribers) || !compareSubscribers)
&& this.numSubscribers == blogInfo.numSubscribers
&& this.getName().equals(blogInfo.getName())
&& this.getDescription().equals(blogInfo.getDescription())
&& this.getUrl().equals(blogInfo.getUrl())
&& this.getFeedUrl().equals(blogInfo.getFeedUrl())
&& this.getImageUrl().equals(blogInfo.getImageUrl());
}

public boolean isSameBlogOrFeedAs(ReaderBlog blogInfo) {
boolean areBothValidFeeds = this.blogId == this.feedId
&& blogInfo.blogId == blogInfo.feedId
&& this.hasFeedUrl()
&& blogInfo.hasFeedUrl();

return blogInfo != null
&& this.blogId == blogInfo.blogId
&& this.getUrl().equals(blogInfo.getUrl())
&& (!areBothValidFeeds || this.getFeedUrl().equals(blogInfo.getFeedUrl()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ReaderTag implements Serializable, FilterCriteria {
private String mTagTitle; // title, used for default tags
private String mEndpoint; // endpoint for updating posts with this tag

private boolean mIsDefaultTag;
private boolean mIsDefaultInMemoryTag;

public final ReaderTagType tagType;

Expand All @@ -43,7 +43,7 @@ public ReaderTag(String slug,
String title,
String endpoint,
ReaderTagType tagType,
boolean isDefaultTag) {
boolean isDefaultInMemoryTag) {
// we need a slug since it's used to uniquely ID the tag (including setting it as the
// primary key in the tag table)
if (TextUtils.isEmpty(slug)) {
Expand All @@ -62,22 +62,22 @@ public ReaderTag(String slug,
setTagTitle(title);
setEndpoint(endpoint);
this.tagType = tagType;
mIsDefaultTag = isDefaultTag;
mIsDefaultInMemoryTag = isDefaultInMemoryTag;
}

public String getEndpoint() {
return StringUtils.notNullStr(mEndpoint);
}

private void setEndpoint(String endpoint) {
public void setEndpoint(String endpoint) {
this.mEndpoint = StringUtils.notNullStr(endpoint);
}

public String getTagTitle() {
return StringUtils.notNullStr(mTagTitle);
}

private void setTagTitle(String title) {
public void setTagTitle(String title) {
this.mTagTitle = StringUtils.notNullStr(title);
}

Expand Down Expand Up @@ -174,8 +174,8 @@ public boolean isFollowedSites() {
return tagType == ReaderTagType.DEFAULT && getEndpoint().endsWith(FOLLOWING_PATH);
}

public boolean isDefaultTag() {
return tagType == ReaderTagType.DEFAULT && mIsDefaultTag;
public boolean isDefaultInMemoryTag() {
return tagType == ReaderTagType.DEFAULT && mIsDefaultInMemoryTag;
}

public boolean isBookmarked() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,17 @@ public ReaderTagList getDeletions(ReaderTagList otherList) {

return deletions;
}

public boolean containsFollowingTag() {
boolean containsFollowing = false;

for (ReaderTag tag : this) {
if (tag.isFollowedSites() || tag.isDefaultInMemoryTag()) {
containsFollowing = true;
break;
}
}

return containsFollowing;
}
}
Loading

0 comments on commit f9d5993

Please sign in to comment.