@Test
  public void should_list_screenshots_in_steps() {
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_1"));
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_2"));
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_3"));

    assertThat(
        testOutcome.getScreenshots(), hasFilenames("step_1.png", "step_2.png", "step_3.png"));
  }
  @Test
  public void the_test_runner_records_the_steps_as_they_are_executed() throws InitializationError {

    ThucydidesRunner runner = new ThucydidesRunner(LongSamplePassingScenarioUsingFirefox.class);
    runner.run(new RunNotifier());

    List<TestOutcome> executedSteps = runner.getTestOutcomes();
    assertThat(executedSteps.size(), is(1));
    TestOutcome testOutcome1 = executedSteps.get(0);

    assertThat(testOutcome1.getTitle(), is("Happy day scenario"));
    assertThat(testOutcome1.getMethodName(), is("happy_day_scenario"));
    assertThat(testOutcome1.getTestSteps().size(), is(3));
    assertThat(testOutcome1.getScreenshots().size(), is(not(0)));
  }
  @Test
  public void should_list_screenshots_for_leaf_steps_in_nested_steps() {
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_1"));
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_2"));
    testOutcome.startGroup();
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_2.1"));
    testOutcome.startGroup();
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_2.1.1"));
    testOutcome.startGroup();
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_2.1.1.1"));
    testOutcome.endGroup();
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_2.1.2"));
    testOutcome.endGroup();
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_2.2"));
    testOutcome.endGroup();
    testOutcome.recordStep(forASuccessfulTestStepCalled("step_3"));

    List<String> screenshots =
        extract(testOutcome.getScreenshots(), on(Screenshot.class).getFilename());
    assertThat(
        screenshots,
        hasItems("step_1.png", "step_2.1.1.1.png", "step_2.1.2.png", "step_2.2.png", "step_3.png"));
  }