android / android/android-test
I want move activity state to STOPPED, ActivityScenario#moveToState(STOPPED)
- Vorherrschende Sprache
- Java
- Sterne
- 1.2k
- Forks
- 342
- Ø Merge
- 11 Std. 29 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
### Description
I want move activity state to STOPPED,but I can not find STOPPED State enum. And I read the source code
```
public ActivityScenario moveToState(State newState) {
...
switch(newState) {
case CREATED:
this.activityInvoker.stopActivity(currentState.activity);
break;
...
```
I should call moveToState(CREATED), it's hard to understand.
### Steps to Reproduce
### Expected Results
### Actual Results
### AndroidX Test and Android OS Versions
```
'androidx.test:runner:1.1.0',
'androidx.test:rules:1.1.0',
'androidx.test.ext:junit:1.1.2',
```
### Link to a public git repo demonstrating the problem:
Beitragsleitfaden
Rechercherichtung
Start with ActivityScenario#moveToState(State) and the switch shown in the issue, then inspect how activity lifecycle states are represented and transitioned. Confirm how an explicit STOPPED state should behave and add coverage demonstrating that moveToState(STOPPED) reaches the expected lifecycle state.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- mobile, testing
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100