Skip to content

Commit d54478b

Browse files
committed
Merge branch 'trunk' into issue/17299-animated-text-font-size-fixed
2 parents 96cce67 + 5efa74d commit d54478b

127 files changed

Lines changed: 835 additions & 807 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/e2e/ContactUsTests.java

Lines changed: 0 additions & 2 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 {

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/ContactSupportScreen.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import static org.hamcrest.Matchers.not;
1818
import static org.wordpress.android.support.WPSupportUtils.populateTextField;
1919
import static org.wordpress.android.support.WPSupportUtils.sleep;
20+
import static org.wordpress.android.support.WPSupportUtils.waitForElementToBeDisplayed;
2021
import static org.wordpress.android.support.WPSupportUtils.waitForElementToBeDisplayedWithoutFailure;
2122

2223
public class ContactSupportScreen {
@@ -67,6 +68,7 @@ public HelpAndSupportScreen goBackAndDeleteUnsentMessageIfNeeded() {
6768

6869
// Assertions:
6970
public ContactSupportScreen assertContactSupportScreenLoaded() {
71+
waitForElementToBeDisplayed(textInput);
7072
textInput.check(matches(isCompletelyDisplayed()));
7173
sendButton.check(matches(isCompletelyDisplayed()));
7274
return this;

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)

WordPress/src/main/java/org/wordpress/android/AppInitializer.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION")
2+
13
package org.wordpress.android
24

35
import android.annotation.SuppressLint
@@ -163,7 +165,7 @@ class AppInitializer @Inject constructor(
163165
lateinit var storyNotificationTrackerProvider: StoryNotificationTrackerProvider
164166
private set
165167

166-
private lateinit var credentialsClient: GoogleApiClient
168+
@Suppress("DEPRECATION") private lateinit var credentialsClient: GoogleApiClient
167169

168170
private var startDate: Long
169171

@@ -341,6 +343,7 @@ class AppInitializer @Inject constructor(
341343
}
342344
}
343345

346+
@Suppress("DEPRECATION")
344347
private fun setupCredentialsClient() {
345348
credentialsClient = GoogleApiClient.Builder(application)
346349
.addConnectionCallbacks(object : GoogleApiClient.ConnectionCallbacks {
@@ -553,6 +556,7 @@ class AppInitializer @Inject constructor(
553556
AppLog.d(T.API, "Receiving OnUnexpectedError event, message: " + event.exception.message)
554557
}
555558

559+
@Suppress("DEPRECATION")
556560
private fun removeWpComUserRelatedData(context: Context) {
557561
// cancel all Volley requests - do this before unregistering push since that uses a Volley request
558562
VolleyUtils.cancelAllRequests(requestQueue)
@@ -764,6 +768,7 @@ class AppInitializer @Inject constructor(
764768
* 1. the app starts (but it's not opened by a service or a broadcast receiver, i.e. an activity is resumed)
765769
* 2. the app was in background and is now foreground
766770
*/
771+
@Suppress("DEPRECATION")
767772
fun onAppComesFromBackground() {
768773
readerTracker.setupTrackers()
769774
AppLog.i(T.UTILS, "App comes from background")

WordPress/src/main/java/org/wordpress/android/support/ZendeskHelper.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ private fun buildZendeskTags(
475475
* could prove useful for the Happiness Engineers while debugging the users' issues.
476476
*/
477477
private fun getNetworkInformation(context: Context): String {
478-
val networkType = when (NetworkUtils.getActiveNetworkInfo(context)?.type) {
478+
@Suppress("DEPRECATION") val networkType = when (NetworkUtils.getActiveNetworkInfo(context)?.type) {
479479
ConnectivityManager.TYPE_WIFI -> ZendeskConstants.networkWifi
480480
ConnectivityManager.TYPE_MOBILE -> ZendeskConstants.networkWWAN
481481
else -> ZendeskConstants.unknownValue
@@ -486,7 +486,7 @@ private fun getNetworkInformation(context: Context): String {
486486
return listOf(
487487
"${ZendeskConstants.networkTypeLabel} $networkType",
488488
"${ZendeskConstants.networkCarrierLabel} $carrierName",
489-
"${ZendeskConstants.networkCountryCodeLabel} ${countryCodeLabel.toUpperCase(context.currentLocale)}"
489+
"${ZendeskConstants.networkCountryCodeLabel} ${countryCodeLabel.uppercase(context.currentLocale)}"
490490
).joinToString(separator = "\n")
491491
}
492492

0 commit comments

Comments
 (0)