فهرست منبع

Add password screenshot tests

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 4 سال پیش
والد
کامیت
9951331ca2

+ 6 - 8
.idea/codeStyles/Project.xml

@@ -70,8 +70,7 @@
       </option>
       <option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
       <option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
-      <option name="CONTINUATION_INDENT_IN_PARAMETER_LISTS" value="false" />
-	  <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
+      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
     </JetCodeStyleSettings>
     <MarkdownNavigatorCodeStyleSettings>
       <option name="RIGHT_MARGIN" value="120" />
@@ -204,18 +203,17 @@
         </rules>
       </arrangement>
     </codeStyleSettings>
-	<codeStyleSettings language="kotlin">
+    <codeStyleSettings language="kotlin">
       <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
+      <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
+      <option name="LINE_COMMENT_ADD_SPACE" value="true" />
       <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
       <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
       <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
       <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
-      <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
-      <option name="LINE_COMMENT_ADD_SPACE" value="true" />
       <indentOptions>
-        <option name="INDENT_SIZE" value="4" />
         <option name="CONTINUATION_INDENT_SIZE" value="4" />
       </indentOptions>
-	</codeStyleSettings>
+    </codeStyleSettings>
   </code_scheme>
-</component>
+</component>

BIN
screenshots/gplay/debug/com.owncloud.android.ui.activity.PassCodeActivityIT_check.png


BIN
screenshots/gplay/debug/com.owncloud.android.ui.activity.PassCodeActivityIT_delete.png


BIN
screenshots/gplay/debug/com.owncloud.android.ui.activity.PassCodeActivityIT_request.png


+ 61 - 0
src/androidTest/java/com/owncloud/android/ui/activity/PassCodeActivityIT.kt

@@ -0,0 +1,61 @@
+/*
+ *
+ * Nextcloud Android client application
+ *
+ * @author Tobias Kaminsky
+ * Copyright (C) 2020 Tobias Kaminsky
+ * Copyright (C) 2020 Nextcloud GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+package com.owncloud.android.ui.activity
+
+import android.content.Intent
+import androidx.test.espresso.intent.rule.IntentsTestRule
+import com.owncloud.android.AbstractIT
+import com.owncloud.android.utils.ScreenshotTest
+import org.junit.Rule
+import org.junit.Test
+
+class PassCodeActivityIT : AbstractIT() {
+    @get:Rule
+    var activityRule = IntentsTestRule(PassCodeActivity::class.java, true, false)
+
+    @Test
+    @ScreenshotTest
+    fun check() {
+        val sut = activityRule.launchActivity(Intent(PassCodeActivity.ACTION_CHECK))
+
+        waitForIdleSync()
+        screenshot(sut)
+    }
+
+    @Test
+    @ScreenshotTest
+    fun request() {
+        val sut = activityRule.launchActivity(Intent(PassCodeActivity.ACTION_REQUEST_WITH_RESULT))
+
+        waitForIdleSync()
+        screenshot(sut)
+    }
+
+    @Test
+    @ScreenshotTest
+    fun delete() {
+        val sut = activityRule.launchActivity(Intent(PassCodeActivity.ACTION_CHECK_WITH_RESULT))
+
+        waitForIdleSync()
+        screenshot(sut)
+    }
+}