def test_email_blank(browser): """ Testing the email field is required and gives correct error. :param browser: """ page = GCLPOM(browser) page.load() page.test_name("Test") page.click_submit() assert page.email_error() == "Please fill out this field."
def test_email_invalid_3(browser): """ Testing the email needs to have content with @ but needs something after . and errors correctly. :param browser: """ page = GCLPOM(browser) page.load() page.test_name("Test") page.test_email("test@example.") page.click_submit() assert page.email_error( ) == "'.' is used at a wrong position in 'example.'."
def test_email_invalid_2(browser): """ Testing the email needs to have content with @ and errors correctly. :param browser: """ page = GCLPOM(browser) page.load() page.test_name("Test") page.test_email("test@") page.click_submit() assert page.email_error( ) == "Please enter a part following '@'. 'test@' is incomplete."
def test_email_invalid_1(browser): """ Testing the email needs to have content without @ and errors correctly. :param browser: """ page = GCLPOM(browser) page.load() page.test_name("Test") page.test_email("test") page.click_submit() assert page.email_error( ) == "Please include an '@' in the email address. 'test' is missing an '@'."