forked from attentive-mobile/attentive-ios-sdk
-
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.
added UI Test for validating switch domain
- Loading branch information
Vladimir Espinola
committed
Jun 14, 2024
1 parent
2c83ada
commit 35f5da1
Showing
6 changed files
with
121 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// | ||
// SwitchDomainPage.swift | ||
// CreativeUITest | ||
// | ||
// Created by Vladimir - Work on 2024-06-14. | ||
// | ||
|
||
import XCTest | ||
|
||
struct SwitchDomainPage: Page { | ||
private init() { } | ||
|
||
@discardableResult | ||
static func tapOnOk() -> Self.Type { | ||
okButton.tapOnElement() | ||
return self | ||
} | ||
|
||
@discardableResult | ||
static func tapOnCancel() -> Self.Type { | ||
cancelButton.tapOnElement() | ||
return self | ||
} | ||
|
||
@discardableResult | ||
static func fillDomainInput(text: String) -> Self.Type { | ||
domainTextField.tapOnElement() | ||
domainTextField.fillTextField(text) | ||
return self | ||
} | ||
|
||
@discardableResult | ||
static func verifyIfTitleExists() -> Self.Type { | ||
guard title.elementExists() else { | ||
XCTFail("Title does not exists") | ||
return self | ||
} | ||
return self | ||
} | ||
} | ||
|
||
fileprivate extension SwitchDomainPage { | ||
static var title: XCUIElement { | ||
app.staticTexts["Switch Domain"] | ||
} | ||
|
||
static var domainTextField: XCUIElement { | ||
app.textFields["Enter the new Domain here"] | ||
} | ||
|
||
static var okButton: XCUIElement { | ||
app.buttons["OK"] | ||
} | ||
|
||
static var cancelButton: XCUIElement { | ||
app.buttons["Cancel"] | ||
} | ||
} |
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