Skip to content

Commit

Permalink
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
Browse files Browse the repository at this point in the history
… into deps/update-square-okio-to-3.3.0
  • Loading branch information
ParaskP7 committed Apr 26, 2023
2 parents 594e4d9 + e9d4fb9 commit 21a2c79
Show file tree
Hide file tree
Showing 609 changed files with 25,300 additions and 7,539 deletions.
2 changes: 1 addition & 1 deletion .buildkite/beta-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/bash-cache#2.11.0
- automattic/a8c-ci-toolkit#2.15.0

steps:
#################
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/bash-cache#2.11.0
- automattic/a8c-ci-toolkit#2.14.0

steps:
#################
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/release-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/bash-cache#2.11.0
- automattic/a8c-ci-toolkit#2.14.0

steps:
#################
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
### Steps to reproduce the behavior


##### Tested on [device], Android [version], WPAndroid [version]
##### Tested on [device], Android [version], JPAndroid / WPAndroid [version]
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,15 @@ PR submission checklist:
- [ ] I have completed the Regression Notes.
- [ ] I have considered adding accessibility improvements for my changes.
- [ ] I have considered if this change warrants user-facing release notes and have added them to `RELEASE-NOTES.txt` if necessary.

UI Changes testing checklist:

- [ ] Portrait and landscape orientations.
- [ ] Light and dark modes.
- [ ] Fonts: Larger, smaller and bold text.
- [ ] High contrast.
- [ ] Talkback.
- [ ] Languages with large words or with letters/accents not frequently used in English.
- [ ] Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
- [ ] Large and small screen sizes. (Tablet and smaller phones)
- [ ] Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ WordPress/src/main/res/values/com_crashlytics_export_strings.xml
# Silver Searcher ignore file
.agignore

# ripgrep ignore file
.rgignore

# Monkey runner settings
*.pyc

Expand Down
19 changes: 18 additions & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
*** PLEASE FOLLOW THIS FORMAT: [<priority indicator, more stars = higher priority>] <description> [<PR URL>]

22.0
22.3
-----


22.2
-----
* [*] Adds runtime notifications permission [https://github.com/wordpress-mobile/WordPress-Android/pull/18239]
* [**] Adds media permissions support for Android 13 [https://github.com/wordpress-mobile/WordPress-Android/pull/18183]
* [**] [Jetpack-only] Adds a dashboard card for purchasing domains. [https://github.com/wordpress-mobile/WordPress-Android/pull/18240]
* [**] [Jetpack-only] Blogging Prompts: adds the ability to view other users' responses to a prompt. [https://github.com/wordpress-mobile/WordPress-Android/pull/18265]
* [*] [internal] [Jetpack-only] Redesigned the migration success card. [https://github.com/wordpress-mobile/WordPress-Android/pull/18271]

22.1
-----
* [**] [WordPress-only] Warns user about sites with only individual plugins not supporting core app features and offers the option to switch to the Jetpack app. [https://github.com/wordpress-mobile/WordPress-Android/pull/18199]
* [*] Block editor: Avoid empty Gallery block error [https://github.com/WordPress/gutenberg/pull/49557]

22.0
-----
* [*] Block editor: Allow new block transforms for most blocks. [https://github.com/WordPress/gutenberg/pull/48792]

21.9
-----
Expand Down
13 changes: 10 additions & 3 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,17 @@ android {
buildConfigField "boolean", "JETPACK_FEATURE_REMOVAL_PHASE_THREE", "false"
buildConfigField "boolean", "JETPACK_FEATURE_REMOVAL_PHASE_FOUR", "false"
buildConfigField "boolean", "JETPACK_FEATURE_REMOVAL_NEW_USERS", "false"
buildConfigField "boolean", "JETPACK_FEATURE_REMOVAL_STATIC_POSTERS", "false"
buildConfigField "boolean", "JETPACK_FEATURE_REMOVAL_SELF_HOSTED_USERS", "false"
buildConfigField "boolean", "PREVENT_DUPLICATE_NOTIFS_REMOTE_FIELD", "false"
buildConfigField "boolean", "OPEN_WEB_LINKS_WITH_JETPACK_FLOW", "false"
buildConfigField "boolean", "ENABLE_WORDPRESS_SUPPORT_FORUM", "false"
buildConfigField "boolean", "JETPACK_INSTALL_FULL_PLUGIN", "false"
buildConfigField "boolean", "ENABLE_BLAZE_FEATURE", "false"
buildConfigField "boolean", "WP_INDIVIDUAL_PLUGIN_OVERLAY", "false"
buildConfigField "boolean", "DASHBOARD_CARD_PAGES", "false"
buildConfigField "boolean", "DASHBOARD_CARD_ACTIVITY_LOG", "false"
buildConfigField "boolean", "DASHBOARD_CARD_DOMAIN", "false"

// Override these constants in jetpack product flavor to enable/ disable features
buildConfigField "boolean", "ENABLE_SITE_CREATION", "true"
Expand Down Expand Up @@ -258,9 +263,11 @@ android {
}

lintOptions{
warningsAsErrors = true
checkDependencies = true
checkGeneratedSources = true
lintConfig file("${project.rootDir}/config/lint.xml")
lintConfig file("${project.rootDir}/config/lint/lint.xml")
baseline file("${project.rootDir}/config/lint/baseline.xml")
}

packagingOptions {
Expand Down Expand Up @@ -438,7 +445,8 @@ dependencies {
implementation "androidx.compose.material:material:$androidxComposeVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$androidxComposeLifecycleVersion"
implementation "io.coil-kt:coil-compose:$coilComposeVersion"
implementation ('com.github.indexos.media-for-mobile:android:43a9026f0973a2f0a74fa813132f6a16f7499c3a')
implementation "com.github.indexos.media-for-mobile:domain:$indexosMediaForMobileVersion"
implementation "com.github.indexos.media-for-mobile:android:$indexosMediaForMobileVersion"
implementation "com.zendesk:support:$zendeskVersion"
implementation (name:'tenor-android-core-jetified', ext:'aar') // Jetified Tenor Gif library
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion"
Expand All @@ -448,7 +456,6 @@ dependencies {
implementation ("com.google.android.exoplayer:exoplayer:$googleExoPlayerVersion") {
exclude group: 'com.android.support', module: 'support-annotations'
}
compileOnly "org.glassfish:javax.annotation:$glassfishJavaxAnnotationVersion"
implementation "com.google.dagger:dagger-android-support:$gradle.ext.daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$gradle.ext.daggerVersion"
implementation "com.google.dagger:hilt-android:$gradle.ext.daggerVersion"
Expand Down
16 changes: 9 additions & 7 deletions WordPress/jetpack_metadata/PlayStoreStrings.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ msgstr ""
"X-Generator: VsCode\n"
"Project-Id-Version: Jetpack - Apps - Android - Release Notes\n"

msgctxt "release_note_219"
msgctxt "release_note_222"
msgid ""
"21.9:\n"
"Hot news—Jetpack now supports Blaze, so you can reach new readers by promoting a post or page from within the app.\n"
"We also added a post-migration FAQ card to the Help screen, which you’ll see after switching from the WordPress app over to Jetpack.\n"
"22.2:\n"
"- Added warning message for when push notifications are turned off\n"
"- Updated media access permissions to align with Android 13 update\n"
"- Added card to dashboard for purchasing custom domains\n"
"- Added other users’ responses to blogging prompts\n"
msgstr ""

msgctxt "release_note_218"
msgctxt "release_note_221"
msgid ""
"21.8:\n"
"We’ve added a little extra support for sites with individual plugins. These plugins don’t support all app features yet, but you can always install the full Jetpack plugin instead. Ready to launch?\n"
"22.1:\n"
"No updates this week. In the meantime, we're just over here cooling our jets.\n"
msgstr ""

#. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
Expand Down
6 changes: 4 additions & 2 deletions WordPress/jetpack_metadata/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Hot news—Jetpack now supports Blaze, so you can reach new readers by promoting a post or page from within the app.
We also added a post-migration FAQ card to the Help screen, which you’ll see after switching from the WordPress app over to Jetpack.
- Added warning message for when push notifications are turned off
- Updated media access permissions to align with Android 13 update
- Added card to dashboard for purchasing custom domains
- Added other users’ responses to blogging prompts
2 changes: 0 additions & 2 deletions WordPress/jetpack_metadata/release_notes_short.txt
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
Hot news—Jetpack now supports Blaze, so you can reach new readers by promoting a post or page from within the app.
We also added a post-migration FAQ card to the Help screen, which you’ll see after switching from the WordPress app over to Jetpack.
16 changes: 7 additions & 9 deletions WordPress/metadata/PlayStoreStrings.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ msgstr ""
"X-Generator: VsCode\n"
"Project-Id-Version: Release Notes & Play Store Descriptions\n"

msgctxt "release_note_219"
msgctxt "release_note_222"
msgid ""
"21.9:\n"
"Good words are read\n"
"The WordPress logo is blue\n"
"There are no new updates\n"
"Sorry to disappoint you\n"
"22.2:\n"
"- We added a yellow warning box telling you when notifications and blogging reminders are no longer being sent to your device as push notifications.\n"
"- We updated media access permissions for photos, videos, and audio to align with the Android 13 update.\n"
msgstr ""

msgctxt "release_note_218"
msgctxt "release_note_221"
msgid ""
"21.8:\n"
"Say hello to our shiny new in-app landing screen! It almost makes you want to look at it all day and not publish anything new. Almost.\n"
"22.1:\n"
"When you log in to a self-hosted site that connects to Jetpack through individual plugins, you’ll see a pop-up stating that this type of connection doesn’t support the app’s core features yet. You can get around that problem by switching over to the Jetpack app. Up, up, and away.\n"
msgstr ""

#. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
Expand Down
6 changes: 2 additions & 4 deletions WordPress/metadata/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Good words are read
The WordPress logo is blue
There are no new updates
Sorry to disappoint you
- We added a yellow warning box telling you when notifications and blogging reminders are no longer being sent to your device as push notifications.
- We updated media access permissions for photos, videos, and audio to align with the Android 13 update.
3 changes: 0 additions & 3 deletions WordPress/metadata/release_notes_short.txt
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
It is a truth universally acknowledged, that a content creator in possession of a good app, must be in want of an update.

…and we’re still working on it.
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package org.wordpress.android.e2e

import android.Manifest.permission
import androidx.test.rule.GrantPermissionRule
import dagger.hilt.android.testing.HiltAndroidTest
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.wordpress.android.e2e.pages.BlockEditorPage
import org.wordpress.android.e2e.pages.MySitesPage
Expand All @@ -14,9 +11,6 @@ import java.time.Instant

@HiltAndroidTest
class BlockEditorTests : BaseTest() {
@JvmField @Rule
var mRuntimeImageAccessRule = GrantPermissionRule.grant(permission.WRITE_EXTERNAL_STORAGE)

@Before
fun setUp() {
logoutIfNecessary()
Expand Down Expand Up @@ -48,8 +42,8 @@ class BlockEditorTests : BaseTest() {
.verifyPostPublished()
}

@Ignore
@Test
@Ignore("This test is temporarily disabled as being flaky.")
fun e2ePublishFullPost() {
val title = "publishFullPost"
MySitesPage()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,60 @@
package org.wordpress.android.e2e

import android.Manifest.permission
import androidx.test.rule.GrantPermissionRule
import dagger.hilt.android.testing.HiltAndroidTest
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.wordpress.android.e2e.pages.ReaderPage
import org.wordpress.android.support.BaseTest

@HiltAndroidTest
class ReaderTests : BaseTest() {
@JvmField @Rule
var mRuntimeImageAccessRule = GrantPermissionRule.grant(permission.WRITE_EXTERNAL_STORAGE)

@Before
fun setUp() {
logoutIfNecessary()
wpLogin()
ReaderPage().go()
}

var mCoachingPostTitle = "Let's check out the coaching team!"
var mCompetitionPostTitle = "Let's focus on the competition."
@Test
fun e2eNavigateThroughPosts() {
ReaderPage()
.tapFollowingTab()
.openPost(mCoachingPostTitle)
.verifyPostDisplayed(mCoachingPostTitle)
.openBlogOrPost(TITLE_COACHING_POST)
.verifyPostDisplayed(TITLE_COACHING_POST)
.slideToPreviousPost()
.verifyPostDisplayed(mCompetitionPostTitle)
.verifyPostDisplayed(TITLE_COMPETITION_POST)
.slideToNextPost()
.verifyPostDisplayed(mCoachingPostTitle)
.verifyPostDisplayed(TITLE_COACHING_POST)
.goBackToReader()
}

@Test
fun e2eLikePost() {
ReaderPage()
.tapFollowingTab()
.openPost(mCoachingPostTitle)
.openBlogOrPost(TITLE_COACHING_POST)
.likePost()
.verifyPostLiked()
.unlikePost()
.verifyPostNotLiked()
.goBackToReader()
}

@Test
fun e2eBookmarkPost() {
ReaderPage()
.tapFollowingTab()
.openBlogOrPost(TITLE_LONGREADS_BLOG)
.bookmarkPost()
.verifyPostBookmarked()
.removeBookmarkPost()
.verifyPostNotBookmarked()
.goBackToReader()
}

companion object {
private const val TITLE_LONGREADS_BLOG = "Longreads"
private const val TITLE_COACHING_POST = "Let's check out the coaching team!"
private const val TITLE_COMPETITION_POST = "Let's focus on the competition."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import androidx.test.espresso.Espresso
import androidx.test.espresso.matcher.ViewMatchers
import dagger.hilt.android.testing.HiltAndroidTest
import org.junit.After
import org.junit.Assume.assumeTrue
import org.junit.Before
import org.junit.Test
import org.wordpress.android.BuildConfig
import org.wordpress.android.R
import org.wordpress.android.e2e.pages.MySitesPage
import org.wordpress.android.support.BaseTest
Expand Down Expand Up @@ -33,6 +35,10 @@ class StatsTests : BaseTest() {

@Test
fun e2eAllDayStatsLoad() {
// We're not running this test on JP.
// See https://github.com/wordpress-mobile/WordPress-Android/issues/18065
assumeTrue(!BuildConfig.IS_JETPACK_APP)

val todayVisits = StatsVisitsData("97", "28", "14", "11")
val postsList: List<StatsKeyValueData> = StatsMocksReader().readDayTopPostsToList()
val referrersList: List<StatsKeyValueData> = StatsMocksReader().readDayTopReferrersToList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ class MySitesPage {

fun goToStats(): StatsPage {
goToMenuTab()
clickQuickActionOrSiteMenuItem(R.id.quick_action_stats_button, R.string.stats)
val statsButton = Espresso.onView(Matchers.allOf(
ViewMatchers.withText(R.string.stats),
ViewMatchers.withId(R.id.my_site_item_primary_text)
))
WPSupportUtils.clickOn(statsButton)
WPSupportUtils.idleFor(4000)
WPSupportUtils.dismissJetpackAdIfPresent()
WPSupportUtils.waitForElementToBeDisplayedWithoutFailure(R.id.tabLayout)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ReaderPage {
return this
}

fun openPost(postTitle: String?): ReaderViewPage {
fun openBlogOrPost(postTitle: String): ReaderViewPage {
val post = Espresso.onView(ViewMatchers.withChild(ViewMatchers.withText(postTitle)))
WPSupportUtils.scrollIntoView(R.id.reader_recycler_view, post, 1f)
WPSupportUtils.clickOn(postTitle)
Expand Down
Loading

0 comments on commit 21a2c79

Please sign in to comment.