chore(lib): updated gherkin lib
fix(steps): updated steps to use non-capturing regex pattern groups when possible
This commit is contained in:
parent
4032844f5a
commit
d385c5a8ac
|
@ -16,7 +16,7 @@ import 'package:gherkin/gherkin.dart';
|
|||
class ThenExpectElementToHaveValue
|
||||
extends Then2WithWorld<String, String, FlutterWorld> {
|
||||
@override
|
||||
RegExp get pattern => RegExp(r"I expect the {string} to be {string}");
|
||||
RegExp get pattern => RegExp(r"I expect the {string} to be {string}$");
|
||||
|
||||
@override
|
||||
Future<void> executeStep(String key, String value) async {
|
||||
|
|
|
@ -16,7 +16,7 @@ class ThenExpectWidgetToBePresent
|
|||
extends When2WithWorld<String, int, FlutterWorld> {
|
||||
@override
|
||||
RegExp get pattern => RegExp(
|
||||
r"I expect the button|element|label|icon|field|text|widget {string} to be present within {int} second(s)");
|
||||
r"I expect the (?:button|element|label|icon|field|text|widget) {string} to be present within {int} second(s)$");
|
||||
|
||||
@override
|
||||
Future<void> executeStep(String key, int seconds) async {
|
||||
|
|
|
@ -12,7 +12,7 @@ import 'package:gherkin/gherkin.dart';
|
|||
/// `When I tap the back widget"`
|
||||
class WhenTapBackButtonWidget extends WhenWithWorld<FlutterWorld> {
|
||||
@override
|
||||
RegExp get pattern => RegExp(r"I tap the back button|element|widget");
|
||||
RegExp get pattern => RegExp(r"I tap the back button|element|widget$");
|
||||
|
||||
@override
|
||||
Future<void> executeStep() async {
|
||||
|
|
|
@ -20,7 +20,7 @@ import 'package:gherkin/gherkin.dart';
|
|||
class WhenTapWidget extends When1WithWorld<String, FlutterWorld> {
|
||||
@override
|
||||
RegExp get pattern =>
|
||||
RegExp(r"I tap the {string} button|element|label|icon|field|text|widget");
|
||||
RegExp(r"I tap the {string} (?:button|element|label|icon|field|text|widget)$");
|
||||
|
||||
@override
|
||||
Future<void> executeStep(String key) async {
|
||||
|
|
|
@ -118,7 +118,7 @@ packages:
|
|||
name: gherkin
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.6+1"
|
||||
version: "1.1.6+2"
|
||||
glob:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
@ -16,7 +16,7 @@ dependencies:
|
|||
sdk: flutter
|
||||
glob: ^1.1.7
|
||||
meta: ">=1.1.6 <2.0.0"
|
||||
gherkin: ^1.1.6+1
|
||||
gherkin: ^1.1.6+2
|
||||
# gherkin:
|
||||
# path: ../dart_gherkin
|
||||
|
||||
|
|
Loading…
Reference in New Issue