Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pauljohanneskraft committed Nov 19, 2024
1 parent fcda9c7 commit 088e66f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package edu.stanford.spezi.core.design.personalInfo

import androidx.compose.ui.res.stringResource

Check warning on line 3 in core/design/src/androidTest/kotlin/edu/stanford/spezi/core/design/personalInfo/UserProfileTest.kt

View workflow job for this annotation

GitHub Actions / detekt

[detekt] core/design/src/androidTest/kotlin/edu/stanford/spezi/core/design/personalInfo/UserProfileTest.kt#L3 <detekt.NoUnusedImports>

Unused import
Raw output
/github/workspace/core/design/src/androidTest/kotlin/edu/stanford/spezi/core/design/personalInfo/UserProfileTest.kt:3:1: warning: Unused import (detekt.NoUnusedImports)

Check warning on line 3 in core/design/src/androidTest/kotlin/edu/stanford/spezi/core/design/personalInfo/UserProfileTest.kt

View workflow job for this annotation

GitHub Actions / detekt

[detekt] core/design/src/androidTest/kotlin/edu/stanford/spezi/core/design/personalInfo/UserProfileTest.kt#L3 <detekt.UnusedImports>

The import 'androidx.compose.ui.res.stringResource' is unused.
Raw output
/github/workspace/core/design/src/androidTest/kotlin/edu/stanford/spezi/core/design/personalInfo/UserProfileTest.kt:3:1: warning: The import 'androidx.compose.ui.res.stringResource' is unused. (detekt.UnusedImports)
import androidx.compose.ui.test.junit4.createComposeRule
import edu.stanford.spezi.core.design.personalInfo.composables.UserProfileTestComposable
import edu.stanford.spezi.core.design.personalInfo.simulators.UserProfileTestSimulator
Expand All @@ -25,7 +26,7 @@ class UserProfileTest {
assertUserInitialsExists(true, "PS")
assertUserInitialsExists(true, "LS")
waitUntilUserInitialsDisappear("LS")
assertImageExists()
assertImageExists("Person")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class UserProfileTestSimulator(
}
}

fun assertImageExists() {
fun assertImageExists(contentDescription: String) {
composeTestRule
.onAllNodesWithContentDescription("")
.onAllNodesWithContentDescription(contentDescription)
.assertCountEquals(1)
}
}

0 comments on commit 088e66f

Please sign in to comment.