Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Support UI testing composables by using testTag #26826

Closed
Mugurell opened this issue Sep 5, 2022 · 3 comments · Fixed by #26843, #27843, nathanmkaya/fenix#108, fork-house/fenix#14 or Leland-Takamine/fenix#159
Assignees
Milestone

Comments

@Mugurell
Copy link
Contributor

Mugurell commented Sep 5, 2022

After discussing with the QA team it was apparent that testing is currently hindered by the inability / inefficiency of identifying composables on the screen.
testTags are the approach recommended by the Compose team to help with that - https://developer.android.com/jetpack/compose/testing and we are already using them in A-C - https://searchfox.org/mozilla-mobile/search?q=testTag&path=&case=true&regexp=false

I propose starting to add (even retroactively for the scenarios raised by QA) testTags to the composables used on Fenix with the following naming scheme:

<feature>.<composable>(.<optional other sub composables>)

Compose v1.2 will also allow better interoperability with UIAutomator by allowing the testTags to be used in already common calls in the form of

findObject(By.res(<testTag>)).

An update to this newer version is prepared in #26763.

┆Issue is synchronized with this Jira Task

@github-actions github-actions bot added the needs:triage Issue needs triage label Sep 5, 2022
@Mugurell Mugurell removed the needs:triage Issue needs triage label Sep 6, 2022
@Mugurell Mugurell self-assigned this Sep 6, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Sep 6, 2022
Split the ClickableSubstringLink to two separate strings which can be used
separately in UI tests.
Deleted the ClickableSubstringLink as it is now unused and although better
supports a link inside a string it's seen that it cannot be used in tests and
so we should also not use it in code.
Mugurell added a commit to Mugurell/fenix that referenced this issue Sep 6, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Sep 6, 2022
@github-actions github-actions bot added the eng:reopen-for-qa Reopens and tags the issue for QA needed when the issue is merged label Sep 6, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Sep 14, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Sep 14, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 8, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 8, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 8, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 8, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 8, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 8, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 9, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 9, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 9, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 9, 2022
Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 9, 2022
@github-actions github-actions bot added this to the 108 milestone Nov 9, 2022
@github-actions github-actions bot reopened this Nov 9, 2022
@github-actions github-actions bot added eng:qa:needed QA Needed and removed eng:reopen-for-qa Reopens and tags the issue for QA needed when the issue is merged labels Nov 9, 2022
@Mugurell
Copy link
Contributor Author

@sv-ohorvath / @AndiAJ to confirm that the new testTags do help automation testing.

@AndiAJ AndiAJ removed the eng:qa:needed QA Needed label Nov 10, 2022
@AndiAJ
Copy link
Collaborator

AndiAJ commented Nov 10, 2022

Thanks @Mugurell for helping us out ! ❤️

I'll remove the label, and if problems occur while trying query and to interact with the items will ping you.

Mugurell added a commit to Mugurell/fenix that referenced this issue Nov 15, 2022
@github-actions github-actions bot added the eng:reopen-for-qa Reopens and tags the issue for QA needed when the issue is merged label Nov 15, 2022
@mergify mergify bot closed this as completed in #27843 Nov 16, 2022
@github-actions github-actions bot reopened this Nov 16, 2022
@github-actions github-actions bot added eng:qa:needed QA Needed and removed eng:reopen-for-qa Reopens and tags the issue for QA needed when the issue is merged labels Nov 16, 2022
@AndiAJ AndiAJ removed the eng:qa:needed QA Needed label Nov 17, 2022
@cpeterso
Copy link

Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1807300

Change performed by the Move to Bugzilla add-on.

JohanLorenzo pushed a commit to mozilla-mobile/firefox-android that referenced this issue Feb 14, 2023
JohanLorenzo pushed a commit to mozilla-mobile/firefox-android that referenced this issue Feb 14, 2023
JohanLorenzo pushed a commit to mozilla-mobile/firefox-android that referenced this issue Feb 14, 2023
JohanLorenzo pushed a commit to mozilla-mobile/firefox-android that referenced this issue Feb 14, 2023
JohanLorenzo pushed a commit to mozilla-mobile/firefox-android that referenced this issue Feb 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.