Skip to content

Commit bc56c43

Browse files
authored
Merge pull request #91 from TypeType-Video/release/beta-22
build: publish mobile beta 1.8.1-beta.2
2 parents 7813696 + f512ecf commit bc56c43

58 files changed

Lines changed: 1335 additions & 84 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/android-beta.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ jobs:
147147

148148
- name: Verify and prepare beta APK
149149
run: |
150+
export PATH="$JAVA_HOME/bin:$PATH"
150151
mkdir -p artifacts
151152
apk="$(find app/build/outputs/apk/release -name '*.apk' | head -n 1)"
152153
test -n "$apk"

‎.github/workflows/android.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ jobs:
207207

208208
- name: Prepare APK artifact
209209
run: |
210+
export PATH="$JAVA_HOME/bin:$PATH"
210211
mkdir -p artifacts
211212
apk="$(find app/build/outputs/apk/release -name '*.apk' | head -n 1)"
212213
test -n "$apk"

‎app/build.gradle.kts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ android {
2626
applicationId = "dev.typetype.android"
2727
minSdk = 23
2828
targetSdk = 37
29-
versionCode = 10822
30-
versionName = "1.8.1-beta.1"
29+
versionCode = 10823
30+
versionName = "1.8.1-beta.2"
3131
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3232
resValue("string", "app_name", "TypeType")
3333
}

‎app/src/androidTest/java/dev/typetype/android/feature/player/PlayerInteractionRowComposeTest.kt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import androidx.compose.ui.unit.Dp
1515
import androidx.compose.ui.unit.dp
1616
import dev.typetype.android.R
1717
import org.junit.Assert.assertEquals
18+
import org.junit.Assume.assumeTrue
1819
import org.junit.Rule
1920
import org.junit.Test
2021

@@ -24,6 +25,10 @@ class PlayerInteractionRowComposeTest {
2425

2526
@Test
2627
fun tabletShowsLabelsAndLargerTouchTargets() {
28+
assumeTrue(
29+
"tablet interaction row needs a 600dp wide device",
30+
composeRule.activity.resources.configuration.smallestScreenWidthDp >= 600,
31+
)
2732
var commentClicks = 0
2833
setActions(720.dp) { commentClicks += 1 }
2934

‎app/src/androidTest/java/dev/typetype/android/feature/player/components/CommentBodyTest.kt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CommentBodyTest {
2121

2222
@Test
2323
fun longCommentCollapsesAndExpandsWithReadMore() {
24-
val suffix = " more comment detail".repeat(60)
24+
val suffix = " more comment detail".repeat(30)
2525
val comment = Comment(
2626
id = "comment",
2727
text = "Long comment starts here$suffix",
@@ -47,7 +47,9 @@ class CommentBodyTest {
4747
}
4848

4949
composeRule.onNodeWithText("Read more").assertExists().performClick()
50+
composeRule.waitForIdle()
5051
composeRule.onNodeWithText("Show less").assertExists().performClick()
52+
composeRule.waitForIdle()
5153
composeRule.onNodeWithText("Read more").assertExists()
5254
}
5355
}

‎app/src/androidTest/java/dev/typetype/android/feature/player/components/PlayerControlsLayoutTest.kt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
4646
import java.lang.reflect.Proxy
4747
import org.junit.Assert.assertEquals
4848
import org.junit.Assert.assertTrue
49+
import org.junit.Assume.assumeTrue
4950
import org.junit.Rule
5051
import org.junit.Test
5152
import org.junit.runner.RunWith
@@ -164,6 +165,10 @@ class PlayerControlsLayoutTest {
164165

165166
@Test
166167
fun tabletControlsHaveLargerTargetsWithoutOverlapping() {
168+
assumeTrue(
169+
"tablet player controls need a 600dp wide device",
170+
composeRule.activity.resources.configuration.smallestScreenWidthDp >= 600,
171+
)
167172
setControls(720.dp, 405.dp, 720)
168173
assertControlsDoNotOverlap()
169174
composeRule.onNodeWithTag(PLAYER_CENTER_CONTROLS_TAG)

‎app/src/androidTest/java/dev/typetype/android/feature/settings/appearance/AppearanceScreenTest.kt‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import androidx.compose.ui.test.onNodeWithText
1414
import androidx.compose.ui.test.junit4.v2.createComposeRule
1515
import androidx.compose.ui.test.performClick
1616
import androidx.compose.ui.test.performScrollToIndex
17+
import androidx.compose.ui.test.performScrollToNode
1718
import dev.typetype.android.core.ui.theme.TypeTypeTheme
1819
import dev.typetype.android.domain.preferences.AccentColor
1920
import dev.typetype.android.domain.preferences.AppPreferences
@@ -109,8 +110,8 @@ class AppearanceScreenTest {
109110
}
110111
}
111112

112-
composeRule.onAllNodes(hasScrollAction())[0].performScrollToIndex(11)
113-
composeRule.onNode(isSelectable() and hasText("Red"))
114-
.assertIsEnabled()
113+
val accentCell = isSelectable() and hasText("Red")
114+
composeRule.onAllNodes(hasScrollAction())[0].performScrollToNode(accentCell)
115+
composeRule.onNode(accentCell).assertIsEnabled()
115116
}
116117
}

‎app/src/androidTest/java/dev/typetype/android/feature/settings/imports/ImportDataScreenTest.kt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class ImportDataScreenTest {
2222
fun restoreRequiresASelectedArchive() {
2323
setScreen(ImportDataState())
2424

25+
composeRule.onNode(hasScrollAction())
26+
.performScrollToNode(hasText("Restore backup"))
2527
composeRule.onNodeWithText("Restore backup").assertIsNotEnabled()
2628
}
2729

‎app/src/androidTest/java/dev/typetype/android/feature/settings/player/PlayerSettingsCaptionStyleTest.kt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ class PlayerSettingsCaptionStyleTest {
3030
}
3131
}
3232

33+
composeRule.onNode(hasScrollAction())
34+
.performScrollToNode(hasText("Show advanced player settings"))
35+
composeRule.onNodeWithText("Show advanced player settings").performClick()
3336
composeRule.onNode(hasScrollAction())
3437
.performScrollToNode(hasText("Text size"))
3538
composeRule.onNodeWithText("Text size").performClick()

‎app/src/androidTest/java/dev/typetype/android/feature/settings/player/PlayerSettingsDanmakuTest.kt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ class PlayerSettingsDanmakuTest {
3030
}
3131
}
3232

33+
composeRule.onNode(hasScrollAction())
34+
.performScrollToNode(hasText("Show advanced player settings"))
35+
composeRule.onNodeWithText("Show advanced player settings").performClick()
3336
composeRule.onNode(hasScrollAction())
3437
.performScrollToNode(hasText("Show bullet comments"))
3538
composeRule.onNodeWithText("Show bullet comments")

0 commit comments

Comments
 (0)