diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_106707880_posts_439_likes.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_106707880_posts_439_likes.json new file mode 100644 index 000000000000..e3c988485939 --- /dev/null +++ b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_106707880_posts_439_likes.json @@ -0,0 +1,14 @@ +{ + "request": { + "method": "GET", + "urlPath": "/rest/v1.2/sites/106707880/posts/439/likes" + }, + "response": { + "status": 200, + "jsonBody": { + "found": 0, + "i_like": false, + "likes": [] + } + } +} diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_106707880_posts_439_related.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_106707880_posts_439_related.json new file mode 100644 index 000000000000..933caf371ad2 --- /dev/null +++ b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_106707880_posts_439_related.json @@ -0,0 +1,42 @@ +{ + "request": { + "method": "GET", + "urlPath": "/rest/v1.2/read/site/106707880/post/439/related" + }, + "response": { + "status": 200, + "jsonBody": { + "algorithm_local": "read:related:posts:local/7", + "algorithm_global": "read:related:posts:global/1", + "posts": [ + { + "ID": 974, + "site_ID": 80511, + "author": { + "ID": 29043, + "login": "test", + "email": false, + "name": "Test User", + "first_name": "Test", + "last_name": "User", + "site_ID": 80511 + }, + "date": "2024-03-07T23:00:40+00:00", + "modified": "2024-03-07T23:00:40+00:00", + "title": "title-a", + "URL": "https://example.wordpress.com/2024/03/07/hello-974", + "content": "content-a", + "excerpt": "content-a", + "slug": "hello-974", + "status": "draft", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "featured_image": "", + "format": "standard" + } + ] + } + } +} diff --git a/Modules/Sources/UITestsFoundation/Screens/ReaderScreen.swift b/Modules/Sources/UITestsFoundation/Screens/ReaderScreen.swift index d37f96a24ccb..2e05f4764862 100644 --- a/Modules/Sources/UITestsFoundation/Screens/ReaderScreen.swift +++ b/Modules/Sources/UITestsFoundation/Screens/ReaderScreen.swift @@ -64,7 +64,7 @@ public class ReaderScreen: ScreenObject { private func postContentEquals(_ expected: String) -> Bool { let equalsPostContent = NSPredicate(format: "label == %@", expected) - let isPostContentEqual = app.staticTexts.element(matching: equalsPostContent).waitForIsHittable(timeout: 3) + let isPostContentEqual = app.staticTexts.element(matching: equalsPostContent).waitForIsHittable(timeout: 15) return isPostContentEqual }