desc:delete test
parent
47258d623f
commit
0a49b93b2a
@ -1,19 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2013-2016 EasyDarwin.ORG. All rights reserved.
|
||||
Github: https://github.com/EasyDarwin
|
||||
WEChat: EasyDarwin
|
||||
Website: http://www.easydarwin.org
|
||||
*/
|
||||
package org.easydarwin.easypusher;
|
||||
|
||||
import android.app.Application;
|
||||
import android.test.ApplicationTestCase;
|
||||
|
||||
/**
|
||||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
|
||||
*/
|
||||
public class ApplicationTest extends ApplicationTestCase<Application> {
|
||||
public ApplicationTest() {
|
||||
super(Application.class);
|
||||
}
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
package org.easydarwin.easypusher;
|
||||
|
||||
|
||||
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 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.Espresso.pressBack;
|
||||
import static android.support.test.espresso.action.ViewActions.click;
|
||||
import static android.support.test.espresso.action.ViewActions.scrollTo;
|
||||
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
|
||||
import static android.support.test.espresso.matcher.ViewMatchers.withId;
|
||||
import static android.support.test.espresso.matcher.ViewMatchers.withParent;
|
||||
import static android.support.test.espresso.matcher.ViewMatchers.withText;
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
|
||||
@LargeTest
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class SplashActivityTest {
|
||||
|
||||
@Rule
|
||||
public ActivityTestRule<SplashActivity> mActivityTestRule = new ActivityTestRule<>(SplashActivity.class);
|
||||
|
||||
@Test
|
||||
public void splashActivityTest() {
|
||||
// Added a sleep statement to match the app's execution delay.
|
||||
// The recommended way to handle such scenarios is to use Espresso idling resources:
|
||||
// https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html
|
||||
|
||||
|
||||
ViewInteraction appCompatButton = onView(
|
||||
allOf(withId(R.id.btn_switch), withText("推送"), isDisplayed()));
|
||||
appCompatButton.perform(click());
|
||||
|
||||
ViewInteraction appCompatButton2 = onView(
|
||||
allOf(withId(R.id.btn_setting), withText("设置"), isDisplayed()));
|
||||
appCompatButton2.perform(click());
|
||||
|
||||
pressBack();
|
||||
|
||||
ViewInteraction appCompatCheckBox = onView(
|
||||
allOf(withId(R.id.only_push_audio), withText("仅推送音频")));
|
||||
appCompatCheckBox.perform(scrollTo(), click());
|
||||
|
||||
ViewInteraction appCompatButton3 = onView(
|
||||
allOf(withId(R.id.btn_save), withText("保存")));
|
||||
appCompatButton3.perform(scrollTo(), click());
|
||||
|
||||
ViewInteraction appCompatButton4 = onView(
|
||||
allOf(withId(R.id.btn_setting), withText("设置"), isDisplayed()));
|
||||
appCompatButton4.perform(click());
|
||||
|
||||
pressBack();
|
||||
|
||||
ViewInteraction appCompatCheckBox2 = onView(
|
||||
allOf(withId(R.id.only_push_audio), withText("仅推送音频")));
|
||||
appCompatCheckBox2.perform(scrollTo(), click());
|
||||
|
||||
ViewInteraction appCompatButton5 = onView(
|
||||
allOf(withId(R.id.btn_save), withText("保存")));
|
||||
appCompatButton5.perform(scrollTo(), click());
|
||||
|
||||
pressBack();
|
||||
|
||||
ViewInteraction appCompatButton6 = onView(
|
||||
allOf(withId(android.R.id.button2), withText("取消"),
|
||||
withParent(allOf(withId(R.id.buttonPanel),
|
||||
withParent(withId(R.id.parentPanel)))),
|
||||
isDisplayed()));
|
||||
appCompatButton6.perform(click());
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2013-2016 EasyDarwin.ORG. All rights reserved.
|
||||
Github: https://github.com/EasyDarwin
|
||||
WEChat: EasyDarwin
|
||||
Website: http://www.easydarwin.org
|
||||
*/
|
||||
|
||||
package org.easydarwin.easypusher;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* To work on unit tests, switch the Test Artifact in the Build Variants view.
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() throws Exception {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue