-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add FakespotTests * Disable FakespotTests for ExperimentalIntegration and Performance test plans * Use accessibility identifiers. Add testrail link. * Skip test for iPad * Update the test to use the icon * Import shared for strings * Update Tests/XCUITests/FakespotTests.swift * Remove import Shared statement for lint * remove warning for Shared --------- Co-authored-by: Winnie Teichmann <[email protected]> Co-authored-by: isabelrios <[email protected]>
- Loading branch information
1 parent
685c65d
commit e260331
Showing
10 changed files
with
52 additions
and
0 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
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,38 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/ | ||
import XCTest | ||
import Shared | ||
|
||
class FakespotTests: BaseTestCase { | ||
// https://testrail.stage.mozaws.net/index.php?/cases/view/2288332 | ||
func testFakespotAvailable() throws { | ||
if iPad() { | ||
throw XCTSkip("Fakespot is not enabled in iPad") | ||
} else { | ||
navigator.openURL("https://www.amazon.com") | ||
waitUntilPageLoad() | ||
|
||
// Search for and open a shoe listing | ||
let website = app.webViews["contentView"].firstMatch | ||
mozWaitForElementToExist(website.textFields["Search Amazon"]) | ||
XCTAssert(website.textFields["Search Amazon"].isEnabled) | ||
website.textFields["Search Amazon"].tap() | ||
website.textFields["Search Amazon"].typeText("Shoe") | ||
website.buttons["Go"].tap() | ||
waitUntilPageLoad() | ||
website.images.firstMatch.tap() | ||
|
||
// Tap the shopping cart icon | ||
waitUntilPageLoad() | ||
mozWaitForElementToExist(app.buttons[AccessibilityIdentifiers.Toolbar.shoppingButton]) | ||
app.buttons[AccessibilityIdentifiers.Toolbar.shoppingButton].tap() | ||
mozWaitForElementToExist(app.staticTexts[AccessibilityIdentifiers.Shopping.sheetHeaderTitle]) | ||
XCTAssertEqual(app.staticTexts[AccessibilityIdentifiers.Shopping.sheetHeaderTitle].label, .Shopping.SheetHeaderTitle) | ||
|
||
// Close the popover | ||
app.otherElements.buttons[AccessibilityIdentifiers.Shopping.sheetCloseButton].tap() | ||
mozWaitForElementToNotExist(app.otherElements[AccessibilityIdentifiers.Shopping.sheetHeaderTitle]) | ||
} | ||
} | ||
} |
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