Ejemplo n.º 1
0
  @Test
  public void the_welcome_page_of_the_HTML5_report_can_be_opened() throws Exception {
    given().a_report_model().and().the_report_exist_as_JSON_file();

    whenReport.and().the_HTML5_report_has_been_generated();

    when().the_index_page_is_opened();

    then().the_page_title_is("Welcome");
  }
Ejemplo n.º 2
0
  @Test
  @FeatureAttachments
  public void attachments_appear_in_the_HTML5_report() throws Exception {
    String content = "Some Example Attachment\nwith some example content";
    given()
        .a_report_model()
        .and()
        .step_$_of_scenario_$_has_a_text_attachment_with_content(1, 1, content)
        .and()
        .the_report_exist_as_JSON_file();

    whenReport.and().the_HTML5_report_has_been_generated();

    when().the_page_of_scenario_$_is_opened(1);

    then().an_attachment_icon_exists().and().the_content_of_the_referenced_attachment_is(content);
  }
Ejemplo n.º 3
0
  @Test
  @Issue("#47")
  @DataProvider({"true,  testtag-#42", "false, #42"})
  public void clicking_on_tag_labels_opens_the_tag_page(boolean prependType, String tagName)
      throws Exception {
    given()
        .a_report_model()
        .and()
        .scenario_$_has_tag_$_with_value_$(1, "testtag", "#42")
        .and()
        .the_tag_has_prependType_set_to(prependType)
        .and()
        .the_report_exist_as_JSON_file();

    whenReport.and().the_HTML5_report_has_been_generated();

    when().the_All_Scenarios_page_is_opened().and().the_tag_with_name_$_is_clicked(tagName);

    then().the_page_title_is(tagName);
  }
Ejemplo n.º 4
0
  @Test
  public void the_statistics_on_the_welcome_page_of_the_HTML5_report_is_correct() throws Exception {
    given()
        .a_report_model()
        .and()
        .the_report_has_$_scenarios(3)
        .and()
        .step_$_of_case_$_has_status(1, 1, StepStatus.FAILED)
        .and()
        .the_report_exist_as_JSON_file();

    whenReport.and().the_HTML5_report_has_been_generated();

    when().the_index_page_is_opened();

    then()
        .the_page_statistics_line_contains_text("3 Total")
        .and()
        .the_page_statistics_line_contains_text("2 Successful")
        .and()
        .the_page_statistics_line_contains_text("1 Failed")
        .and()
        .the_page_statistics_line_contains_text("0 Pending");
  }