@@ -0,0 +1,1611 @@
+package com.andela.iworkout.activities;%0A%0Aimport android.test.ActivityInstrumentationTestCase2;%0A%0Aimport com.andela.iworkout.R;%0A%0Aimport junit.framework.TestCase;%0A%0Aimport static android.support.test.espresso.Espresso.onView;%0Aimport static android.support.test.espresso.action.ViewActions.click;%0Aimport static android.support.test.espresso.assertion.ViewAssertions.matches;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.withId;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.withText;%0A%0A%0Apublic class AnalyticsActivityTest extends ActivityInstrumentationTestCase2%3CAnalyticsActivity%3E %7B%0A%0A    public AnalyticsActivityTest() %7B%0A        super(AnalyticsActivity.class);%0A    %7D%0A%0A    public void setUp() throws Exception %7B%0A        super.setUp();%0A    %7D%0A%0A    public void tearDown() throws Exception %7B%0A    %7D%0A%0A    public void testOnCreate() throws Exception %7B%0A        getActivity();%0A        onView(withText(%22Push Up Analytics%22)).check(matches(isDisplayed()));%0A        onView(withId(R.id.chart1)).check(matches(isDisplayed()));%0A    %7D%0A%0A    public void testOnCreateOptionsMenu() throws Exception %7B%0A        getActivity();%0A        onView(withId(R.id.megamenu)).check(matches(isDisplayed()));%0A    %7D%0A%0A    public void testOnOptionsItemSelected() throws Exception %7B%0A        getActivity();%0A        onView(withId(R.id.megamenu)).perform(click());%0A        onView(withText(%22Last 5 Days%22)).perform(click());%0A        onView(withId(R.id.megamenu)).perform(click());%0A        onView(withText(%22Last 7 Days%22)).perform(click());%0A    %7D%0A%7D

Add AnalyticsActivity class Test