jenkins-bot has submitted this change and it was merged.

Change subject: Add DescriptionEditSuccessViewTest
......................................................................


Add DescriptionEditSuccessViewTest

Bug: T148202
Change-Id: Ib0331bfacc0c0a5ce2ac1235caa085f8bee5f496
---
A 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
A 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png
A 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.5x-light.png
A 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
A 
app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditSuccessViewTest.java
11 files changed, 57 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Niedzielski: Looks good to me, approved



diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
new file mode 100644
index 0000000..ca6c0ed
--- /dev/null
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
new file mode 100644
index 0000000..ca6c0ed
--- /dev/null
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
new file mode 100644
index 0000000..ca6c0ed
--- /dev/null
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
new file mode 100644
index 0000000..ca6c0ed
--- /dev/null
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png
new file mode 100644
index 0000000..ca6c0ed
--- /dev/null
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-light.png
new file mode 100644
index 0000000..ca6c0ed
--- /dev/null
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.0x-light.png
new file mode 100644
index 0000000..ca6c0ed
--- /dev/null
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.5x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.5x-light.png
new file mode 100644
index 0000000..ecd3452
--- /dev/null
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.5x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
new file mode 100644
index 0000000..218242f
--- /dev/null
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
new file mode 100644
index 0000000..ee6701e
--- /dev/null
+++ 
b/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
Binary files differ
diff --git 
a/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditSuccessViewTest.java
 
b/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditSuccessViewTest.java
new file mode 100644
index 0000000..b21310c
--- /dev/null
+++ 
b/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditSuccessViewTest.java
@@ -0,0 +1,57 @@
+package org.wikipedia.descriptions;
+
+
+import android.support.annotation.NonNull;
+
+import org.junit.experimental.theories.Theory;
+import org.junit.experimental.theories.suppliers.TestedOn;
+import org.wikipedia.test.theories.TestedOnBool;
+import org.wikipedia.test.view.FontScale;
+import org.wikipedia.test.view.LayoutDirection;
+import org.wikipedia.test.view.ViewTest;
+import org.wikipedia.theme.Theme;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+public class DescriptionEditSuccessViewTest extends ViewTest {
+    private DescriptionEditSuccessView subject;
+
+    @Theory public void testWidth(@TestedOn(ints = {WIDTH_DP_XL, WIDTH_DP_L}) 
int widthDp, @NonNull FontScale fontScale) {
+        setUp(widthDp, LayoutDirection.LOCALE, fontScale, Theme.LIGHT);
+        snap(subject);
+    }
+
+    @Theory public void testLayoutDirection(@NonNull LayoutDirection 
direction) {
+        setUp(WIDTH_DP_L, direction, FontScale.DEFAULT, Theme.LIGHT);
+        snap(subject);
+    }
+
+    @Theory public void testTheme(@NonNull Theme theme) {
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FontScale.DEFAULT, theme);
+        snap(subject);
+    }
+
+    @Theory public void testFocus(@NonNull Theme theme) {
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FontScale.DEFAULT, theme);
+        requestFocus(subject);
+        snap(subject);
+    }
+
+    @Theory public void testSetCallback(@TestedOnBool boolean nul) {
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FontScale.DEFAULT, 
Theme.LIGHT);
+        subject = new DescriptionEditSuccessView(ctx());
+        DescriptionEditSuccessView.Callback callback = nul ? null : 
mock(DescriptionEditSuccessView.Callback.class);
+        subject.setCallback(callback);
+
+        subject.onDismissClick();
+        if (callback != null) {
+            verify(callback).onDismissClick();
+        }
+    }
+
+    @Override protected void setUp(int widthDp, @NonNull LayoutDirection 
layoutDirection, @NonNull FontScale fontScale, @NonNull Theme theme) {
+        super.setUp(widthDp, layoutDirection, fontScale, theme);
+        subject = new DescriptionEditSuccessView(ctx());
+    }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/322776
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0331bfacc0c0a5ce2ac1235caa085f8bee5f496
Gerrit-PatchSet: 5
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway <mhollo...@wikimedia.org>
Gerrit-Reviewer: BearND <bsitzm...@wikimedia.org>
Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org>
Gerrit-Reviewer: Dbrant <dbr...@wikimedia.org>
Gerrit-Reviewer: Mholloway <mhollo...@wikimedia.org>
Gerrit-Reviewer: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to