Skip to content
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

Make more Selector properties work on iOS #2030

Merged
merged 26 commits into from
Feb 9, 2024

Conversation

bartekpacia
Copy link
Contributor

@bartekpacia bartekpacia commented Dec 22, 2023

This PR resolves #1554.

Copy link

docs-page bot commented Dec 22, 2023

To view this pull requests documentation preview, visit the following URL:

patrol.leancode.co/~2030

Documentation is deployed and generated using docs.page.

@github-actions github-actions bot added the package: patrol Related to the patrol package (native automation, test bundling) label Dec 22, 2023
@bartekpacia
Copy link
Contributor Author

Some thoughts for when I'm gone:

  • I really think that Selector.text and Selector.contentDescription should be the same thing (preferably named Selector.label) @piotruela

@piotruela piotruela added the cirrusci Mark a PR with this label to run CirrusCI on it label Jan 4, 2024
@piotruela piotruela requested a review from zltnDC January 11, 2024 07:04
@piotruela
Copy link
Collaborator

I made Selector's textStartsWith and textContains work with methods tap, doubleTap, waitUntilVisible, enterText and getNativeViews. I wrote some tests in ios_selector_test.dart but I spotted a weird behavior there. If I run just a single test it passes but when I try to run more than one at once they all fail. I could not find a cause of that but before we merge this PR we need to investigate this.

@jBorkowska
Copy link
Collaborator

I investigated failing tests, it is caused by another bug: #1868, I suggest to merge this PR regardless to those tests failing

@abhiche
Copy link

abhiche commented Feb 1, 2024

When do you plan to release this?

@@ -1,3 +1,93 @@
extension Selector {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This extension should be rather below #if PATROL_ENABLED.

@@ -843,6 +835,25 @@

group.wait()
}

func createLogMessage(element: String, from selector: Selector) -> String {
var logMessage = element
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you consider logging debugDescription ? https://developer.apple.com/documentation/xctest/xcuielementquery/1500412-debugdescription
This property can contain valuable stuff.

var enabled: Bool?
var focused: Bool?
var pkg: String?
public struct Selector: Codable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be modified by hand - this code is generated from schema.

@zltnDC zltnDC merged commit da6404a into master Feb 9, 2024
12 checks passed
@zltnDC zltnDC deleted the feature/ios_text_startswith_endswith branch February 9, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cirrusci Mark a PR with this label to run CirrusCI on it package: patrol Related to the patrol package (native automation, test bundling)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disparity of Selector behavior between Android and iOS
6 participants