taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sagar15795 <...@git.apache.org>
Subject [GitHub] incubator-taverna-mobile pull request #94: Added LoginActivity UI Test
Date Sat, 11 Aug 2018 06:11:16 GMT
Github user sagar15795 commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/94#discussion_r209417693
  
    --- Diff: app/src/androidTest/java/org/apache/taverna/mobile/login/LoginActivityTest.java
---
    @@ -0,0 +1,208 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.taverna.mobile.login;
    +
    +import org.apache.taverna.mobile.FakeRemoteDataSource;
    +import org.apache.taverna.mobile.TestComponentRule;
    +
    +import org.apache.taverna.mobile.R;
    +
    +import org.apache.taverna.mobile.data.model.User;
    +import org.apache.taverna.mobile.ui.login.LoginActivity;
    +import org.junit.Before;
    +import org.junit.Rule;
    +import org.junit.Test;
    +import org.junit.rules.RuleChain;
    +import org.junit.rules.TestRule;
    +import org.junit.runner.RunWith;
    +import org.mockito.Mockito;
    +
    +import android.content.Intent;
    +import android.support.test.InstrumentationRegistry;
    +import android.support.test.espresso.Espresso;
    +import android.support.test.rule.ActivityTestRule;
    +import android.support.test.runner.AndroidJUnit4;
    +
    +import io.reactivex.Observable;
    +
    +import static android.os.SystemClock.sleep;
    +import static android.support.test.espresso.Espresso.onView;
    +import static android.support.test.espresso.action.ViewActions.click;
    +import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;
    +import static android.support.test.espresso.action.ViewActions.typeText;
    +import static android.support.test.espresso.assertion.ViewAssertions.matches;
    +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.withText;
    +import static org.hamcrest.core.AllOf.allOf;
    +
    +@RunWith(AndroidJUnit4.class)
    +public class LoginActivityTest {
    +
    +    User testUser;
    --- End diff --
    
    can't we make it private?


---

Mime
View raw message