Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(screenshot_hook): typo in class name #41

Merged
merged 1 commit into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

## [1.1.0] - 20/09/2019
* Updated to latest Gherkin lib which implements langauges - features can now be written in different languages / dialects! See https://cucumber.io/docs/gherkin/reference/#overview for supported dialects.
* Ensured the hook to take a screenshot `AttachScreenhotOnFailedStepHook` works for steps that error or timeout as well as fail.
* Ensured the hook to take a screenshot `AttachScreenshotOnFailedStepHook` works for steps that error or timeout as well as fail.
* Fix missing await in `FlutterDriverUtils` when getting text of a widget.

## [1.0.12] - 18/09/2019
Expand Down Expand Up @@ -50,7 +50,7 @@
* Fixed analysis suggestions

## [1.0.3] - 21/06/2019
* Added ability to include a hook (see `AttachScreenhotOnFailedStepHook`) that takes a screenshot after a failed step. If using the json reporter it include the screenshot in the report that can then be used to generate a HTML report.
* Added ability to include a hook (see `AttachScreenshotOnFailedStepHook`) that takes a screenshot after a failed step. If using the json reporter it include the screenshot in the report that can then be used to generate a HTML report.
* Updated to latest dart_gherkin lib

## [1.0.2] - 05/06/2019
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ Attachments would typically be attached via a `Hook` for example `onAfterStep`.
```
import 'package:gherkin/gherkin.dart';

class AttachScreenhotOnFailedStepHook extends Hook {
class AttachScreenshotOnFailedStepHook extends Hook {
/// Run after a step has executed
@override
Future<void> onAfterStep(World world, String step, StepResult stepResult) async {
Expand All @@ -345,7 +345,7 @@ class AttachScreenhotOnFailedStepHook extends Hook {

##### screenshot

To take a screenshot on a step failing you can used the pre-defined hook `AttachScreenhotOnFailedStepHook` and include it in the hook configuration of the tests config. This hook will take a screenshot and add it as an attachment to the scenerio. If the `JsonReporter` is being used the screenshot will be embedded in the report which can be used to generate a HTML report which will ultimately display the screenshot under the failed step.
To take a screenshot on a step failing you can used the pre-defined hook `AttachScreenshotOnFailedStepHook` and include it in the hook configuration of the tests config. This hook will take a screenshot and add it as an attachment to the scenerio. If the `JsonReporter` is being used the screenshot will be embedded in the report which can be used to generate a HTML report which will ultimately display the screenshot under the failed step.

```
import 'dart:async';
Expand All @@ -365,7 +365,7 @@ Future<void> main() {
TestRunSummaryReporter(),
JsonReporter(path: './report.json')
]
..hooks = [HookExample(), AttachScreenhotOnFailedStepHook()]
..hooks = [HookExample(), AttachScreenshotOnFailedStepHook()]
..stepDefinitions = [TapButtonNTimesStep(), GivenIPickAColour()]
..customStepParameterDefinitions = [ColourParameter()]
..restartAppBetweenScenarios = true
Expand Down
2 changes: 1 addition & 1 deletion example/test_driver/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Future<void> main() {
] // you can include the "StdoutReporter()" without the message level parameter for verbose log information
..hooks = [
HookExample()
] // you can include "AttachScreenhotOnFailedStepHook()" to take a screenshot of each step failure and attach it to the world object
] // you can include "AttachScreenshotOnFailedStepHook()" to take a screenshot of each step failure and attach it to the world object
..stepDefinitions = [
TapButtonNTimesStep(),
GivenIPickAColour(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:gherkin/gherkin.dart';
import 'package:meta/meta.dart';
import '../flutter_world.dart';

class AttachScreenhotOnFailedStepHook extends Hook {
class AttachScreenshotOnFailedStepHook extends Hook {
@override
Future<void> onAfterStep(
World world, String step, StepResult stepResult) async {
Expand Down