@@ -0,0 +1,3232 @@
+package com.example.whatsmymood;%0A%0Aimport android.app.Activity;%0Aimport android.test.ActivityInstrumentationTestCase2;%0Aimport android.widget.AutoCompleteTextView;%0Aimport android.widget.Button;%0Aimport android.widget.EditText;%0A%0Aimport com.robotium.solo.Solo;%0A%0A/**%0A * Created by ejtang on 2017-04-03.%0A */%0A%0Apublic class ProfileActivtyTest extends ActivityInstrumentationTestCase2 %7B%0A    private Solo solo;%0A    private CurrentUser current = CurrentUser.getInstance();%0A%0A    public ProfileActivtyTest() %7B%0A        super(LoginActivity.class);%0A    %7D%0A%0A    public void setUp() throws Exception %7B%0A        solo = new Solo(getInstrumentation(), getActivity());%0A    %7D%0A%0A    public void testStart() throws Exception %7B%0A        Activity activity = getActivity();%0A    %7D%0A%0A    public void testOpenProfile() throws Exception %7B%0A        LoginActivity activity = (LoginActivity) solo.getCurrentActivity();%0A%0A        solo.assertCurrentActivity(%22Wrong Activity%22, LoginActivity.class);%0A        solo.enterText((AutoCompleteTextView) solo.getView(R.id.Username), %22testUser%22);%0A        solo.enterText((EditText) solo.getView(R.id.password), %22password%22);%0A%0A        solo.clickOnButton(%22Sign in%22);%0A        solo.assertCurrentActivity(%22Wrong Activity%22, MainActivity.class);%0A%0A        solo.clickOnView(solo.getView(R.id.profile));%0A        solo.assertCurrentActivity(%22Wrong Activity%22, ProfileActivity.class);%0A    %7D%0A%0A    public void testOpenAddMoodInProfile() throws Exception %7B%0A        LoginActivity activity = (LoginActivity) solo.getCurrentActivity();%0A%0A        solo.assertCurrentActivity(%22Wrong Activity%22, LoginActivity.class);%0A        solo.enterText((AutoCompleteTextView) solo.getView(R.id.Username), %22testUser%22);%0A        solo.enterText((EditText) solo.getView(R.id.password), %22password%22);%0A%0A        solo.clickOnButton(%22Sign in%22);%0A        solo.assertCurrentActivity(%22Wrong Activity%22, MainActivity.class);%0A%0A        solo.clickOnView(solo.getView(R.id.profile));%0A        solo.assertCurrentActivity(%22Wrong Activity%22, ProfileActivity.class);%0A%0A        solo.clickOnView(solo.getView(R.id.add));%0A        assertTrue(%22Could not find the dialog!%22, solo.searchText(%22Select a mood%22));%0A    %7D%0A%0A    public void testAddHappinessMoodInProfile() throws Exception %7B%0A        LoginActivity activity = (LoginActivity) solo.getCurrentActivity();%0A%0A        solo.assertCurrentActivity(%22Wrong Activity%22, LoginActivity.class);%0A        solo.enterText((AutoCompleteTextView) solo.getView(R.id.Username), %22testUser%22);%0A        solo.enterText((EditText) solo.getView(R.id.password), %22password%22);%0A%0A        solo.clickOnButton(%22Sign in%22);%0A        solo.assertCurrentActivity(%22Wrong Activity%22, MainActivity.class);%0A%0A        solo.clickOnView(solo.getView(R.id.profile));%0A        solo.assertCurrentActivity(%22Wrong Activity%22, ProfileActivity.class);%0A%0A        solo.clickOnView(solo.getView(R.id.add));%0A        assertTrue(%22Could not find the dialog!%22, solo.searchText(%22Select a mood%22));%0A%0A        solo.clickOnView(solo.getView(R.id.select_mood));%0A        solo.clickOnText(%22Happiness%22);%0A        solo.clickOnButton(%22Post%22);%0A%0A        assertEquals(%22Happiness%22,current.getCurrentUser().getMoodList().getRecentMood().getMoodType());%0A        assertTrue(%22most recent mood not on screen!%22, solo.searchText(%22Happiness%22));%0A    %7D%0A%0A%7D%0A

Add some intent tests for profile activity