-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from faiyaz103/bishal
UI Test: Signup Button UI Test Completed
- Loading branch information
Showing
3 changed files
with
42 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
app/src/androidTest/java/com/example/notemania/signUpTestUI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.example.notemania; | ||
|
||
import androidx.test.espresso.Espresso; | ||
import androidx.test.espresso.action.ViewActions; | ||
import androidx.test.espresso.matcher.ViewMatchers; | ||
import androidx.test.ext.junit.rules.ActivityScenarioRule; | ||
|
||
import org.junit.Rule; | ||
import org.junit.Test; | ||
|
||
public class signUpTestUI { | ||
|
||
@Rule | ||
public ActivityScenarioRule<signup> activityScenarioRule = new ActivityScenarioRule<>(signup.class); | ||
|
||
@Test | ||
public void testwithoutinput() | ||
{ | ||
Espresso.onView(ViewMatchers.withId(R.id.signup)).perform(ViewActions.click()); | ||
Espresso.onView(ViewMatchers.withText("All fields are required")); | ||
} | ||
@Test | ||
public void testwithoutemail() | ||
{ | ||
Espresso.onView(ViewMatchers.withId(R.id.signupemail)).perform(ViewActions.typeText("")); | ||
Espresso.onView(ViewMatchers.withText("All fields are required")); | ||
} | ||
@Test | ||
public void testwithoutpass() | ||
{ | ||
Espresso.onView(ViewMatchers.withId(R.id.signuppassword)).perform(ViewActions.typeText("")); | ||
Espresso.onView(ViewMatchers.withText("All fields are required")); | ||
} | ||
@Test | ||
public void testwithallinputs() | ||
{ | ||
Espresso.onView(ViewMatchers.withId(R.id.signupemail)).perform(ViewActions.typeText("test@gmail.com")); | ||
Espresso.onView(ViewMatchers.withId(R.id.signuppassword)).perform(ViewActions.typeText("test")); | ||
Espresso.onView(ViewMatchers.withText("Registration Successful")); | ||
} | ||
} |