-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MTE-1520 [v119] Add simple test for Fakespot #16405
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4386004
Add FakespotTests
clarmso 5bccaa5
Disable FakespotTests for ExperimentalIntegration and Performance tes…
clarmso 8f57f31
Use accessibility identifiers. Add testrail link.
clarmso 720f066
Skip test for iPad
clarmso 7e63fd0
Update the test to use the icon
clarmso 02c0463
Debug warnings
clarmso 48a4799
Remove debug
clarmso 7f90fa5
Update Tests/XCUITests/FakespotTests.swift
clarmso 90ccfc4
Import shared for strings
clarmso d01f30a
Update Tests/XCUITests/FakespotTests.swift
clarmso 75190f5
Remove import Shared statement for lint
clarmso f35c310
Fix identifier
clarmso e63862d
remove warning for Shared
isabelrios 42b7301
Merge remote-tracking branch 'upstream/main' into MTE-1520-Fakespot
clarmso 9c50036
Merge remote-tracking branch 'upstream/main' into MTE-1520-Fakespot
clarmso File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎉 |
||||
app.buttons[AccessibilityIdentifiers.Toolbar.shoppingButton].tap() | ||||
mozWaitForElementToExist(app.staticTexts[AccessibilityIdentifiers.Shopping.sheetHeaderTitle]) | ||||
XCTAssertEqual(app.staticTexts[AccessibilityIdentifiers.Shopping.sheetHeaderTitle].label, .Shopping.SheetHeaderTitle) | ||||
|
||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I followed the same style as in the source code here.
|
||||
// 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import Shared
is giving me a new warning but the identifier does not work without this import. 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clarmso we should try to fix this warning before merging, otherwise we will be close to threshold again... I can try to help you with that