package com.emmasuzuki.cucumberespressodemo.test;

import android.content.Intent;
import android.support.test.rule.ActivityTestRule;

import com.emmasuzuki.cucumberespressodemo.R;
import com.emmasuzuki.cucumberespressodemo.SignupActivity;

import org.junit.Rule;

import cucumber.api.CucumberOptions;
import cucumber.api.java.After;
import cucumber.api.java.Before;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static junit.framework.TestCase.assertNotNull;

public class SignupActivitySteps {

    @Rule
    private ActivityTestRule<SignupActivity> activityTestRule = new ActivityTestRule<>(SignupActivity.class);

    private SignupActivity activity;

    @Before("@signup-feature")
    public void setUp() {
        activityTestRule.launchActivity(new Intent());
        activity = activityTestRule.getActivity();
    }

    @After("@signup-feature")
    public void tearDown() {
        activityTestRule.finishActivity();
    }

    @Given("^I am on sign up screen$")
    public void I_am_on_sign_up_screen() {
        assertNotNull(activity);
    }

    @When("^I tap login button$")
    public void I_tap_login_button() {
        onView(withId(R.id.login)).perform(click());
    }

    @Then("^I should see login screen$")
    public void I_should_see_login_screen() {
        onView(withId(R.id.page_title)).check(matches(withText(R.string.login)));
    }
}

@@ -1,8 +1,1143 @@
+/*%0A * Copyright (C) 2015 emmasuzuki %3Cemma11suzuki@gmail.com%3E%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy of this software%0A * and associated documentation files (the %22Software%22), to deal in the Software without restriction,%0A * including without limitation the rights to use, copy, modify, merge, publish, distribute,%0A * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is%0A * furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in all copies or%0A * substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,%0A * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A%0A * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR%0A * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN%0A * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH%0A * THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A */%0A%0A
 package 
@@ -1396,45 +1396,8 @@
 e;%0A%0A
-import cucumber.api.CucumberOptions;%0A
 impo

Add license