Skip to content

Commit

Permalink
:fix: change to staffApiClient
Browse files Browse the repository at this point in the history
  • Loading branch information
Oxypetalum7 committed Sep 17, 2023
1 parent a3ac9bc commit f963881
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package io.github.droidkaigi.confsched2023.testing.robot
import androidx.compose.ui.test.isRoot
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
import com.github.takahirom.roborazzi.captureRoboImage
import io.github.droidkaigi.confsched2023.data.sessions.FakeSessionsApiClient
import io.github.droidkaigi.confsched2023.data.sessions.SessionsApiClient
import io.github.droidkaigi.confsched2023.data.staff.FakeStaffApiClient
import io.github.droidkaigi.confsched2023.data.staff.StaffApiClient
import io.github.droidkaigi.confsched2023.designsystem.theme.KaigiTheme
import io.github.droidkaigi.confsched2023.staff.StaffScreen
import io.github.droidkaigi.confsched2023.testing.RobotTestRule
Expand All @@ -19,9 +19,9 @@ class StaffScreenRobot @Inject constructor(

@Inject lateinit var robotTestRule: RobotTestRule

@Inject lateinit var sessionsApiClient: SessionsApiClient
val fakeSessionsApiClient: FakeSessionsApiClient
get() = sessionsApiClient as FakeSessionsApiClient
@Inject lateinit var staffApiClient: StaffApiClient
val fakeStaffApiClient: FakeStaffApiClient
get() = staffApiClient as FakeStaffApiClient
private lateinit var composeTestRule: AndroidComposeTestRule<*, *>

operator fun invoke(
Expand Down Expand Up @@ -51,10 +51,10 @@ class StaffScreenRobot @Inject constructor(
}

fun setupServer(serverStatus: ServerStatus) {
fakeSessionsApiClient.setup(
fakeStaffApiClient.setup(
when (serverStatus) {
ServerStatus.Operational -> FakeSessionsApiClient.Status.Operational
ServerStatus.Error -> FakeSessionsApiClient.Status.Error
ServerStatus.Operational -> FakeStaffApiClient.Status.Operational
ServerStatus.Error -> FakeStaffApiClient.Status.Error
},
)
}
Expand Down

0 comments on commit f963881

Please sign in to comment.