tests
This commit is contained in:
parent
ef5e8c6fcd
commit
a03ee27845
|
@ -0,0 +1,4 @@
|
|||
@env:aliceandbob1
|
||||
Feature: Streamer mode setting hides onions
|
||||
Scenario: Turning on streamer mode
|
||||
Given
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,8 @@ import 'package:flutter_gherkin/flutter_gherkin.dart';
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:gherkin/gherkin.dart';
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
// The application under test.
|
||||
import 'package:cwtch/main.dart' as app;
|
||||
import 'package:glob/glob.dart';
|
||||
|
@ -20,6 +22,51 @@ const REPLACED_BY_SCRIPT = <String>['integration_test/features/**.feature'];
|
|||
|
||||
@GherkinTestSuite(executionOrder: ExecutionOrder.alphabetical, featurePaths: <String>['./integration_test/features/05_p2p_chat/01_add_remove_block_archive.feature','./integration_test/features/05_p2p_chat/02_proto_invites.feature','./integration_test/features/05_p2p_chat/03_send_receive.feature','./integration_test/features/05_p2p_chat/04_special_messages.feature','./integration_test/features/05_p2p_chat/05_overlays_invite.feature','./integration_test/features/05_p2p_chat/06_overlays_file.feature','./integration_test/features/05_p2p_chat/07_overlays_image.feature'])
|
||||
void main() {
|
||||
final params = [
|
||||
SwitchStateParameter(),
|
||||
];
|
||||
|
||||
final steps = [
|
||||
// chat elements
|
||||
ExpectReply(),
|
||||
// form elements
|
||||
CheckSwitchState(),
|
||||
CheckSwitchStateWithText(),
|
||||
DropdownChoose(),
|
||||
// utils
|
||||
TakeScreenshot(),
|
||||
// overrides
|
||||
TapWidgetWithType(),
|
||||
TapFirstWidget(),
|
||||
WaitUntilTypeExists(),
|
||||
ExpectTextToBePresent(),
|
||||
ExpectWidgetWithTextWithin(),
|
||||
WaitUntilTextExists(),
|
||||
SwipeOnType(),
|
||||
// text
|
||||
TorVersionPresent(),
|
||||
TooltipTap(),
|
||||
// files
|
||||
FolderExists(),
|
||||
FileExists(),
|
||||
];
|
||||
|
||||
var sb = StringBuffer();
|
||||
sb..writeln("## Custom Parameters\n")
|
||||
..writeln("| name | pattern |")
|
||||
..writeln("| --- | --- |");
|
||||
for (var i in params) {
|
||||
sb..write("| ")..write(i.identifier)..write(" | ")..write(i.pattern.toString().replaceFirst("RegExp: pattern=","").replaceFirst(" flags=i",""))..writeln(" |");
|
||||
}
|
||||
sb..writeln("\n## Custom steps\n")
|
||||
..writeln("| pattern |")
|
||||
..writeln("| --- |");
|
||||
for (var i in steps) {
|
||||
sb.writeln(i.pattern.toString().replaceFirst("RegExp: pattern=", "| ").replaceFirst(" flags=", " |"));
|
||||
}
|
||||
var f = File("integration_test/CustomSteps.md");
|
||||
f.writeAsString(sb.toString());
|
||||
|
||||
executeTestSuite(
|
||||
FlutterTestConfiguration.DEFAULT([])
|
||||
..reporters = [
|
||||
|
@ -39,30 +86,7 @@ void main() {
|
|||
..customStepParameterDefinitions = [
|
||||
SwitchStateParameter(),
|
||||
]
|
||||
..stepDefinitions = [
|
||||
// chat elements
|
||||
ExpectReply(),
|
||||
// form elements
|
||||
CheckSwitchState(),
|
||||
CheckSwitchStateWithText(),
|
||||
DropdownChoose(),
|
||||
// utils
|
||||
TakeScreenshot(),
|
||||
// overrides
|
||||
TapWidgetWithType(),
|
||||
TapFirstWidget(),
|
||||
WaitUntilTypeExists(),
|
||||
ExpectTextToBePresent(),
|
||||
ExpectWidgetWithTextWithin(),
|
||||
WaitUntilTextExists(),
|
||||
SwipeOnType(),
|
||||
// text
|
||||
TorVersionPresent(),
|
||||
TooltipTap(),
|
||||
// files
|
||||
FolderExists(),
|
||||
FileExists(),
|
||||
]
|
||||
..stepDefinitions = steps
|
||||
..hooks = [
|
||||
ResetCwtchEnvironment(),
|
||||
AttachScreenshotOnFailedStepHook(),
|
||||
|
|
|
@ -3,6 +3,8 @@ import 'package:flutter_gherkin/flutter_gherkin.dart';
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:gherkin/gherkin.dart';
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
// The application under test.
|
||||
import 'package:cwtch/main.dart' as app;
|
||||
import 'package:glob/glob.dart';
|
||||
|
@ -20,6 +22,51 @@ const REPLACED_BY_SCRIPT = <String>['integration_test/features/**.feature'];
|
|||
|
||||
@GherkinTestSuite(executionOrder: ExecutionOrder.alphabetical, featurePaths: REPLACED_BY_SCRIPT)
|
||||
void main() {
|
||||
final params = [
|
||||
SwitchStateParameter(),
|
||||
];
|
||||
|
||||
final steps = [
|
||||
// chat elements
|
||||
ExpectReply(),
|
||||
// form elements
|
||||
CheckSwitchState(),
|
||||
CheckSwitchStateWithText(),
|
||||
DropdownChoose(),
|
||||
// utils
|
||||
TakeScreenshot(),
|
||||
// overrides
|
||||
TapWidgetWithType(),
|
||||
TapFirstWidget(),
|
||||
WaitUntilTypeExists(),
|
||||
ExpectTextToBePresent(),
|
||||
ExpectWidgetWithTextWithin(),
|
||||
WaitUntilTextExists(),
|
||||
SwipeOnType(),
|
||||
// text
|
||||
TorVersionPresent(),
|
||||
TooltipTap(),
|
||||
// files
|
||||
FolderExists(),
|
||||
FileExists(),
|
||||
];
|
||||
|
||||
var sb = StringBuffer();
|
||||
sb..writeln("## Custom Parameters\n")
|
||||
..writeln("| name | pattern |")
|
||||
..writeln("| --- | --- |");
|
||||
for (var i in params) {
|
||||
sb..write("| ")..write(i.identifier)..write(" | ")..write(i.pattern.toString().replaceFirst("RegExp: pattern=","").replaceFirst(" flags=i",""))..writeln(" |");
|
||||
}
|
||||
sb..writeln("\n## Custom steps\n")
|
||||
..writeln("| pattern |")
|
||||
..writeln("| --- |");
|
||||
for (var i in steps) {
|
||||
sb.writeln(i.pattern.toString().replaceFirst("RegExp: pattern=", "| ").replaceFirst(" flags=", " |"));
|
||||
}
|
||||
var f = File("integration_test/CustomSteps.md");
|
||||
f.writeAsString(sb.toString());
|
||||
|
||||
executeTestSuite(
|
||||
FlutterTestConfiguration.DEFAULT([])
|
||||
..reporters = [
|
||||
|
@ -39,30 +86,7 @@ void main() {
|
|||
..customStepParameterDefinitions = [
|
||||
SwitchStateParameter(),
|
||||
]
|
||||
..stepDefinitions = [
|
||||
// chat elements
|
||||
ExpectReply(),
|
||||
// form elements
|
||||
CheckSwitchState(),
|
||||
CheckSwitchStateWithText(),
|
||||
DropdownChoose(),
|
||||
// utils
|
||||
TakeScreenshot(),
|
||||
// overrides
|
||||
TapWidgetWithType(),
|
||||
TapFirstWidget(),
|
||||
WaitUntilTypeExists(),
|
||||
ExpectTextToBePresent(),
|
||||
ExpectWidgetWithTextWithin(),
|
||||
WaitUntilTextExists(),
|
||||
SwipeOnType(),
|
||||
// text
|
||||
TorVersionPresent(),
|
||||
TooltipTap(),
|
||||
// files
|
||||
FolderExists(),
|
||||
FileExists(),
|
||||
]
|
||||
..stepDefinitions = steps
|
||||
..hooks = [
|
||||
ResetCwtchEnvironment(),
|
||||
AttachScreenshotOnFailedStepHook(),
|
||||
|
|
Loading…
Reference in New Issue