Exemplo n.º 1
0
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."
Exemplo n.º 2
0
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.'."
Exemplo n.º 3
0
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."
Exemplo n.º 4
0
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 '@'."