Skip to content

Instantly share code, notes, and snippets.

@alexhidalgo
Created November 5, 2018 18:51
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 alexhidalgo/d3dc059f3f7ec9b4dd9db5b406852495 to your computer and use it in GitHub Desktop.
Save alexhidalgo/d3dc059f3f7ec9b4dd9db5b406852495 to your computer and use it in GitHub Desktop.
first spec test that runs
import LoginPage from '../pageobjects/login.page';
import ConsentPage from '../pageobjects/consent.page';
import TabBarPage from '../pageobjects/tabbar.page';
import ProfilePage from '../pageobjects/profile.page';
describe('new account auth flow', () => {
browser.timeouts('implicit', 10000);
it('logs in up to consent flow', () => {
LoginPage.signInButton.waitForVisible();
console.log(LoginPage.signInButton.getText());
expect(LoginPage.signInButton.getText()).toBe('Sign In');
// LoginPage.signInButton.click();
// LoginPage.phoneNumberInput.click();
// LoginPage.phoneNumberInput.keys('0000000001');
// LoginPage.sendVerificationCodeButton.click();
// LoginPage.verificationCodeInput.waitForVisible();
// LoginPage.verificationCodeInput.click();
// LoginPage.verificationCodeInput.keys('8888');
// LoginPage.verifyCodeButton.click();
// ConsentPage.ageConsentQuestionTitle.waitForVisible();
// expect(ConsentPage.ageConsentQuestionTitle.isVisible()).toBe(true);
});
// it('completes consent flow', () => {
// ConsentPage.ageConsentRadioButton.click();
// ConsentPage.scrollDown();
// ConsentPage.submitConsentButton.click();
// ConsentPage.onboardingFlowNextButton.click();
// ConsentPage.onboardingFlowNextButton.click();
// ConsentPage.onboardingFlowDoneButton.click();
// TabBarPage.profileTabButton.waitForVisible();
// expect(TabBarPage.profileTabButton.isVisible()).toBe(true);
// });
// it('logs out', () => {
// TabBarPage.profileTabButton.waitForVisible();
// TabBarPage.profileTabButton.click();
// ProfilePage.signOutButton.waitForVisible();
// ProfilePage.signOutButton.click();
// LoginPage.signInButton.waitForVisible();
// expect(LoginPage.signInButton.isVisible()).toBe(true);
// });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment