From ae49d1999c51e1d23387ecc6db59104ec410db12 Mon Sep 17 00:00:00 2001 From: David Christiandy <1299411+dvdchr@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:35:05 +0700 Subject: [PATCH 1/2] Update Follow terms to Subscribe --- WordPress/UITestsFoundation/Screens/ReaderScreen.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WordPress/UITestsFoundation/Screens/ReaderScreen.swift b/WordPress/UITestsFoundation/Screens/ReaderScreen.swift index 1c18d7767db9..1400e8c643fd 100644 --- a/WordPress/UITestsFoundation/Screens/ReaderScreen.swift +++ b/WordPress/UITestsFoundation/Screens/ReaderScreen.swift @@ -40,11 +40,11 @@ public class ReaderScreen: ScreenObject { } private let followButtonGetter: (XCUIApplication) -> XCUIElement = { - $0.buttons["Follow"] + $0.buttons["Subscribe"] } private let followingButtonGetter: (XCUIApplication) -> XCUIElement = { - $0.buttons["Following"] + $0.buttons["Subscribed"] } private let subscriptionsMenuButtonGetter: (XCUIApplication) -> XCUIElement = { From eb4f7d9b4fa47aff050e18662e407d3bd488080d Mon Sep 17 00:00:00 2001 From: Tiago Marques Date: Fri, 2 Feb 2024 10:11:52 -0300 Subject: [PATCH 2/2] Replace 'follow' by 'subscribe' to match the app language --- WordPress/UITests/Tests/ReaderTests.swift | 4 ++-- .../Screens/ReaderScreen.swift | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/WordPress/UITests/Tests/ReaderTests.swift b/WordPress/UITests/Tests/ReaderTests.swift index 0ad0a65c8242..4d1b948aa60a 100644 --- a/WordPress/UITests/Tests/ReaderTests.swift +++ b/WordPress/UITests/Tests/ReaderTests.swift @@ -46,8 +46,8 @@ class ReaderTests: XCTestCase { .switchToStream(.discover) .selectTopic() .verifyTopicLoaded() - .followTopic() - .verifyTopicFollowed() + .subscribeToTopic() + .verifyTopicSubscribed() } func testSavePost() throws { diff --git a/WordPress/UITestsFoundation/Screens/ReaderScreen.swift b/WordPress/UITestsFoundation/Screens/ReaderScreen.swift index 1400e8c643fd..8a7df3aa1f85 100644 --- a/WordPress/UITestsFoundation/Screens/ReaderScreen.swift +++ b/WordPress/UITestsFoundation/Screens/ReaderScreen.swift @@ -39,11 +39,11 @@ public class ReaderScreen: ScreenObject { $0.buttons["Dismiss"] } - private let followButtonGetter: (XCUIApplication) -> XCUIElement = { + private let subscribeButtonGetter: (XCUIApplication) -> XCUIElement = { $0.buttons["Subscribe"] } - private let followingButtonGetter: (XCUIApplication) -> XCUIElement = { + private let subscribedButtonGetter: (XCUIApplication) -> XCUIElement = { $0.buttons["Subscribed"] } @@ -80,8 +80,8 @@ public class ReaderScreen: ScreenObject { var discoverButton: XCUIElement { discoverButtonGetter(app) } var dismissButton: XCUIElement { dismissButtonGetter(app) } var firstPostLikeButton: XCUIElement { firstPostLikeButtonGetter(app) } - var followButton: XCUIElement { followButtonGetter(app) } - var followingButton: XCUIElement { followingButtonGetter(app) } + var subscribeButton: XCUIElement { subscribeButtonGetter(app) } + var subscribedButton: XCUIElement { subscribedButtonGetter(app) } var subscriptionsMenuButton: XCUIElement { subscriptionsMenuButtonGetter(app) } var likesTabButton: XCUIElement { likesTabButtonGetter(app) } var noResultsView: XCUIElement { noResultsViewGetter(app) } @@ -167,13 +167,13 @@ public class ReaderScreen: ScreenObject { public func verifyTopicLoaded(file: StaticString = #file, line: UInt = #line) -> Self { XCTAssertTrue(readerButton.waitForExistence(timeout: 3), file: file, line: line) - XCTAssertTrue(followButton.waitForExistence(timeout: 3), file: file, line: line) + XCTAssertTrue(subscribeButton.waitForExistence(timeout: 3), file: file, line: line) return self } - public func followTopic() -> Self { - waitForExistenceAndTap(followButton, timeout: 3) + public func subscribeToTopic() -> Self { + waitForExistenceAndTap(subscribeButton, timeout: 3) return self } @@ -222,9 +222,9 @@ public class ReaderScreen: ScreenObject { } @discardableResult - public func verifyTopicFollowed(file: StaticString = #file, line: UInt = #line) -> Self { - XCTAssertTrue(followingButton.waitForExistence(timeout: 3), file: file, line: line) - XCTAssertTrue(followingButton.isSelected, file: file, line: line) + public func verifyTopicSubscribed(file: StaticString = #file, line: UInt = #line) -> Self { + XCTAssertTrue(subscribedButton.waitForExistence(timeout: 3), file: file, line: line) + XCTAssertTrue(subscribedButton.isSelected, file: file, line: line) return self }