Skip to content

Commit ab96f0f

Browse files
committed
Merge branch 'trunk' into issue/17279-blogging-reminders-resolver
2 parents 378a638 + 4d6fc13 commit ab96f0f

270 files changed

Lines changed: 2556 additions & 2244 deletions

File tree

Some content is hidden

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

RELEASE-NOTES.txt

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

33
21.0
44
-----
5+
* [***] Updated About screen for WordPress and Jetpack apps to their respective urls. [https://github.com/wordpress-mobile/WordPress-Android/pull/17282]
56
* [*] Updates splash screen for Android 12+ [https://github.com/wordpress-mobile/WordPress-Android/pull/17273]
67
* [*] Fix text color of success messages in the QR code login flow [https://github.com/wordpress-mobile/WordPress-Android/pull/17286]
8+
* [*] 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]
79

810
20.9
911
-----

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/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
}

WordPress/src/androidTest/java/org/wordpress/android/util/StatsMocksReader.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import org.json.JSONObject
55
import java.util.ArrayList
66

77
class StatsMocksReader {
8-
fun readDayStatsGenericFile(fileName: String, lastObjectName: String, keyName: String, valueName: String):
8+
private fun readDayStatsGenericFile(fileName: String, lastObjectName: String, keyName: String, valueName: String):
99
MutableList<StatsKeyValueData> {
10-
val fileName = "mocks/mappings/wpcom/stats/$fileName.json"
1110
val todayMarker = "{{now format='yyyy-MM-dd'}}"
12-
val readString = this.readAssetsFile(fileName)
11+
val readString = this.readAssetsFile("mocks/mappings/wpcom/stats/$fileName.json")
1312
val wireMockJSON = JSONObject(readString)
1413
val arrayRaw = wireMockJSON
1514
.getJSONObject("response")
@@ -58,7 +57,7 @@ class StatsMocksReader {
5857
}
5958

6059
fun readDayCountriesToList(): MutableList<StatsKeyValueData> {
61-
var countriesList = readDayStatsGenericFile(
60+
val countriesList = readDayStatsGenericFile(
6261
"stats_country-views-day", "views", "country_code", "views"
6362
)
6463

WordPress/src/debug/java/org/wordpress/android/WPWellSqlConfig.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class WPWellSqlConfig(context: Context) : WellSqlConfig(context) {
1919
* and show a toast alerting to the downgrade. The sole purpose of this is to avoid the hassle of devs switching
2020
* branches and having to clear storage and login again due to a version downgrade.
2121
*/
22+
@Suppress("DEPRECATION")
2223
override fun onDowngrade(db: SQLiteDatabase?, helper: WellTableManager?, oldVersion: Int, newVersion: Int) {
2324
if (BuildConfig.RESET_DB_ON_DOWNGRADE.toBoolean()) {
2425
// note: don't call super() here because it throws an exception

WordPress/src/jetpack/java/org/wordpress/android/ui/accounts/login/LoginPrologueFragment.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class LoginPrologueFragment : Fragment(R.layout.jetpack_login_prologue_screen) {
2727
loginPrologueListener = context
2828
}
2929

30+
@Suppress("DEPRECATION")
3031
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
3132
super.onViewCreated(view, savedInstanceState)
3233

@@ -79,7 +80,7 @@ class LoginPrologueFragment : Fragment(R.layout.jetpack_login_prologue_screen) {
7980
viewModel.onFragmentResume()
8081
}
8182

82-
@Suppress("DEPRECATION")
83+
@Suppress("DEPRECATION", "OVERRIDE_DEPRECATION")
8384
override fun onActivityCreated(savedInstanceState: Bundle?) {
8485
super.onActivityCreated(savedInstanceState)
8586
// important for accessibility - talkback
@@ -91,6 +92,7 @@ class LoginPrologueFragment : Fragment(R.layout.jetpack_login_prologue_screen) {
9192
updateSystemBars(showDarkStatusAndNavBarInLightMode = false)
9293
}
9394

95+
@Suppress("DEPRECATION")
9496
private fun updateSystemBars(showDarkStatusAndNavBarInLightMode: Boolean) {
9597
activity?.let {
9698
WPActivityUtils.setLightStatusBar(it.window, !showDarkStatusAndNavBarInLightMode)

0 commit comments

Comments
 (0)