-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from vanpra/0.7.0
Library release 0.7.0
- Loading branch information
Showing
25 changed files
with
413 additions
and
187 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
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
Binary file added
BIN
+21 KB
...omposematerialdialogs.test.screenshot.InputDialogTest_dialogWithFilledInput.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+21.8 KB
...posematerialdialogs.test.screenshot.InputDialogTest_dialogWithOutlinedInput.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.34 KB
(97%)
...npra.composematerialdialogs.test.screenshot.ListDialog_multiSelectionDialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
56 changes: 56 additions & 0 deletions
56
...src/androidTest/java/com/vanpra/composematerialdialogs/test/screenshot/InputDialogTest.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,56 @@ | ||
package com.vanpra.composematerialdialogs.test.screenshot | ||
|
||
import androidx.compose.ui.test.junit4.createComposeRule | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import com.karumi.shot.ScreenshotTest | ||
import com.vanpra.composematerialdialogs.test.R | ||
import com.vanpra.composematerialdialogs.test.utils.DialogWithContent | ||
import com.vanpra.composematerialdialogs.test.utils.extensions.onDialog | ||
import com.vanpra.composematerialdialogs.test.utils.extensions.setContentAndWaitForIdle | ||
import com.vanpra.composematerialdialogs.title | ||
import input | ||
import org.junit.Rule | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class InputDialogTest : ScreenshotTest { | ||
@get:Rule | ||
val composeTestRule = createComposeRule() | ||
|
||
@Test | ||
fun dialogWithFilledInput() { | ||
composeTestRule.setContentAndWaitForIdle { | ||
DialogWithContent( | ||
buttons = { | ||
negativeButton("Cancel") | ||
positiveButton("Ok") | ||
} | ||
) { | ||
title(res = R.string.input_dialog_title) | ||
input(label = "Name", placeholder = "Jon Smith") | ||
} | ||
} | ||
compareScreenshot(composeTestRule.onDialog()) | ||
} | ||
|
||
@Test | ||
fun dialogWithOutlinedInput() { | ||
composeTestRule.setContentAndWaitForIdle { | ||
DialogWithContent( | ||
buttons = { | ||
negativeButton("Cancel") | ||
positiveButton("Ok") | ||
} | ||
) { | ||
title(res = R.string.input_dialog_title) | ||
input( | ||
label = "Name", | ||
placeholder = "Jon Smith", | ||
textFieldStyle = TextFieldStyle.Outlined | ||
) | ||
} | ||
} | ||
compareScreenshot(composeTestRule.onDialog()) | ||
} | ||
} |
Oops, something went wrong.