File: html_formatter.feature

package info (click to toggle)
cucumber 2.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,076 kB
  • sloc: ruby: 17,016; javascript: 4,641; makefile: 12; sh: 10; tcl: 3
file content (91 lines) | stat: -rw-r--r-- 2,732 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Feature: HTML output formatter

  Background:
    Given the standard step definitions
    And a file named "features/scenario_outline_with_undefined_steps.feature" with:
      """
      Feature:

        Scenario Outline:
          Given this step is undefined

        Examples:
          |foo|
          |bar|
      """
    And a file named "features/scenario_outline_with_pending_step.feature" with:
      """
      Feature: Outline

        Scenario Outline: Will it blend?
          Given this step is pending
          And other step
          When I do something with <example>
          Then I should see something
          Examples:
            | example |
            | one     |
            | two     |
            | three   |
      """
    And a file named "features/failing_background_step.feature" with:
      """
      Feature: Feature with failing background step

        Background:
          Given this step fails

        Scenario:
          When I do something
          Then I should see something
      """

  Scenario: an scenario outline, one undefined step, one random example, expand flag on
    When I run `cucumber features/scenario_outline_with_undefined_steps.feature --format html --expand `
    Then it should pass

  Scenario Outline: an scenario outline, one pending step
    When I run `cucumber <file> --format html <flag>`
    Then it should pass
    And the output should contain:
    """
    makeYellow('scenario_1')
    """
    And the output should not contain:
    """
    makeRed('scenario_1')
    """

    Examples:
      | file                                                   | flag     |
      | features/scenario_outline_with_pending_step.feature    | --expand |
      | features/scenario_outline_with_pending_step.feature    |          |

    Examples:
      | file                                                   | flag     |
      | features/scenario_outline_with_undefined_steps.feature | --expand |
      | features/scenario_outline_with_undefined_steps.feature |          |

  Scenario: when using a profile the html shouldn't include 'Using the default profile...'
    And a file named "cucumber.yml" with:
    """
      default: -r features
    """
    When I run `cucumber features/scenario_outline_with_undefined_steps.feature --profile default --format html`
    Then it should pass
    And the output should not contain:
    """
    Using the default profile...
    """

  Scenario: a feature with a failing background step
    When I run `cucumber features/failing_background_step.feature --format html`
    Then the output should not contain:
    """
    makeRed('scenario_0')
    """
    And the output should contain:
    """
    makeRed('background_0')
    """