Allow user to skip days without breaking streak

Co-authored-by: Alinson S. Xavier <git@axavier.org>
This commit is contained in:
KristianTashkov
2020-08-22 15:35:35 -05:00
committed by Alinson S. Xavier
parent d9ff429c28
commit 1a05f7d85d
31 changed files with 127 additions and 292 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -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()

View File

@@ -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));
}