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

Change subject: Hygiene: replace hardcoded font scale with symbol
......................................................................


Hygiene: replace hardcoded font scale with symbol

Change-Id: Ib273e18ee5d53e1c35dc76b14bc01ff3beb6b87e
---
M app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
M app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
M app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
3 files changed, 22 insertions(+), 22 deletions(-)

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



diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
index 54a757f..4ce5592 100644
--- a/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/feed/view/CardHeaderViewTest.java
@@ -40,7 +40,7 @@
     }
 
     @Theory public void testLayoutDirection(@NonNull LayoutDirection 
direction) {
-        setUp(WIDTH_DP_L, direction, 1, Theme.LIGHT, R.drawable.wmf_logo,
+        setUp(WIDTH_DP_L, direction, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.wmf_logo,
                 R.string.reading_list_name_sample, 
R.string.reading_list_untitled,
                 R.color.foundation_blue);
         snap(subject);
@@ -48,13 +48,13 @@
 
     @Theory public void testTheme(@NonNull Theme theme,
                                   @TestedOn(ints = {R.color.foundation_blue, 
R.color.foundation_green}) int circleColor) {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, theme, 
R.drawable.wmf_logo,
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], theme, 
R.drawable.wmf_logo,
                 R.string.reading_list_name_sample, 
R.string.reading_list_untitled, circleColor);
         snap(subject, circleColor == R.color.foundation_blue ? "blue" : 
"green");
     }
 
     @Theory public void testFocus(@NonNull Theme theme) {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, theme, 
R.drawable.wmf_logo,
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], theme, 
R.drawable.wmf_logo,
                 R.string.reading_list_name_sample, 
R.string.reading_list_untitled,
                 R.color.foundation_blue);
         runOnMainSync(new Runnable() {
@@ -67,13 +67,13 @@
 
     // todo: how can we test popupmenu which requires an activity?
 //    @Theory public void testMenu(@NonNull Theme theme) {
-//        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, theme, 
R.drawable.wmf_logo,
+//        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], theme, 
R.drawable.wmf_logo,
 //                R.string.reading_list_name_sample, 
R.string.reading_list_untitled);
 //        clickMenu();
 //    }
 
     @Test public void testSetCard() {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 0, 0, 0, 
R.color.foundation_blue);
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
0, 0, 0, R.color.foundation_blue);
         Card card = mock(Card.class);
         subject.setCard(card);
         assertThat(subject.getCard(), is(card));
@@ -82,7 +82,7 @@
     // todo: how can we test popupmenu which requires an activity?
 //    @Theory public void testSetCallback(@TestedOn(ints = {0, 1}) int 
nonnullListener,
 //                                        @TestedOn(ints = {0, 1}) int 
nonnullCard) {
-//        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.wmf_logo,
+//        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], 
Theme.LIGHT, R.drawable.wmf_logo,
 //                R.string.reading_list_name_sample, 
R.string.reading_list_untitled);
 //
 //        Card card = nonnullCard == 0 ? null : mock(Card.class);
@@ -98,7 +98,7 @@
 //    }
 
     @Test public void testSetImage() {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.wmf_logo,
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.wmf_logo,
                 R.string.reading_list_name_sample, 
R.string.reading_list_untitled,
                 R.color.foundation_blue);
         ImageView imageView = findById(subject, R.id.view_card_header_image);
@@ -108,7 +108,7 @@
     }
 
     @Test public void testSetImageCircleColor() {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.wmf_logo,
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.wmf_logo,
                 R.string.reading_list_name_sample, 
R.string.reading_list_untitled,
                 R.color.foundation_blue);
         TintableBackgroundView imageView = findById(subject, 
R.id.view_card_header_image);
@@ -119,13 +119,13 @@
 
     @Theory public void testSetTitleStr(@TestedOn(ints = {0,
             R.string.reading_list_name_sample}) int text) {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.wmf_logo, text,
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.wmf_logo, text,
                 R.string.reading_list_untitled, R.color.foundation_blue);
         assertText(subject, R.id.view_card_header_title, text);
     }
 
     @Test public void testSetTitleId() {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.wmf_logo,
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.wmf_logo,
                 R.string.reading_list_name_sample, 
R.string.reading_list_untitled,
                 R.color.foundation_blue);
         assertText(subject, R.id.view_card_header_title, 
R.string.reading_list_name_sample);
@@ -133,7 +133,7 @@
 
     @Theory public void testSetSubtitle(@TestedOn(ints = {0,
             R.string.reading_list_name_sample}) int text) {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.wmf_logo,
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.wmf_logo,
                 R.string.reading_list_untitled, text, R.color.foundation_blue);
         assertText(subject, R.id.view_card_header_subtitle, text);
     }
diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
index c9659b6..12d48d9 100644
--- 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
+++ 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
@@ -33,18 +33,18 @@
     }
 
     @Theory public void testLayoutDirection(LayoutDirection direction) {
-        setUp(WIDTH_DP_L, direction, 1, Theme.LIGHT, R.drawable.wmf_logo,
+        setUp(WIDTH_DP_L, direction, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.wmf_logo,
                 R.string.reading_list_name_sample);
         snap(subject);
     }
 
     @Theory public void testTheme(Theme theme) {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, theme, 0, 
R.string.reading_list_name_sample);
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], theme, 0, 
R.string.reading_list_name_sample);
         snap(subject);
     }
 
     @Theory public void testFocus(Theme theme) {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, theme, 0, 
R.string.reading_list_name_sample);
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], theme, 0, 
R.string.reading_list_name_sample);
         runOnMainSync(new Runnable() {
             @Override public void run() {
                 subject.requestFocus();
@@ -54,19 +54,19 @@
     }
 
     @Theory public void testSetImage(@TestedOn(ints = {0, 
R.drawable.checkerboard}) int image) {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, image, 0);
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
image, 0);
         View imageView = findById(subject, R.id.view_card_header_large_image);
         assertThat(imageView.getVisibility(), is(image == 0 ? View.GONE : 
View.VISIBLE));
     }
 
     @Theory public void testSetTitle(@TestedOn(ints = {0,
             R.string.reading_list_name_sample}) int text) {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 0, text);
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
0, text);
         assertText(subject, R.id.view_card_header_large_title, text);
     }
 
     @Theory public void testOnClickListener(@TestedOn(ints = {0, 1}) int 
nonnull) {
-        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.checkerboard,
+        setUp(WIDTH_DP_L, LayoutDirection.LOCALE, FONT_SCALES[0], Theme.LIGHT, 
R.drawable.checkerboard,
                 R.string.reading_list_name_sample);
 
         OnClickListener listener = nonnull == 0 ? null : 
mock(View.OnClickListener.class);
diff --git a/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java 
b/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
index 88754e4..ef2b69e 100644
--- a/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
@@ -24,28 +24,28 @@
     }
 
     @Theory public void testLayoutDirection(LayoutDirection direction) {
-        setUp(WIDTH_DP_XS, direction, 1, Theme.LIGHT);
+        setUp(WIDTH_DP_XS, direction, FONT_SCALES[0], Theme.LIGHT);
         snap(subject);
     }
 
     @Theory public void testTheme(Theme theme) {
-        setUp(WIDTH_DP_XS, LayoutDirection.LOCALE, 1, theme);
+        setUp(WIDTH_DP_XS, LayoutDirection.LOCALE, FONT_SCALES[0], theme);
         snap(subject);
     }
 
     @Theory public void testSelect(Theme theme) {
-        setUp(WIDTH_DP_XS, LayoutDirection.LOCALE, 1, theme);
+        setUp(WIDTH_DP_XS, LayoutDirection.LOCALE, FONT_SCALES[0], theme);
         subject.setSelected(true);
         snap(subject);
     }
 
     @Test public void testText() {
-        setUp(WIDTH_DP_XS, LayoutDirection.LOCALE, 1, Theme.LIGHT);
+        setUp(WIDTH_DP_XS, LayoutDirection.LOCALE, FONT_SCALES[0], 
Theme.LIGHT);
         assertThat(subject.getText().toString(), 
is(str(NavTab.EXPLORE.text())));
     }
 
     @Test public void testIcon() {
-        setUp(WIDTH_DP_XS, LayoutDirection.LOCALE, 1, Theme.LIGHT);
+        setUp(WIDTH_DP_XS, LayoutDirection.LOCALE, FONT_SCALES[0], 
Theme.LIGHT);
         assertThat(subject.getCompoundDrawables(), 
hasItemInArray(notNullValue()));
     }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib273e18ee5d53e1c35dc76b14bc01ff3beb6b87e
Gerrit-PatchSet: 4
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <sniedziel...@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: jenkins-bot <>

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

Reply via email to