android / android/codelab-android-compose

[TestingCodelab] (Optional Exercise): How to access state in RallyApp

Offen
#238 7 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @JoseAlcerreca Auf GitHub ansehen
Vorherrschende Sprache
Kotlin
Sterne
1.7k
Forks
799
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi, in the hints for Step 7, it says
> The scope of the test needs to include the state, which is owned by `RallyApp`.

I looked at the implementation of `RallyApp`, and I can see that the state is stored _inside_ the component, so I don't know how I can access it to assert on its value.

Am I supposed to modify the `RallyApp` component to move the state elsewhere, and if so, where? In a ViewModel?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.