Skip to content

Commit cc8cfda

Browse files
committed
Merge branch 'trunk' into issue/reader-saved-posts-sync
# Conflicts: # WordPress/build.gradle # WordPress/src/main/java/org/wordpress/android/ui/prefs/AppPrefs.java # WordPress/src/main/java/org/wordpress/android/ui/prefs/AppPrefsWrapper.kt # libs/analytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java # libs/analytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java
2 parents 5d7bf6e + e65b439 commit cc8cfda

File tree

388 files changed

+4557
-3769
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

388 files changed

+4557
-3769
lines changed

RELEASE-NOTES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
21.0
44
-----
5+
* [***] [internal] Updates the target sdk to 31 - Android 12 [https://github.com/wordpress-mobile/WordPress-Android/pull/17153]
6+
* [***] Updated About screen for WordPress and Jetpack apps to their respective urls. [https://github.com/wordpress-mobile/WordPress-Android/pull/17282]
57
* [*] Updates splash screen for Android 12+ [https://github.com/wordpress-mobile/WordPress-Android/pull/17273]
68
* [*] Fix text color of success messages in the QR code login flow [https://github.com/wordpress-mobile/WordPress-Android/pull/17286]
9+
* [*] Stats: Fix Western Arabic Numerals not being shown on every text of the stats screens in Arabic languages [https://github.com/wordpress-mobile/WordPress-Android/pull/17217]
710

811
20.9
912
-----

WordPress/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ android {
122122
buildConfigField "boolean", "JETPACK_POWERED_BOTTOM_SHEET", "false"
123123
buildConfigField "boolean", "JETPACK_SHARED_LOGIN", "false"
124124
buildConfigField "boolean", "JETPACK_LOCAL_USER_FLAGS", "false"
125+
buildConfigField "boolean", "JETPACK_BLOGGING_REMINDERS_SYNC", "false"
125126
buildConfigField "boolean", "JETPACK_READER_SAVED_POSTS", "false"
127+
buildConfigField "boolean", "JETPACK_PROVIDER_SYNC", "false"
126128

127129
// Override these constants in jetpack product flavor to enable/ disable features
128130
buildConfigField "boolean", "ENABLE_SITE_CREATION", "true"
@@ -355,7 +357,7 @@ dependencies {
355357

356358
implementation 'com.android.volley:volley:1.1.1'
357359
implementation 'com.google.firebase:firebase-messaging:21.1.0'
358-
implementation 'com.google.android.gms:play-services-auth:18.1.0'
360+
implementation 'com.google.android.gms:play-services-auth:20.3.0'
359361
implementation 'com.android.installreferrer:installreferrer:2.2'
360362
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
361363
implementation 'org.greenrobot:eventbus:3.3.1'

WordPress/src/androidTest/java/org/wordpress/android/TestUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
import android.content.SharedPreferences;
55
import android.content.SharedPreferences.Editor;
66
import android.database.sqlite.SQLiteDatabase;
7-
import android.preference.PreferenceManager;
87
import android.text.TextUtils;
98

9+
import androidx.preference.PreferenceManager;
10+
1011
import org.greenrobot.eventbus.EventBus;
1112
import org.wordpress.android.util.DateTimeUtils;
1213

WordPress/src/androidTest/java/org/wordpress/android/e2e/ContactUsTests.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.wordpress.android.e2e;
22

33
import org.junit.Before;
4-
import org.junit.Ignore;
54
import org.junit.Test;
65
import org.wordpress.android.e2e.flows.LoginFlow;
76
import org.wordpress.android.e2e.pages.ContactSupportScreen;
@@ -18,7 +17,6 @@ public void setUp() {
1817
logoutIfNecessary();
1918
}
2019

21-
@Ignore("Ignored temporarily. This sometimes fail on CI while running with whole test suite.")
2220
@Test
2321
public void e2eSendButtonEnabledWhenTextIsEntered() {
2422
try {
@@ -38,29 +36,6 @@ public void e2eSendButtonEnabledWhenTextIsEntered() {
3836
}
3937
}
4038

41-
@Ignore("As long as CI does not use gradle.properties from MobileSecrets")
42-
@Test
43-
public void e2eMessageCanBeSent() {
44-
String userMessageText = "Please ignore, this is an automated test.";
45-
String automatedReplyText = "Mobile support will respond as soon as possible, "
46-
+ "generally within 48-96 hours. "
47-
+ "Please reply with your site address (URL) "
48-
+ "and any additional details we should know.";
49-
50-
try {
51-
new LoginFlow()
52-
.chooseContinueWithWpCom()
53-
.tapHelp()
54-
.openContactUs()
55-
.setMessageText(userMessageText)
56-
.tapSendButton()
57-
.assertUserMessageDelivered(userMessageText)
58-
.assertSystemMessageReceived(automatedReplyText);
59-
} finally {
60-
new ContactSupportScreen().goBackAndDeleteUnsentMessageIfNeeded();
61-
}
62-
}
63-
6439
@Test
6540
public void e2eHelpCanBeOpenedWhileEnteringEmail() {
6641
new LoginFlow()

WordPress/src/androidTest/java/org/wordpress/android/e2e/EditorTests.java

Lines changed: 0 additions & 111 deletions
This file was deleted.

WordPress/src/androidTest/java/org/wordpress/android/e2e/LoginTests.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import org.junit.After;
44
import org.junit.Before;
5-
import org.junit.Ignore;
65
import org.junit.Test;
76
import org.wordpress.android.e2e.flows.LoginFlow;
87
import org.wordpress.android.support.BaseTest;
@@ -24,7 +23,6 @@ public void setUp() {
2423
logoutIfNecessary();
2524
}
2625

27-
@Ignore("Ignored temporarily. This sometimes fail on CI while running with whole test suite.")
2826
@Test
2927
public void e2eLoginWithEmailPassword() {
3028
new LoginFlow().chooseContinueWithWpCom()
@@ -33,7 +31,6 @@ public void e2eLoginWithEmailPassword() {
3331
.confirmLogin(false);
3432
}
3533

36-
@Ignore("Ignored temporarily. This sometimes fail on CI while running with whole test suite.")
3734
@Test
3835
public void e2eLoginWithPasswordlessAccount() {
3936
new LoginFlow().chooseContinueWithWpCom()
@@ -51,7 +48,6 @@ public void e2eLoginWithSiteAddress() {
5148
.confirmLogin(false);
5249
}
5350

54-
@Ignore("Ignored temporarily. This sometimes fail on CI while running with whole test suite.")
5551
@Test
5652
public void e2eLoginWithMagicLink() {
5753
new LoginFlow().chooseContinueWithWpCom()

WordPress/src/androidTest/java/org/wordpress/android/e2e/ReaderTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import androidx.test.rule.GrantPermissionRule;
66

77
import org.junit.Before;
8-
import org.junit.Ignore;
98
import org.junit.Rule;
109
import org.junit.Test;
1110
import org.wordpress.android.e2e.pages.ReaderPage;
@@ -28,7 +27,6 @@ public void setUp() {
2827
String mCoachingPostTitle = "Let's check out the coaching team!";
2928
String mCompetitionPostTitle = "Let's focus on the competition.";
3029

31-
@Ignore("Ignored temporarily. This sometimes fail on CI while running with whole test suite.")
3230
@Test
3331
public void e2eNavigateThroughPosts() {
3432
new ReaderPage()
@@ -42,7 +40,6 @@ public void e2eNavigateThroughPosts() {
4240
.goBackToReader();
4341
}
4442

45-
@Ignore("Ignored temporarily. This sometimes fail on CI while running with whole test suite.")
4643
@Test
4744
public void e2eLikePost() {
4845
new ReaderPage()

WordPress/src/androidTest/java/org/wordpress/android/e2e/pages/BlockEditorPage.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public BlockEditorPage addPostSettings(String categoryName, String tagName) {
7575
}
7676

7777
public void openPostSetting() {
78+
waitForElementToBeDisplayed(R.id.toolbar_main);
7879
openActionBarOverflowOrOptionsMenu(ApplicationProvider.getApplicationContext());
7980
clickOn(onView(withText(R.string.post_settings)));
8081
}
@@ -141,8 +142,8 @@ public BlockEditorPage addImage() {
141142
clickOn("Image");
142143
clickOn("WordPress Media Library");
143144
waitForElementToBeDisplayed(onView(withText("WordPress media")));
144-
waitForElementToBeDisplayed(onView(withIndex(withId(R.id.image_thumbnail), 0)));
145-
onView(withIndex(withId(R.id.image_thumbnail), 0)).perform(click());
145+
waitForElementToBeDisplayed(onView(withIndex(withId(R.id.text_selection_count), 0)));
146+
onView(withIndex(withId(R.id.text_selection_count), 0)).perform(click());
146147
clickOn(R.id.mnu_confirm_selection);
147148
return this;
148149
}

WordPress/src/androidTest/java/org/wordpress/android/e2e/pages/ContactSupportScreen.java

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import static androidx.test.espresso.Espresso.onView;
1010
import static androidx.test.espresso.assertion.ViewAssertions.matches;
11-
import static androidx.test.espresso.matcher.ViewMatchers.hasDescendant;
1211
import static androidx.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed;
1312
import static androidx.test.espresso.matcher.ViewMatchers.isEnabled;
1413
import static androidx.test.espresso.matcher.ViewMatchers.withId;
@@ -42,11 +41,6 @@ public class ContactSupportScreen {
4241
));
4342

4443
// Actions:
45-
public ContactSupportScreen tapSendButton() {
46-
sendButton.perform(ViewActions.click());
47-
return this;
48-
}
49-
5044
public ContactSupportScreen setMessageText(String text) {
5145
populateTextField(textInput, text);
5246
// This sleep serves only one purpose: allowing human to notice
@@ -74,6 +68,7 @@ public HelpAndSupportScreen goBackAndDeleteUnsentMessageIfNeeded() {
7468

7569
// Assertions:
7670
public ContactSupportScreen assertContactSupportScreenLoaded() {
71+
waitForElementToBeDisplayed(textInput);
7772
textInput.check(matches(isCompletelyDisplayed()));
7873
sendButton.check(matches(isCompletelyDisplayed()));
7974
return this;
@@ -88,32 +83,4 @@ public ContactSupportScreen assertSendButtonEnabled() {
8883
sendButton.check(matches(isEnabled()));
8984
return this;
9085
}
91-
92-
public ContactSupportScreen assertUserMessageDelivered(String messageText) {
93-
ViewInteraction userMessageContainer = onView(allOf(
94-
withId(R.id.request_user_message_container),
95-
hasDescendant(allOf(
96-
withId(R.id.request_user_message_text),
97-
withText(messageText)
98-
)),
99-
hasDescendant(allOf(
100-
withId(R.id.request_user_message_status),
101-
withText("Delivered")
102-
))
103-
));
104-
105-
waitForElementToBeDisplayed(userMessageContainer);
106-
userMessageContainer.check(matches(isCompletelyDisplayed()));
107-
return this;
108-
}
109-
110-
public ContactSupportScreen assertSystemMessageReceived(String messageText) {
111-
ViewInteraction systemResponseBubble = onView(allOf(
112-
withId(R.id.request_system_message_text),
113-
withText(messageText)));
114-
115-
waitForElementToBeDisplayed(systemResponseBubble);
116-
systemResponseBubble.check(matches(isCompletelyDisplayed()));
117-
return this;
118-
}
11986
}

0 commit comments

Comments
 (0)