mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 09:38:52 -06:00
Allow user to skip days without breaking streak
Co-authored-by: Alinson S. Xavier <git@axavier.org>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
@@ -93,8 +93,8 @@ class CheckmarkPanelViewTest : BaseViewTest() {
|
||||
|
||||
@Test
|
||||
fun testToggle() {
|
||||
var timestamps = mutableListOf<Timestamp>()
|
||||
view.onToggle = { timestamps.add(it) }
|
||||
val timestamps = mutableListOf<Timestamp>()
|
||||
view.onToggle = { t, _ -> timestamps.add(t) }
|
||||
view.buttons[0].performLongClick()
|
||||
view.buttons[2].performLongClick()
|
||||
view.buttons[3].performLongClick()
|
||||
@@ -105,7 +105,7 @@ class CheckmarkPanelViewTest : BaseViewTest() {
|
||||
fun testToggle_withOffset() {
|
||||
val timestamps = mutableListOf<Timestamp>()
|
||||
view.dataOffset = 3
|
||||
view.onToggle = { timestamps += it }
|
||||
view.onToggle = { t, _ -> timestamps += t }
|
||||
view.buttons[0].performLongClick()
|
||||
view.buttons[2].performLongClick()
|
||||
view.buttons[3].performLongClick()
|
||||
|
||||
@@ -70,7 +70,10 @@ public class CheckmarkWidgetTest extends BaseViewTest
|
||||
// possible to capture intents sent to BroadcastReceivers.
|
||||
button.performClick();
|
||||
sleep(1000);
|
||||
assertThat(checkmarks.getTodayValue(), equalTo(SKIPPED));
|
||||
|
||||
button.performClick();
|
||||
sleep(1000);
|
||||
assertThat(checkmarks.getTodayValue(), equalTo(UNCHECKED));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user