-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from michaelbel/develop
1.4.2
- Loading branch information
Showing
141 changed files
with
2,401 additions
and
798 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
**Task:** | ||
|
||
**Screenshots:** | ||
|
||
<div style="dispaly:flex"> | ||
<!-- <img src="URL" width="40%"> --> | ||
<!-- <img src="URL" width="40%"> --> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
app/src/androidTest/kotlin/org/michaelbel/movies/SettingsDynamicColorsBoxTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package org.michaelbel.movies | ||
|
||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.test.assert | ||
import androidx.compose.ui.test.assertIsDisplayed | ||
import androidx.compose.ui.test.hasClickAction | ||
import androidx.compose.ui.test.hasNoClickAction | ||
import androidx.compose.ui.test.junit4.ComposeContentTestRule | ||
import androidx.compose.ui.test.junit4.createComposeRule | ||
import androidx.compose.ui.test.onNodeWithTag | ||
import androidx.compose.ui.unit.dp | ||
import org.junit.Rule | ||
import org.junit.Test | ||
import org.michaelbel.movies.settings.ui.SettingsDynamicColorsBox | ||
import org.michaelbel.movies.ui.theme.MoviesTheme | ||
|
||
class SettingsDynamicColorsBoxTest { | ||
|
||
@get:Rule | ||
val composeTestRule: ComposeContentTestRule = createComposeRule() | ||
|
||
@Test | ||
fun testSettingsDynamicColorsBox() { | ||
composeTestRule.setContent { | ||
MoviesTheme { | ||
SettingsDynamicColorsBox( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.height(48.dp) | ||
.clickable {}, | ||
isDynamicColorsEnabled = IS_DYNAMIC_COLORS_ENABLED | ||
) | ||
} | ||
} | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "ConstraintLayout", useUnmergedTree = true) | ||
.assert(hasClickAction()) | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "Text", useUnmergedTree = true) | ||
.assertIsDisplayed() | ||
.assert(hasNoClickAction()) | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "Switch", useUnmergedTree = true) | ||
.assertIsDisplayed() | ||
.assert(hasNoClickAction()) | ||
} | ||
|
||
private companion object { | ||
private const val IS_DYNAMIC_COLORS_ENABLED = true | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
app/src/androidTest/kotlin/org/michaelbel/movies/SettingsLanguageBoxTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package org.michaelbel.movies | ||
|
||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.test.assert | ||
import androidx.compose.ui.test.assertIsDisplayed | ||
import androidx.compose.ui.test.hasClickAction | ||
import androidx.compose.ui.test.hasNoClickAction | ||
import androidx.compose.ui.test.junit4.ComposeContentTestRule | ||
import androidx.compose.ui.test.junit4.createComposeRule | ||
import androidx.compose.ui.test.onNodeWithTag | ||
import androidx.compose.ui.unit.dp | ||
import org.junit.Rule | ||
import org.junit.Test | ||
import org.michaelbel.movies.settings.ui.SettingsLanguageBox | ||
import org.michaelbel.movies.ui.language.model.AppLanguage | ||
import org.michaelbel.movies.ui.theme.MoviesTheme | ||
|
||
class SettingsLanguageBoxTest { | ||
|
||
@get:Rule | ||
val composeTestRule: ComposeContentTestRule = createComposeRule() | ||
|
||
@Test | ||
fun testSettingsLanguageBox() { | ||
composeTestRule.setContent { | ||
MoviesTheme { | ||
SettingsLanguageBox( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.height(48.dp) | ||
.clickable {}, | ||
currentLanguage = CURRENT_LANGUAGE | ||
) | ||
} | ||
} | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "ConstraintLayout", useUnmergedTree = true) | ||
.assert(hasClickAction()) | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "TitleText", useUnmergedTree = true) | ||
.assertIsDisplayed() | ||
.assert(hasNoClickAction()) | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "ValueText", useUnmergedTree = true) | ||
.assertIsDisplayed() | ||
.assert(hasNoClickAction()) | ||
} | ||
|
||
private companion object { | ||
private val CURRENT_LANGUAGE = AppLanguage.English | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
app/src/androidTest/kotlin/org/michaelbel/movies/SettingsPostNotificationsBoxTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package org.michaelbel.movies | ||
|
||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.test.assert | ||
import androidx.compose.ui.test.assertIsDisplayed | ||
import androidx.compose.ui.test.hasClickAction | ||
import androidx.compose.ui.test.hasNoClickAction | ||
import androidx.compose.ui.test.junit4.ComposeContentTestRule | ||
import androidx.compose.ui.test.junit4.createComposeRule | ||
import androidx.compose.ui.test.onNodeWithTag | ||
import androidx.compose.ui.unit.dp | ||
import org.junit.Rule | ||
import org.junit.Test | ||
import org.michaelbel.movies.settings.ui.SettingsPostNotificationsBox | ||
import org.michaelbel.movies.ui.theme.MoviesTheme | ||
|
||
class SettingsPostNotificationsBoxTest { | ||
|
||
@get:Rule | ||
val composeTestRule: ComposeContentTestRule = createComposeRule() | ||
|
||
@Test | ||
fun testSettingsPostNotificationsBox() { | ||
composeTestRule.setContent { | ||
MoviesTheme { | ||
SettingsPostNotificationsBox( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.height(48.dp) | ||
.clickable {}, | ||
areNotificationsEnabled = ARE_NOTIFICATIONS_ENABLED | ||
) | ||
} | ||
} | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "ConstraintLayout", useUnmergedTree = true) | ||
.assert(hasClickAction()) | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "Text", useUnmergedTree = true) | ||
.assertIsDisplayed() | ||
.assert(hasNoClickAction()) | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "Switch", useUnmergedTree = true) | ||
.assertIsDisplayed() | ||
.assert(hasNoClickAction()) | ||
} | ||
|
||
private companion object { | ||
private const val ARE_NOTIFICATIONS_ENABLED = true | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
app/src/androidTest/kotlin/org/michaelbel/movies/SettingsReviewBoxTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.michaelbel.movies | ||
|
||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.test.assert | ||
import androidx.compose.ui.test.assertIsDisplayed | ||
import androidx.compose.ui.test.hasClickAction | ||
import androidx.compose.ui.test.hasNoClickAction | ||
import androidx.compose.ui.test.junit4.ComposeContentTestRule | ||
import androidx.compose.ui.test.junit4.createComposeRule | ||
import androidx.compose.ui.test.onNodeWithTag | ||
import androidx.compose.ui.unit.dp | ||
import org.junit.Rule | ||
import org.junit.Test | ||
import org.michaelbel.movies.settings.ui.SettingsReviewBox | ||
import org.michaelbel.movies.ui.theme.MoviesTheme | ||
|
||
class SettingsReviewBoxTest { | ||
|
||
@get:Rule | ||
val composeTestRule: ComposeContentTestRule = createComposeRule() | ||
|
||
@Test | ||
fun testSettingsReviewBox() { | ||
composeTestRule.setContent { | ||
MoviesTheme { | ||
SettingsReviewBox( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.height(48.dp) | ||
.clickable {} | ||
) | ||
} | ||
} | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "ConstraintLayout", useUnmergedTree = true) | ||
.assert(hasClickAction()) | ||
|
||
composeTestRule | ||
.onNodeWithTag(testTag = "Text", useUnmergedTree = true) | ||
.assertIsDisplayed() | ||
.assert(hasNoClickAction()) | ||
} | ||
} |
Oops, something went wrong.