Private val is better.

This commit is contained in:
Benoit Marty 2022-09-06 15:00:55 +02:00
parent 4dc01fcfa6
commit f604b1d384
5 changed files with 4 additions and 9 deletions

View File

@ -51,8 +51,7 @@ import im.vector.app.withIdlingResource
import timber.log.Timber
class ElementRobot {
var features: VectorFeatures = DefaultVectorFeatures()
private val features: VectorFeatures = DefaultVectorFeatures()
fun onboarding(block: OnboardingRobot.() -> Unit) {
block(OnboardingRobot())

View File

@ -27,8 +27,7 @@ import im.vector.app.features.VectorFeatures
class NewRoomRobot(
var createdRoom: Boolean = false
) {
private var features: VectorFeatures = DefaultVectorFeatures()
private val features: VectorFeatures = DefaultVectorFeatures()
fun createNewRoom(block: CreateNewRoomRobot.() -> Unit) {
if (features.isNewAppLayoutEnabled()) {

View File

@ -33,7 +33,6 @@ import im.vector.app.features.DefaultVectorFeatures
import im.vector.app.waitForView
class OnboardingRobot {
private val defaultVectorFeatures = DefaultVectorFeatures()
fun crawl() {

View File

@ -33,8 +33,7 @@ import im.vector.app.features.VectorFeatures
import im.vector.app.features.roomdirectory.RoomDirectoryActivity
class RoomListRobot {
private var features: VectorFeatures = DefaultVectorFeatures()
private val features: VectorFeatures = DefaultVectorFeatures()
fun openRoom(roomName: String, block: RoomDetailRobot.() -> Unit) {
clickOn(roomName)

View File

@ -33,8 +33,7 @@ import im.vector.app.features.VectorFeatures
import org.hamcrest.Matchers
class SpaceRobot {
private var features: VectorFeatures = DefaultVectorFeatures()
private val features: VectorFeatures = DefaultVectorFeatures()
fun createSpace(isFirstSpace: Boolean, block: SpaceCreateRobot.() -> Unit) {
if (features.isNewAppLayoutEnabled()) {