Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ahudson20 committed Mar 10, 2024
1 parent db06a6e commit fdacbbb
Showing 1 changed file with 1 addition and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
package com.app.whakaara.bottomsheet

import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithText
import com.app.whakaara.data.alarm.Alarm
import com.app.whakaara.ui.bottomsheet.details.BottomSheetDetailsTopBar
import com.app.whakaara.ui.theme.WhakaaraTheme
import com.chargemap.compose.numberpicker.FullHours
import com.dokar.sheets.BottomSheetState
import org.junit.Rule
import org.junit.Test
import java.util.Calendar

class BottomSheetTopBarTest {
@get:Rule
Expand All @@ -24,32 +18,13 @@ class BottomSheetTopBarTest {
setContent {
WhakaaraTheme {
BottomSheetDetailsTopBar(
coroutineScope = rememberCoroutineScope(),
sheetState = BottomSheetState(),
alarm = Alarm(
date = Calendar.getInstance(),
isEnabled = false,
subTitle = "10:03 AM"
),
reset = {},
pickerValue = FullHours(
hours = 12,
minutes = 12
),
isVibrationEnabled = true,
isSnoozeEnabled = true,
deleteAfterGoesOff = false,
bottomText = "bottomText",
title = "title",
is24HourFormat = true
title = "title"
)
}
}

// Then
onNodeWithContentDescription(label = "Cancel alarm changes", ignoreCase = true).assertIsDisplayed()
onNodeWithContentDescription(label = "Save alarm changes", ignoreCase = true).assertIsDisplayed()

onNodeWithText(text = "title").assertIsDisplayed()
onNodeWithText(text = "bottomText").assertIsDisplayed()
}
Expand Down

0 comments on commit fdacbbb

Please sign in to comment.