Automattic / Automattic/ScreenObject

Offer `static` version of `isLoaded`

Aperta
#5 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Swift
Stelle
6
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

While working on [this](https://github.com/Automattic/simplenote-ios/pull/1401) Simplenote iOS automation PR, I found myself implementing a `static` version of `isLoaded`. That's a functionality that we'll need in different screens across our projects, so it would be great to push it down to the `ScreenObject` base class.

One obstacle in the way is that, currently, the `init` method makes the tests fail if the element is not found. I think we should change this to simply throwing an error, or even not checking that the screen exists (maybe) to:

1. Allow a `static` `isLoaded` implementation that internally initializes and instance and calls its `isLoaded` instance property
2. Be less opinionated and let consumers deal with the screen not being available at init time

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia con la classe base ScreenObject, concentrandoti sul suo metodo init e sulla proprietà di istanza isLoaded, poi esamina la PR collegata relativa all’automazione di Simplenote iOS. Definisci come un isLoaded statico dovrebbe inizializzare lo screen e come dovrebbero essere gestiti gli elementi non disponibili durante l’inizializzazione. Il lavoro è completato quando i consumer possono usare il controllo statico su più screen senza che l’inizializzazione fallisca prematuramente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
swift
Ambito
mobile, testing
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.