|
3 | 3 |
|
4 | 4 | describe "Junit annotate plugin parser" do
|
5 | 5 | it "handles no failures" do
|
6 |
| - output, status = Open3.capture2e("#{__dir__}/../bin/annotate", "#{__dir__}/no-test-errors/") |
| 6 | + output, status = Open3.capture2e("#{__dir__}/../bin/annotate", "#{__dir__}/no-test-failures/") |
7 | 7 |
|
8 | 8 | assert_equal <<~OUTPUT, output
|
9 | 9 | Parsing junit-1.xml
|
10 | 10 | Parsing junit-2.xml
|
11 | 11 | --- ❓ Checking failures
|
12 |
| - There were no failures 🙌 |
| 12 | + There were no failures/errors 🙌 |
13 | 13 | OUTPUT
|
14 | 14 |
|
15 | 15 | assert_equal 0, status.exitstatus
|
16 | 16 | end
|
17 | 17 |
|
18 | 18 | it "handles failures across multiple files" do
|
19 |
| - output, status = Open3.capture2e("#{__dir__}/../bin/annotate", "#{__dir__}/two-test-errors/") |
| 19 | + output, status = Open3.capture2e("#{__dir__}/../bin/annotate", "#{__dir__}/two-test-failures/") |
20 | 20 |
|
21 | 21 | assert_equal <<~OUTPUT, output
|
22 | 22 | Parsing junit-1.xml
|
23 | 23 | Parsing junit-2.xml
|
24 | 24 | --- ❓ Checking failures
|
25 |
| - There are 2 failures 😭 |
| 25 | + There are 2 failures/errors 😭 |
26 | 26 | --- ✍️ Preparing annotation
|
27 |
| - There were 2 failures: |
| 27 | + 2 failures: |
| 28 | + |
| 29 | + <details> |
| 30 | + <summary><code>Account#maximum_jobs_added_by_pipeline_changer returns 250 by default in spec.models.account_spec</code></summary> |
| 31 | + |
| 32 | + <code><pre>Failure/Error: expect(account.maximum_jobs_added_by_pipeline_changer).to eql(250) |
| 33 | + |
| 34 | + expected: 250 |
| 35 | + got: 500 |
| 36 | + |
| 37 | + (compared using eql?) |
| 38 | + ./spec/models/account_spec.rb:78:in `block (3 levels) in <top (required)>' |
| 39 | + ./spec/support/database.rb:16:in `block (2 levels) in <top (required)>' |
| 40 | + ./spec/support/log.rb:17:in `run' |
| 41 | + ./spec/support/log.rb:66:in `block (2 levels) in <top (required)>'</pre></code> |
| 42 | + |
| 43 | + in <a href="#1">Job #1</a> |
| 44 | + </details> |
| 45 | + |
| 46 | + <details> |
| 47 | + <summary><code>Account#maximum_jobs_added_by_pipeline_changer returns 700 if the account is XYZ in spec.models.account_spec</code></summary> |
| 48 | + |
| 49 | + <code><pre>Failure/Error: expect(account.maximum_jobs_added_by_pipeline_changer).to eql(250) |
| 50 | + |
| 51 | + expected: 700 |
| 52 | + got: 500 |
| 53 | + |
| 54 | + (compared using eql?) |
| 55 | + ./spec/models/account_spec.rb:78:in `block (3 levels) in <top (required)>' |
| 56 | + ./spec/support/database.rb:16:in `block (2 levels) in <top (required)>' |
| 57 | + ./spec/support/log.rb:17:in `run' |
| 58 | + ./spec/support/log.rb:66:in `block (2 levels) in <top (required)>'</pre></code> |
| 59 | + |
| 60 | + in <a href="#2">Job #2</a> |
| 61 | + </details> |
| 62 | + OUTPUT |
| 63 | + |
| 64 | + assert_equal 0, status.exitstatus |
| 65 | + end |
| 66 | + |
| 67 | + it "handles failures and errors across multiple files" do |
| 68 | + output, status = Open3.capture2e("#{__dir__}/../bin/annotate", "#{__dir__}/test-failure-and-error/") |
| 69 | + |
| 70 | + assert_equal <<~OUTPUT, output |
| 71 | + Parsing junit-1.xml |
| 72 | + Parsing junit-2.xml |
| 73 | + --- ❓ Checking failures |
| 74 | + There are 2 failures/errors 😭 |
| 75 | + --- ✍️ Preparing annotation |
| 76 | + 1 failure and 1 error: |
28 | 77 |
|
29 | 78 | <details>
|
30 | 79 | <summary><code>Account#maximum_jobs_added_by_pipeline_changer returns 250 by default in spec.models.account_spec</code></summary>
|
|
70 | 119 | assert_equal <<~OUTPUT, output
|
71 | 120 | Parsing junit-123-456-custom-pattern.xml
|
72 | 121 | --- ❓ Checking failures
|
73 |
| - There are 1 failures 😭 |
| 122 | + There is 1 failure/error 😭 |
74 | 123 | --- ✍️ Preparing annotation
|
75 |
| - There were 1 failures: |
| 124 | + 1 failure: |
76 | 125 |
|
77 | 126 | <details>
|
78 | 127 | <summary><code>Account#maximum_jobs_added_by_pipeline_changer returns 250 by default in spec.models.account_spec</code></summary>
|
|
102 | 151 | Parsing sub-dir/junit-1.xml
|
103 | 152 | Parsing sub-dir/junit-2.xml
|
104 | 153 | --- ❓ Checking failures
|
105 |
| - There are 2 failures 😭 |
| 154 | + There are 2 failures/errors 😭 |
106 | 155 | --- ✍️ Preparing annotation
|
107 |
| - There were 2 failures: |
| 156 | + 2 failures: |
108 | 157 |
|
109 | 158 | <details>
|
110 | 159 | <summary><code>Account#maximum_jobs_added_by_pipeline_changer returns 250 by default in spec.models.account_spec</code></summary>
|
|
0 commit comments