Skip to content

Instantly share code, notes, and snippets.

@nadvolod
Last active May 4, 2022 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nadvolod/b9d97008fb880d7e1bcf8a62e9215c7b to your computer and use it in GitHub Desktop.
Save nadvolod/b9d97008fb880d7e1bcf8a62e9215c7b to your computer and use it in GitHub Desktop.
public void loginSuccessfully() {
//something like this, needs more work
app().visit();
app().login()
assertTrue(app().isUserLoggedIn());
}
public class App(){
public void visit(){
//can visit with a page
pages().getHomePage().visit();
}
public void login(){
//can login with a UI
//can login with an API
apis().getAuthenticateAPI().authenticate();
}
//probably need at least one test to login with a UI
public void loginThroughUI(){
//login with a UI
}
// same thing here. Can start w/ UI check. Can be updated to an API check in the future or even a cookie check
public void isUserLoggedIn(){
//can login with a UI
//can login with an API
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment