Skip to content

Commit

Permalink
[Owl] Update to alpha12.
Browse files Browse the repository at this point in the history
Change-Id: I20b78031036f5fd97e6540181f3fee04a33f9044
  • Loading branch information
nickbutcher committed Feb 10, 2021
1 parent a6dea59 commit c23fb1e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 22 deletions.
22 changes: 18 additions & 4 deletions Owl/app/src/androidTest/java/com/example/owl/ui/NavigationTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ class NavigationTest {
composeTestRule.onNodeWithContentDescription(fabLabel).performClick()

// The first course should be shown
composeTestRule.onNodeWithText(courses.first().name).assertExists()
composeTestRule.onNodeWithText(
text = courses.first().name,
substring = true
).assertExists()
}

@Test
Expand All @@ -91,11 +94,19 @@ class NavigationTest {

// Navigate to the first course
composeTestRule.onNode(
hasContentDescription(getFeaturedCourseLabel()).and(hasText(courses.first().name))
hasContentDescription(getFeaturedCourseLabel()).and(
hasText(
text = courses.first().name,
substring = true
)
)
).performClick()

// Assert navigated to the course details
composeTestRule.onNodeWithText(getCourseDesc().take(15)).assertExists()
composeTestRule.onNodeWithText(
text = getCourseDesc().take(15),
substring = true
).assertExists()
}

@Test
Expand All @@ -106,7 +117,10 @@ class NavigationTest {
}

// The first course should be shown
composeTestRule.onNodeWithText(courses.first().name).assertExists()
composeTestRule.onNodeWithText(
text = courses.first().name,
substring = true
).assertExists()
}

private fun getOnboardingFabLabel(): String {
Expand Down
21 changes: 7 additions & 14 deletions Owl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@ plugins {

subprojects {
repositories {
maven { url 'https://storage.googleapis.com/temp-androidx-snapshot.appspot.com/7123292/' }
google()
jcenter()

if (!Libs.AndroidX.Compose.snapshot.isEmpty()) {
maven {
url "https://androidx.dev/snapshots/builds/${Libs.AndroidX.Compose.snapshot}/artifacts/repository/"
}
}

maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

Expand All @@ -49,19 +55,6 @@ subprojects {
}
}

// FIXME: Only needed for Compose 1.0.0-alpha12 snapshots
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'androidx.lifecycle' &&
details.requested.name != 'lifecycle-viewmodel-compose') {
details.useVersion('2.3.0-rc01')
}
if (details.requested.group == 'androidx.savedstate') {
details.useVersion('1.1.0-rc01')
}
}
}

apply plugin: 'com.diffplug.spotless'
spotless {
kotlin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ object Libs {

object AndroidX {
const val coreKtx = "androidx.core:core-ktx:1.5.0-beta01"
const val navigation = "androidx.navigation:navigation-compose:1.0.0-SNAPSHOT"
const val navigation = "androidx.navigation:navigation-compose:1.0.0-alpha07"

object Compose {
const val snapshot = "7123292"
const val version = "1.0.0-SNAPSHOT"
const val snapshot = ""
const val version = "1.0.0-alpha12"

const val animation = "androidx.compose.animation:animation:$version"
const val foundation = "androidx.compose.foundation:foundation:$version"
Expand All @@ -65,7 +65,7 @@ object Libs {
}

object Activity {
const val activityCompose = "androidx.activity:activity-compose:1.3.0-SNAPSHOT"
const val activityCompose = "androidx.activity:activity-compose:1.3.0-alpha02"
}

object Test {
Expand Down

0 comments on commit c23fb1e

Please sign in to comment.