|
32 | 32 | == Results ===================================================================== |
33 | 33 | [ FAIL 0 | WARN 0 | SKIP 0 | PASS 4 ] |
34 | 34 |
|
| 35 | +# test: should run with shinytest2 |
| 36 | + |
| 37 | + Code |
| 38 | + testthat::test_dir(tests_path, reporter = testthat::ProgressReporter$new( |
| 39 | + show_praise = FALSE), stop_on_failure = FALSE) |
| 40 | + Output |
| 41 | + v | F W S OK | Context |
| 42 | + v | 2 | Feature: Formula display |
| 43 | + == Results ===================================================================== |
| 44 | + |
| 45 | + [ FAIL 0 | WARN 0 | SKIP 0 | PASS 2 ] |
| 46 | + |
35 | 47 | # test: should run a Scenario with Given, When, Then, And, But keywords |
36 | 48 |
|
37 | 49 | Code |
|
171 | 183 | x |
172 | 184 | 1. \-cucumber (local) call() at cucumber/R/parse_token.R:24:13 |
173 | 185 | 2. \-cucumber (local) x(context = context, ...) |
174 | | - 3. \-cucumber (local) step(expected = 5L, ...) |
| 186 | + 3. \-global step(expected = 5L, ...) |
175 | 187 | 4. \-testthat::expect_equal(context$result, expected) at ./steps/addition.R:7:3 |
176 | 188 | Failure ('test-cucumber.R:1:1'): Scenario: Adding float and float |
177 | 189 | context$result (`actual`) not equal to `expected` (`expected`). |
|
181 | 193 | x |
182 | 194 | 1. \-cucumber (local) call() at cucumber/R/parse_token.R:24:13 |
183 | 195 | 2. \-cucumber (local) x(context = context, ...) |
184 | | - 3. \-cucumber (local) step(expected = 5L, ...) |
| 196 | + 3. \-global step(expected = 5L, ...) |
185 | 197 | 4. \-testthat::expect_equal(context$result, expected) at ./steps/addition.R:7:3 |
186 | 198 | -------------------------------------------------------------------------------- |
187 | 199 | x | 1 1 | Feature: Guess the word |
|
194 | 206 | x |
195 | 207 | 1. \-cucumber (local) call() at cucumber/R/parse_token.R:24:13 |
196 | 208 | 2. \-cucumber (local) x(context = context, ...) |
197 | | - 3. \-cucumber (local) step(n = 6L, ...) |
| 209 | + 3. \-global step(n = 6L, ...) |
198 | 210 | 4. \-testthat::expect_equal(nchar(context$word), n) at ./steps/guess_the_word.R:18:3 |
199 | 211 | -------------------------------------------------------------------------------- |
200 | 212 | == Results ===================================================================== |
|
207 | 219 | x |
208 | 220 | 1. \-cucumber (local) call() at cucumber/R/parse_token.R:24:13 |
209 | 221 | 2. \-cucumber (local) x(context = context, ...) |
210 | | - 3. \-cucumber (local) step(expected = 5L, ...) |
| 222 | + 3. \-global step(expected = 5L, ...) |
211 | 223 | 4. \-testthat::expect_equal(context$result, expected) at ./steps/addition.R:7:3 |
212 | 224 | Failure ('test-cucumber.R:1:1'): Scenario: Adding float and float |
213 | 225 | context$result (`actual`) not equal to `expected` (`expected`). |
|
217 | 229 | x |
218 | 230 | 1. \-cucumber (local) call() at cucumber/R/parse_token.R:24:13 |
219 | 231 | 2. \-cucumber (local) x(context = context, ...) |
220 | | - 3. \-cucumber (local) step(expected = 5L, ...) |
| 232 | + 3. \-global step(expected = 5L, ...) |
221 | 233 | 4. \-testthat::expect_equal(context$result, expected) at ./steps/addition.R:7:3 |
222 | 234 | Failure ('test-cucumber.R:1:1'): Scenario: Breaker joins a game |
223 | 235 | nchar(context$word) (`actual`) not equal to `n` (`expected`). |
|
227 | 239 | x |
228 | 240 | 1. \-cucumber (local) call() at cucumber/R/parse_token.R:24:13 |
229 | 241 | 2. \-cucumber (local) x(context = context, ...) |
230 | | - 3. \-cucumber (local) step(n = 6L, ...) |
| 242 | + 3. \-global step(n = 6L, ...) |
231 | 243 | 4. \-testthat::expect_equal(nchar(context$word), n) at ./steps/guess_the_word.R:18:3 |
232 | 244 | [ FAIL 3 | WARN 0 | SKIP 0 | PASS 2 ] |
233 | 245 |
|
|
242 | 254 | == Results ===================================================================== |
243 | 255 | [ FAIL 0 | WARN 0 | SKIP 0 | PASS 1 ] |
244 | 256 |
|
| 257 | +# test: should work with Scenario Outline |
| 258 | + |
| 259 | + Code |
| 260 | + testthat::test_dir(tests_path, reporter = testthat::ProgressReporter$new( |
| 261 | + show_praise = FALSE), stop_on_failure = FALSE) |
| 262 | + Output |
| 263 | + v | F W S OK | Context |
| 264 | + v | 4 | Feature: Eating |
| 265 | + == Results ===================================================================== |
| 266 | + [ FAIL 0 | WARN 0 | SKIP 0 | PASS 4 ] |
| 267 | + |
0 commit comments