-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 040d8a2
Showing
108 changed files
with
4,700 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
/build |
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,106 @@ | ||
buildscript { | ||
repositories { | ||
maven { url 'https://maven.fabric.io/public' } | ||
} | ||
|
||
dependencies { | ||
classpath 'io.fabric.tools:gradle:1.+' | ||
} | ||
} | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'org.greenrobot.greendao' | ||
apply plugin: 'io.fabric' | ||
|
||
repositories { | ||
maven { url 'https://maven.fabric.io/public' } | ||
} | ||
|
||
|
||
android { | ||
signingConfigs { | ||
config { | ||
keyAlias 'newsworldkey' | ||
keyPassword 'p5g41t-MLX' | ||
storeFile file('D:/Android/NewsWorld.jks') | ||
storePassword 'p5g41t-MLX' | ||
} | ||
} | ||
compileSdkVersion 26 | ||
defaultConfig { | ||
applicationId "com.madcoders.chatterjeekaustav.newsapp" | ||
minSdkVersion 19 | ||
targetSdkVersion 26 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
buildConfigField("String", "API_KEY", "\"df47cec2abca45bcb890447852b1c0db\"") | ||
signingConfig signingConfigs.config | ||
} | ||
debug { | ||
buildConfigField("String", "API_KEY", "\"df47cec2abca45bcb890447852b1c0db\"") | ||
} | ||
} | ||
} | ||
|
||
greendao { | ||
schemaVersion 2 | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(include: ['*.jar'], dir: 'libs') | ||
implementation 'com.android.support:appcompat-v7:26.1.0' | ||
implementation 'com.android.support:support-v4:26.1.0' | ||
compile 'com.android.support:design:26.1.0' | ||
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta4' | ||
testImplementation 'junit:junit:4.12' | ||
androidTestImplementation 'com.android.support.test:runner:1.0.1' | ||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' | ||
//Dependency Injection | ||
implementation 'com.google.dagger:dagger:2.14.1' | ||
annotationProcessor "com.google.dagger:dagger-compiler:2.14.1" | ||
compileOnly 'javax.annotation:jsr250-api:1.0' | ||
implementation 'javax.inject:javax.inject:1' | ||
//View Intection | ||
compile 'com.jakewharton:butterknife:8.8.1' | ||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' | ||
//Networking | ||
compile 'com.google.code.gson:gson:2.8.2' | ||
compile 'com.squareup.retrofit2:retrofit:2.3.0' | ||
compile 'com.squareup.retrofit2:converter-gson:2.3.0' | ||
compile 'com.squareup.picasso:picasso:2.5.2' | ||
//Calligraphy | ||
compile 'uk.co.chrisjenx:calligraphy:2.3.0' | ||
//Webview | ||
compile 'com.thefinestartist:finestwebview:1.2.7' | ||
//Recyclerview | ||
compile 'com.yqritc:recyclerview-flexibledivider:1.4.0' | ||
implementation 'com.android.support:recyclerview-v7:26.1.0' | ||
implementation 'com.android.support:cardview-v7:26.1.0' | ||
//Navigation Drawer | ||
implementation('com.mikepenz:materialdrawer:6.0.2@aar') { | ||
transitive = true | ||
} | ||
//annotations | ||
implementation 'com.android.support:support-annotations:27.0.2' | ||
//Icons | ||
implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar' | ||
implementation 'com.mikepenz:fontawesome-typeface:4.7.0.2@aar' | ||
//Testing | ||
testImplementation 'org.mockito:mockito-all:1.10.19' | ||
compile('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') { | ||
transitive = true; | ||
} | ||
//Feedback | ||
implementation 'com.afollestad.material-dialogs:core:0.9.6.0' | ||
compile 'de.cketti.mailto:email-intent-builder:1.0.0' | ||
//Database ORM GreenDAO | ||
compile 'org.greenrobot:greendao:3.2.2' | ||
//LeakCanary | ||
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4' | ||
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' | ||
} |
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,3 @@ | ||
#Contains API Secret used to validate your application. Commit to internal source control; avoid making secret public. | ||
#Wed Jan 17 23:19:51 GMT+05:30 2018 | ||
apiSecret=1bea4ff86bb750cb409e15656132ccb48bfdd3be6a13a00930167a2f08576f2a |
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,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Binary file not shown.
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 @@ | ||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1},"path":"app-release.apk","properties":{"packageId":"com.madcoders.chatterjeekaustav.newsapp","split":"","minSdkVersion":"19"}}] |
29 changes: 29 additions & 0 deletions
29
...src/androidTest/java/com/android/chatterjeekaustav/newsworld/ExampleInstrumentedTest.java
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,29 @@ | ||
package com.android.chatterjeekaustav.newsworld; | ||
|
||
import android.content.Context; | ||
import android.support.test.InstrumentationRegistry; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
import static android.support.test.espresso.Espresso.*; | ||
import static android.support.test.espresso.matcher.ViewMatchers.*; | ||
import static org.hamcrest.Matchers.*; | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() throws Exception { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getTargetContext(); | ||
|
||
assertEquals("com.android.chatterjeekaustav.newsapp", appContext.getPackageName()); | ||
} | ||
} |
91 changes: 91 additions & 0 deletions
91
...roidTest/java/com/android/chatterjeekaustav/newsworld/ui/splash/NewsListActivityTest.java
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,91 @@ | ||
package com.android.chatterjeekaustav.newsworld.ui.splash; | ||
|
||
|
||
import android.support.test.espresso.ViewInteraction; | ||
import android.support.test.rule.ActivityTestRule; | ||
import android.support.test.runner.AndroidJUnit4; | ||
import android.test.suitebuilder.annotation.LargeTest; | ||
|
||
import com.android.chatterjeekaustav.newsworld.R; | ||
import com.madcoders.chatterjeekaustav.newsworld.ui.splash.SplashActivity; | ||
|
||
import org.junit.Before; | ||
import org.junit.BeforeClass; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static android.support.test.espresso.Espresso.onView; | ||
import static android.support.test.espresso.action.ViewActions.*; | ||
import static android.support.test.espresso.assertion.ViewAssertions.*; | ||
import static android.support.test.espresso.matcher.ViewMatchers.*; | ||
|
||
@LargeTest | ||
@RunWith(AndroidJUnit4.class) | ||
public class NewsListActivityTest { | ||
|
||
@Rule | ||
public ActivityTestRule<SplashActivity> mActivityTestRule = new ActivityTestRule<>(SplashActivity.class); | ||
|
||
@Before | ||
public void doit() { | ||
try { | ||
Thread.sleep(2000); | ||
} catch (InterruptedException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
@Test | ||
public void initialScreenItemsCheck() { | ||
try { | ||
Thread.sleep(3000); | ||
} catch (InterruptedException e) { | ||
e.printStackTrace(); | ||
} | ||
|
||
onView(withContentDescription("Open")).check(matches(isDisplayed())); | ||
onView(withId(R.id.app_bar_search)).check(matches(isDisplayed())); | ||
onView(withText(R.string.app_name)).check(matches(isDisplayed())); | ||
onView(withId(R.id.newslist)).check(matches(isDisplayed())); | ||
} | ||
|
||
@Test | ||
public void toolbarTest() { | ||
|
||
ViewInteraction toolbar = onView(withContentDescription("Open")); | ||
toolbar.check(matches(isDisplayed())); | ||
toolbar.perform(click()); | ||
|
||
//Checking main Items | ||
onView(withId(R.id.material_drawer_account_header)).check(matches(isDisplayed())); | ||
onView(withText(R.string.homeItem)).check(matches(isDisplayed())); | ||
onView(withText(R.string.categoryMainItem)).check(matches(isDisplayed())); | ||
onView(withText(R.string.clearCache)).check(matches(isDisplayed())); | ||
onView(withText(R.string.share)).check(matches(isDisplayed())); | ||
onView(withText(R.string.feedback)).check(matches(isDisplayed())); | ||
onView(withText(R.string.exit)).check(matches(isDisplayed())); | ||
onView(withText(R.string.footertext)).check(matches(isDisplayed())); | ||
|
||
//Checking All categories | ||
onView(withText(R.string.categoryMainItem)).perform(click()); | ||
onView(withText(R.string.categoryMainItem)).perform(swipeUp()); | ||
onView(withText(R.string.categoryMainItem)).perform(swipeUp()); | ||
onView(withText(R.string.categoryMainItem)).perform(swipeUp()); | ||
onView(withText(R.string.categoryMainItem)).perform(swipeUp()); | ||
onView(withText(R.string.categoryMainItem)).perform(swipeUp()); | ||
onView(withText(R.string.categoryMainItem)).perform(swipeUp()); | ||
onView(withText(R.string.categoryMainItem)).perform(swipeUp()); | ||
onView(withText(R.string.categoryMainItem)).perform(swipeUp()); | ||
|
||
onView(withText(R.string.categoryBusiness)).check(matches(isDisplayed())); | ||
onView(withText(R.string.categoryEntertainment)).check(matches(isDisplayed())); | ||
onView(withText(R.string.categoryGeneral)).check(matches(isDisplayed())); | ||
onView(withText(R.string.categoryHealth)).check(matches(isDisplayed())); | ||
onView(withText(R.string.categoryScience)).check(matches(isDisplayed())); | ||
onView(withText(R.string.categorySports)).check(matches(isDisplayed())); | ||
onView(withText(R.string.categoryTechnology)).check(matches(isDisplayed())); | ||
onView(withText(R.string.categoryMainItem)).perform(click()); | ||
|
||
} | ||
} |
Oops, something went wrong.