Skip to content

Commit a946c07

Browse files
wip
Signed-off-by: tobiasKaminsky <[email protected]>
1 parent 392332a commit a946c07

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

app/src/androidTest/java/com/owncloud/android/ui/dialog/DialogFragmentIT.kt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ class DialogFragmentIT : AbstractIT() {
9999
OCFile("/Test/"),
100100
OCFile("/")
101101
).run {
102-
showDialog(this)
102+
showDialog(this, "testRenameFileDialog")
103103
}
104104
}
105105

106106
@Test
107107
@ScreenshotTest
108108
fun testLoadingDialog() {
109109
newInstance("Wait…").run {
110-
showDialog(this)
110+
showDialog(this, "testLoadingDialog")
111111
}
112112
}
113113

@@ -123,7 +123,7 @@ class DialogFragmentIT : AbstractIT() {
123123
-1,
124124
-1
125125
).run {
126-
showDialog(this)
126+
showDialog(this, "testConfirmationDialogWithOneAction")
127127
}
128128
}
129129

@@ -139,7 +139,7 @@ class DialogFragmentIT : AbstractIT() {
139139
-1,
140140
-1
141141
).run {
142-
showDialog(this)
142+
showDialog(this, "testConfirmationDialogWithTwoAction")
143143
}
144144
}
145145

@@ -155,7 +155,7 @@ class DialogFragmentIT : AbstractIT() {
155155
R.string.common_confirm,
156156
-1
157157
).run {
158-
showDialog(this)
158+
showDialog(this, "testConfirmationDialogWithThreeAction")
159159
}
160160
}
161161

@@ -172,7 +172,7 @@ class DialogFragmentIT : AbstractIT() {
172172
R.string.common_confirm,
173173
-1
174174
).run {
175-
showDialog(this)
175+
showDialog(this, "testConfirmationDialogWithThreeActionRTL")
176176
resetLocale()
177177
}
178178
}
@@ -181,7 +181,7 @@ class DialogFragmentIT : AbstractIT() {
181181
@ScreenshotTest
182182
fun testRemoveFileDialog() {
183183
RemoveFilesDialogFragment.newInstance(OCFile("/Test.md")).run {
184-
showDialog(this)
184+
showDialog(this, "testRemoveFileDialog")
185185
}
186186
}
187187

@@ -194,14 +194,14 @@ class DialogFragmentIT : AbstractIT() {
194194
}
195195

196196
val dialog: RemoveFilesDialogFragment = RemoveFilesDialogFragment.newInstance(toDelete)
197-
showDialog(dialog)
197+
showDialog(dialog, "testRemoveFilesDialog")
198198
}
199199

200200
@Test
201201
@ScreenshotTest
202202
fun testRemoveFolderDialog() {
203203
val dialog = RemoveFilesDialogFragment.newInstance(OCFile("/Folder/"))
204-
showDialog(dialog)
204+
showDialog(dialog, "testRemoveFolderDialog")
205205
}
206206

207207
@Test
@@ -212,7 +212,7 @@ class DialogFragmentIT : AbstractIT() {
212212
toDelete.add(OCFile("/Documents/"))
213213

214214
val dialog: RemoveFilesDialogFragment = RemoveFilesDialogFragment.newInstance(toDelete)
215-
showDialog(dialog)
215+
showDialog(dialog, "testRemoveFoldersDialog")
216216
}
217217

218218
@Test
@@ -222,7 +222,7 @@ class DialogFragmentIT : AbstractIT() {
222222
Looper.prepare()
223223
}
224224
val sut = CreateFolderDialogFragment.newInstance(OCFile("/"))
225-
showDialog(sut)
225+
showDialog(sut, "testNewFolderDialog")
226226
}
227227

228228
@Test
@@ -232,7 +232,7 @@ class DialogFragmentIT : AbstractIT() {
232232
Looper.prepare()
233233
}
234234
val sut = newInstance(OCFile("/"), true, false)
235-
showDialog(sut)
235+
showDialog(sut, "testEnforcedPasswordDialog")
236236
}
237237

238238
@Test
@@ -242,7 +242,7 @@ class DialogFragmentIT : AbstractIT() {
242242
Looper.prepare()
243243
}
244244
val sut = newInstance(OCFile("/"), true, true)
245-
showDialog(sut)
245+
showDialog(sut, "testOptionalPasswordDialog")
246246
}
247247

248248
@Test
@@ -626,7 +626,7 @@ class DialogFragmentIT : AbstractIT() {
626626
val handler = mockk<SslErrorHandler>(relaxed = true)
627627

628628
newInstanceForEmptySslError(sslError, handler).run {
629-
showDialog(this)
629+
showDialog(this, "testSslUntrustedCertDialog")
630630
}
631631
}
632632

@@ -638,7 +638,7 @@ class DialogFragmentIT : AbstractIT() {
638638
}
639639

640640
val dialog = StoragePermissionDialogFragment()
641-
showDialog(dialog)
641+
showDialog(dialog, "testStoragePermissionDialog")
642642
}
643643

644644
@Test
@@ -653,11 +653,11 @@ class DialogFragmentIT : AbstractIT() {
653653
}
654654

655655
newInstance(ocFile, false).run {
656-
showDialog(this)
656+
showDialog(this, "testFileActionsBottomSheet")
657657
}
658658
}
659659

660-
private fun showDialog(dialog: DialogFragment) {
660+
private fun showDialog(dialog: DialogFragment, testName: String) {
661661
launchActivity<FileDisplayActivity>().use { scenario ->
662662
scenario.onActivity { sut ->
663663
dialog.show(sut.supportFragmentManager, null)
@@ -670,7 +670,7 @@ class DialogFragmentIT : AbstractIT() {
670670
if (viewGroup != null) {
671671
hideCursors(viewGroup)
672672
}
673-
screenshot(dialogInstance.window?.decorView)
673+
screenshotViaName(dialogInstance.window?.decorView, "${testClassName}_$testName")
674674
}
675675

676676
onView(isRoot()).check(matches(isDisplayed()))

0 commit comments

Comments
 (0)