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,26 +22,11 @@ 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() {
|
||||
executeTestSuite(
|
||||
FlutterTestConfiguration.DEFAULT([])
|
||||
..reporters = [
|
||||
StdoutReporter(MessageLevel.error)
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
ProgressReporter()
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
TestRunSummaryReporter()
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
JsonReporter(
|
||||
writeReport: (_, __) => Future<void>.value(),
|
||||
),
|
||||
]
|
||||
..customStepParameterDefinitions = [
|
||||
final params = [
|
||||
SwitchStateParameter(),
|
||||
]
|
||||
..stepDefinitions = [
|
||||
];
|
||||
|
||||
final steps = [
|
||||
// chat elements
|
||||
ExpectReply(),
|
||||
// form elements
|
||||
|
@ -62,7 +49,44 @@ void main() {
|
|||
// 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 = [
|
||||
StdoutReporter(MessageLevel.error)
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
ProgressReporter()
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
TestRunSummaryReporter()
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
JsonReporter(
|
||||
writeReport: (_, __) => Future<void>.value(),
|
||||
),
|
||||
]
|
||||
..customStepParameterDefinitions = [
|
||||
SwitchStateParameter(),
|
||||
]
|
||||
..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,26 +22,11 @@ const REPLACED_BY_SCRIPT = <String>['integration_test/features/**.feature'];
|
|||
|
||||
@GherkinTestSuite(executionOrder: ExecutionOrder.alphabetical, featurePaths: REPLACED_BY_SCRIPT)
|
||||
void main() {
|
||||
executeTestSuite(
|
||||
FlutterTestConfiguration.DEFAULT([])
|
||||
..reporters = [
|
||||
StdoutReporter(MessageLevel.error)
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
ProgressReporter()
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
TestRunSummaryReporter()
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
JsonReporter(
|
||||
writeReport: (_, __) => Future<void>.value(),
|
||||
),
|
||||
]
|
||||
..customStepParameterDefinitions = [
|
||||
final params = [
|
||||
SwitchStateParameter(),
|
||||
]
|
||||
..stepDefinitions = [
|
||||
];
|
||||
|
||||
final steps = [
|
||||
// chat elements
|
||||
ExpectReply(),
|
||||
// form elements
|
||||
|
@ -62,7 +49,44 @@ void main() {
|
|||
// 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 = [
|
||||
StdoutReporter(MessageLevel.error)
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
ProgressReporter()
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
TestRunSummaryReporter()
|
||||
..setWriteLineFn(print)
|
||||
..setWriteFn(print),
|
||||
JsonReporter(
|
||||
writeReport: (_, __) => Future<void>.value(),
|
||||
),
|
||||
]
|
||||
..customStepParameterDefinitions = [
|
||||
SwitchStateParameter(),
|
||||
]
|
||||
..stepDefinitions = steps
|
||||
..hooks = [
|
||||
ResetCwtchEnvironment(),
|
||||
AttachScreenshotOnFailedStepHook(),
|
||||
|
|
Loading…
Reference in New Issue