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

Support TextSwitcher #73

Merged
merged 4 commits into from
Jun 9, 2023
Merged

Support TextSwitcher #73

merged 4 commits into from
Jun 9, 2023

Conversation

Vacxe
Copy link
Member

@Vacxe Vacxe commented Mar 30, 2023

@Unlimity Done

See: #69

@Vacxe Vacxe requested a review from Unlimity as a code owner March 30, 2023 05:49
@Unlimity
Copy link
Contributor

Hmm...

I think that the best way forward would be for a KTextSwitcher to implement TextViewAssertions and override view with a dynamic getter function of switcher.currentView so that whenever switcher is accessed from UI test, for every action and assertion, we provide latest currently displayed text view but at the same time do not duplicate action/assertion code. WDYT?

@Vacxe
Copy link
Member Author

Vacxe commented Mar 30, 2023

Overriding view will create another issue - base checks such as isVisibile or hasParent probably will not work as expected.

Logically we may have 2 views Switcher as it is and currentView for content verification.

@Unlimity
Copy link
Contributor

Sounds reasonable.

So, in the test it would look like:

mySwitcher {
  isVisible()

  currentTextView {
    hasText("abc")
  }
}

In that case, KTextSwitcher should just extend KBaseView and provide public final property currentTextView of KTextView type. That way, no code duplication needed at all.

@Vacxe
Copy link
Member Author

Vacxe commented Apr 12, 2023

@Unlimity
Layout inspector from TextSwitcher
image
Thats a top level component without any nested TextView and we can't declare matcher for currentTextView then. That an other problem. I will be happy if you can jump on this branch and take a look. TBH I'm not happy with Copy-Paste impl.

@Vacxe Vacxe merged commit f0a162a into master Jun 9, 2023
9 of 16 checks passed
@Vacxe Vacxe deleted the text-swither-support branch July 7, 2023 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants