-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump version to v1.15.1 * Fix popup menu style * Regression test for crash with empty stock tracking fields * Regression test for crash when exporting PDF * Fix crash when leaving stock page without refill size filled * Fix crash in PDF export * Fix test * Remove unused library for preferencesx Add monkey test to tests job Fix a potential crash when navigating preferences * Merge monkey test job
- Loading branch information
Showing
13 changed files
with
88 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
app/src/androidTest/java/com/futsch1/medtimer/ExportBackupTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.futsch1.medtimer | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry | ||
import androidx.test.uiautomator.By | ||
import androidx.test.uiautomator.UiDevice | ||
import androidx.test.uiautomator.Until | ||
import com.adevinta.android.barista.interaction.BaristaClickInteractions.clickOn | ||
import com.adevinta.android.barista.interaction.BaristaDialogInteractions.clickDialogPositiveButton | ||
import com.adevinta.android.barista.interaction.BaristaListInteractions.clickListItem | ||
import com.adevinta.android.barista.interaction.BaristaMenuClickInteractions.openMenu | ||
import org.junit.Test | ||
|
||
class ExportBackupTest : BaseTestHelper() { | ||
@Test | ||
fun testTriggerExport() { | ||
openMenu() | ||
clickOn(R.string.generate_test_data) | ||
|
||
openMenu() | ||
clickOn(R.string.event_data) | ||
clickOn(R.string.export_csv) | ||
val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) | ||
device.wait(Until.findObject(By.textContains("Sharing")), 5_000) | ||
device.pressBack() | ||
|
||
openMenu() | ||
clickOn(R.string.event_data) | ||
clickOn(R.string.export_pdf) | ||
device.wait(Until.findObject(By.textContains("Sharing")), 5_000) | ||
device.pressBack() | ||
} | ||
|
||
@Test | ||
fun testTriggerBackup() { | ||
openMenu() | ||
clickOn(R.string.generate_test_data) | ||
|
||
openMenu() | ||
clickOn(R.string.backup) | ||
|
||
clickListItem(-1, 1) | ||
clickDialogPositiveButton() | ||
|
||
val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) | ||
device.wait(Until.findObject(By.textContains("Sharing")), 5_000) | ||
device.pressBack() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters