forked from wordpress-mobile/WordPress-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into task/20635-update-fse-check
- Loading branch information
Showing
12 changed files
with
126 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import UITestsFoundation | ||
import XCTest | ||
|
||
final class MenuNavigationTests: XCTestCase { | ||
|
||
override func setUpWithError() throws { | ||
setUpTestSuite() | ||
|
||
try LoginFlow.login( | ||
siteUrl: WPUITestCredentials.testWPcomSiteAddress, | ||
email: WPUITestCredentials.testWPcomUserEmail, | ||
password: WPUITestCredentials.testWPcomPassword | ||
) | ||
} | ||
|
||
override func tearDownWithError() throws { | ||
takeScreenshotOfFailedTest() | ||
removeApp() | ||
} | ||
|
||
// This test is JP only. | ||
func testDomainsNavigation() throws { | ||
try MySiteScreen() | ||
.goToMenu() | ||
.goToDomainsScreen() | ||
.verifyDomainsScreenLoaded() | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
WordPress/UITestsFoundation/Screens/DomainsSuggestionsScreen.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import ScreenObject | ||
import XCTest | ||
|
||
public class DomainsSuggestionsScreen: ScreenObject { | ||
public let tabBar: TabNavComponent | ||
|
||
let siteDomainsNavbarHeaderGetter: (XCUIApplication) -> XCUIElement = { | ||
$0.staticTexts["Search domains"] | ||
} | ||
|
||
var siteDomainsNavbarHeader: XCUIElement { siteDomainsNavbarHeaderGetter(app) } | ||
|
||
public init(app: XCUIApplication = XCUIApplication()) throws { | ||
tabBar = try TabNavComponent() | ||
|
||
try super.init( | ||
expectedElementGetters: [ siteDomainsNavbarHeaderGetter ], | ||
app: app, | ||
waitTimeout: 7 | ||
) | ||
} | ||
|
||
public static func isLoaded() -> Bool { | ||
(try? DomainsSuggestionsScreen().isLoaded) ?? false | ||
} | ||
|
||
@discardableResult | ||
public func verifyDomainsSuggestionsScreenLoaded() -> Self { | ||
XCTAssertTrue(DomainsSuggestionsScreen.isLoaded(), "\"Domains suggestions\" screen isn't loaded.") | ||
return self | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
|
||
## Testing | ||
|
||
- [UI Tests](../WordPress/WordPressUITests) | ||
- [UI Tests](../WordPress/UITests) | ||
|
||
## Others | ||
|
||
|