Skip to content

Commit

Permalink
- Fix #231 - using local coordinate system when taking a screenshot …
Browse files Browse the repository at this point in the history
…on Android (thanks to @youssef-t for the solution)

  - Fix #216 - ensure step exceptions and `expect` failure results are added as errors to the json report
  - Scenarios can now have descriptions which also appear in the json reporter output
  • Loading branch information
jonsamwell committed Jul 1, 2022
1 parent b73da40 commit 7ee9f80
Show file tree
Hide file tree
Showing 15 changed files with 2,423 additions and 68 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## [3.0.0-rc.16] - 01/07/2022
- Fix #231 - using local coordinate system when taking a screenshot on Android (thanks to @youssef-t for the solution)
- Fix #216 - ensure step exceptions and `expect` failure results are added as errors to the json report
- Scenarios can now have descriptions which also appear in the json reporter output

NOTE: Due to the above changes generated files will need to be re-generated

```
flutter pub run build_runner clean
flutter pub run build_runner build --delete-conflicting-outputs
```

## [3.0.0-rc.15] - 28/06/2022
- Exposed `frameBindingPolicy` on the test runner when running tests which can affect how frames are painted and the speed of the test run, I've removed the default value which might be responsible for #231

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@debug
Feature: Expect failure
Ensure that when a test fails the exception or test failure is reported

Scenario: Exception should be added to json report
Given I expect the todo list
| Todo |
| Buy blueberries |
When I tap the "add" button
And I fill the "todo" field with "Buy hannah's apples"

Scenario: Failed expect() should be added to json report
Description for this scenario!
When I tap the "add" button
And I fill the "todo" field with "Buy hannah's apples"
Then I expect a failure
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ import 'package:flutter_gherkin/flutter_gherkin.dart';
import 'package:flutter_simple_dependency_injection/injector.dart';
import 'package:gherkin/gherkin.dart';

import 'hooks/attach_screenshot_after_step_hook.dart';
import 'hooks/reset_app_hook.dart';
import 'steps/expect_failure.dart';
import 'steps/expect_todos_step.dart';
import 'steps/multiline_string_with_formatted_json.dart';
import 'steps/when_await_animation.dart';
import 'steps/when_step_has_timeout.dart';
import 'world/custom_world.dart';

FlutterTestConfiguration gherkinTestConfiguration = FlutterTestConfiguration(
// tagExpression: '@debug', // can be used to limit the tests that are run
// tagExpression: '@debug', // can be used to limit the tests that are run
stepDefinitions: [
thenIExpectTheTodos,
whenAnAnimationIsAwaited,
whenStepHasTimeout,
givenTheData
givenTheData,
thenIExpectFailure,
],
hooks: [
ResetAppHook(),
AttachScreenshotAfterStepHook(),
AttachScreenshotOnFailedStepHook(),
// AttachScreenshotAfterStepHook(),
],
reporters: [
StdoutReporter(MessageLevel.error)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "reports",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"cucumber-html-reporter": "^5.5.0"
},
"dependencies": {
"ansi-styles": "^3.2.1",
"chalk": "^2.4.2",
"color-convert": "^1.9.3",
"color-name": "^1.1.3",
"escape-string-regexp": "^1.0.5",
"find": "^0.3.0",
"fs-extra": "^8.1.0",
"graceful-fs": "^4.2.10",
"has-flag": "^3.0.0",
"is-wsl": "^1.1.0",
"js-base64": "^2.6.4",
"jsonfile": "^5.0.0",
"lodash": "^4.17.21",
"node-emoji": "^1.11.0",
"open": "^6.4.0",
"supports-color": "^5.5.0",
"traverse-chain": "^0.1.0",
"universalify": "^0.1.2",
"uuid": "^3.4.0"
},
"description": ""
}
Loading

0 comments on commit 7ee9f80

Please sign in to comment.