Ejemplo n.º 1
0
  @Test
  public void testLessThanMinimum() {
    page.fillShorterValues();
    page.validate();
    page.getMessageForJob().advanced().waitUntilMessageIsVisible().perform();
    assertTrue("All message should be present.", page.areAllMessagesPresent());

    assertMessageDetail("Name", page.getMessageForName(), MessagePage.NAME_ERROR_LESS_THAN_MINIMUM);
    assertMessageDetail("Job", page.getMessageForJob(), MessagePage.JOB_ERROR_LESS_THAN_MINIMUM);
    assertMessageDetail(
        "Address", page.getMessageForAddress(), MessagePage.ADDRESS_ERROR_LESS_THAN_MINIMUM);
    assertMessageDetail("Zip", page.getMessageForZip(), MessagePage.ZIP_ERROR_LESS_THAN_MINIMUM);
  }
Ejemplo n.º 2
0
  @Test
  @Category(Smoke.class)
  public void testEmptyInputs() {
    page.eraseAll();
    page.validate();
    page.getMessageForJob().advanced().waitUntilMessageIsVisible().perform();
    assertTrue("All message should be present.", page.areAllMessagesPresent());

    assertMessageDetail("Name", page.getMessageForName(), MessagePage.NAME_ERROR_VALUE_REQUIRED);
    assertMessageDetail("Job", page.getMessageForJob(), MessagePage.JOB_ERROR__VALUE_REQUIRED);
    assertMessageDetail(
        "Address", page.getMessageForAddress(), MessagePage.ADDRESS_ERROR__VALUE_REQUIRED);
    assertMessageDetail("Zip", page.getMessageForZip(), MessagePage.ZIP_ERROR__VALUE_REQUIRED);
  }