android / android/codelab-android-compose

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

未关闭
#238 7 条评论 0 个 reaction 已指派 1 人 已被 @JoseAlcerreca 认领 在 GitHub 查看
主要语言
Kotlin
星标
1.7k
派生
800
PR 合并指标
30 天内没有已合并 PR

描述

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?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。