-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Refactor FXIOS-10122 Revert change to accomodate ease of UI tests and re-enable bypassed UI test #22243
Refactor FXIOS-10122 Revert change to accomodate ease of UI tests and re-enable bypassed UI test #22243
Conversation
… message & documentation describing the real issue. Removed workaround now that previous behaviour is reverted.
Client.app: Coverage: 30.49
Generated by 🚫 Danger Swift against 48accd1 |
I will be away on Monday, so if this fix is needed, please feel free to merge (assuming no other issues need to be addressed). 🙏 |
// in the view hierarchy simultaneously. This should not change unintentionally! Check the Debug View Hierarchy. | ||
// Note: Additional matches may also appear if the external website updates. | ||
XCTFail("Too many matches! Has the UI hierarchy or external website unexpectedly changed?") | ||
} |
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.
Perhaps we can do the check in one line:
XCTAssertEqual(app.links.matching(identifier: "SauceDemo.com").count, 1, "Too many matches")
// in the view hierarchy simultaneously. This should not change unintentionally! Check the Debug View Hierarchy. | ||
XCTFail("Too many matches! Has the UI hierarchy unexpectedly changed?") | ||
} | ||
|
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.
Ditto for the use of XCTAssertEqual
here.
XCTAssertEqual(pp.buttons.matching(identifier: AccessibilityIdentifiers.ZoomPageBar.zoomPageZoomLevelLabel).count, 1, "Too many matches")
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.
Sure, I can change both of these! 👍 However, I will need to multiline this specific one, or break the identifier into its own variable to not violate the swiftline line length rule.
@dragosb01 this PR will fix the zoom and navigation tests fixing the regression causing failures in both 🤞 |
@@ -531,6 +531,12 @@ class NavigationTest: BaseTestCase { | |||
private func validateExternalLink(isPrivate: Bool = false) { | |||
navigator.openURL("ultimateqa.com/dummy-automation-websites") |
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.
Wondering if we could use a custom page that we manage so that we don't relay on external sites or as less as possible.. cc @dragosb01 @mdotb-moz
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.
When the test was created i looked over all the custom pages and none had external links.
📜 Tickets
Jira ticket
Github issue
💡 Description
This is a followup PR reverts a small change and the UI test bypass from PR #22075
As well, this also reverts another UI test bypass that was added in PR #22209
Additional Info
UI tests will now only have one match (instead of multiple matches) for a
XCUIElementQuery
when both a normal and private tab have been opened. The behaviour revert allowsfirstMatch
andelement(boundBy:)
to return the expected private tab element instead of one from the (not visible) normal tab.📝 Checklist
You have to check all boxes before merging
@Mergifyio backport release/v120
)