test_mode
This commit is contained in:
parent
6844118d0f
commit
83fffe74f8
|
@ -1,4 +0,0 @@
|
||||||
@env:aliceandbob1
|
|
||||||
Feature: Streamer mode setting hides onions
|
|
||||||
Scenario: Turning on streamer mode
|
|
||||||
Given
|
|
|
@ -57,13 +57,13 @@ void main() {
|
||||||
..writeln("| name | pattern |")
|
..writeln("| name | pattern |")
|
||||||
..writeln("| --- | --- |");
|
..writeln("| --- | --- |");
|
||||||
for (var i in params) {
|
for (var i in params) {
|
||||||
sb..write("| ")..write(i.identifier)..write(" | ")..write(i.pattern.toString().replaceFirst("RegExp: pattern=","").replaceFirst(" flags=i",""))..writeln(" |");
|
sb..write("| ")..write(i.identifier)..write(" | ")..write(i.pattern.toString().replaceFirst("RegExp: pattern=","").replaceFirst(" flags=i","").replaceAll("|", "|"))..writeln(" |");
|
||||||
}
|
}
|
||||||
sb..writeln("\n## Custom steps\n")
|
sb..writeln("\n## Custom steps\n")
|
||||||
..writeln("| pattern |")
|
..writeln("| pattern |")
|
||||||
..writeln("| --- |");
|
..writeln("| --- |");
|
||||||
for (var i in steps) {
|
for (var i in steps) {
|
||||||
sb.writeln(i.pattern.toString().replaceFirst("RegExp: pattern=", "| ").replaceFirst(" flags=", " |"));
|
sb.writeln(i.pattern.toString().replaceFirst("RegExp: pattern=", "| ").replaceFirst(" flags=", " |").replaceAll("|", "|"));
|
||||||
}
|
}
|
||||||
var f = File("integration_test/CustomSteps.md");
|
var f = File("integration_test/CustomSteps.md");
|
||||||
f.writeAsString(sb.toString());
|
f.writeAsString(sb.toString());
|
||||||
|
|
|
@ -3,6 +3,10 @@ const dev_version = "development";
|
||||||
class EnvironmentConfig {
|
class EnvironmentConfig {
|
||||||
static const BUILD_VER = String.fromEnvironment('BUILD_VER', defaultValue: dev_version);
|
static const BUILD_VER = String.fromEnvironment('BUILD_VER', defaultValue: dev_version);
|
||||||
static const BUILD_DATE = String.fromEnvironment('BUILD_DATE', defaultValue: "now");
|
static const BUILD_DATE = String.fromEnvironment('BUILD_DATE', defaultValue: "now");
|
||||||
|
// set by the automated testing harness to circumvent untestable behaviours
|
||||||
|
// for example:
|
||||||
|
// * MessageRow: always show "reply" button (because can't test onHover or swipe)
|
||||||
|
static const TEST_MODE = String.fromEnvironment('TEST_MODE', defaultValue: "false") == "true";
|
||||||
|
|
||||||
static void debugLog(String log) {
|
static void debugLog(String log) {
|
||||||
if (EnvironmentConfig.BUILD_VER == dev_version) {
|
if (EnvironmentConfig.BUILD_VER == dev_version) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:cwtch/config.dart';
|
||||||
import 'package:cwtch/cwtch_icons_icons.dart';
|
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||||
import 'package:cwtch/models/appstate.dart';
|
import 'package:cwtch/models/appstate.dart';
|
||||||
import 'package:cwtch/models/contact.dart';
|
import 'package:cwtch/models/contact.dart';
|
||||||
|
@ -80,7 +81,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
||||||
Widget wdgIcons = Platform.isAndroid
|
Widget wdgIcons = Platform.isAndroid
|
||||||
? SizedBox.shrink()
|
? SizedBox.shrink()
|
||||||
: Visibility(
|
: Visibility(
|
||||||
visible: true,//Provider.of<AppState>(context).hoveredIndex == Provider.of<MessageMetadata>(context).messageID,
|
visible: EnvironmentConfig.TEST_MODE || Provider.of<AppState>(context).hoveredIndex == Provider.of<MessageMetadata>(context).messageID,
|
||||||
maintainSize: true,
|
maintainSize: true,
|
||||||
maintainAnimation: true,
|
maintainAnimation: true,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
paths=$(find . -wholename "./integration_test/features/*/$1*.feature" | sort | sed -z "s/\\n/','/g;s/,'$//;s/^/'/")
|
paths=$(find . -wholename "./integration_test/features/05*/$1*.feature" | sort | sed -z "s/\\n/','/g;s/,'$//;s/^/'/")
|
||||||
sed "s|featurePaths: REPLACED_BY_SCRIPT|featurePaths: <String>[$paths]|" integration_test/gherkin_suite_test.editable.dart > integration_test/gherkin_suite_test.dart
|
sed "s|featurePaths: REPLACED_BY_SCRIPT|featurePaths: <String>[$paths]|" integration_test/gherkin_suite_test.editable.dart > integration_test/gherkin_suite_test.dart
|
||||||
flutter pub run build_runner clean
|
flutter pub run build_runner clean
|
||||||
flutter pub run build_runner build --delete-conflicting-outputs
|
flutter pub run build_runner build --delete-conflicting-outputs
|
||||||
LD_LIBRARY_PATH=./linux/ CWTCH_HOME=./integration_test/env/temp/ flutter drive --driver=test_driver/integration_test_driver.dart --target=integration_test/gherkin_suite_test.dart
|
pkill tor
|
||||||
|
LD_LIBRARY_PATH=/home/erinn/Android/Goprojects/libcwtch-go/ CWTCH_HOME=./integration_test/env/temp/ flutter drive --dart-define TEST_MODE=true --driver=test_driver/integration_test_driver.dart --target=integration_test/gherkin_suite_test.dart
|
||||||
node index2.js
|
node index2.js
|
||||||
xdg-open integration_test/gherkin/reports/cucumber_report.html
|
xdg-open integration_test/gherkin/reports/cucumber_report.html
|
||||||
|
|
Loading…
Reference in New Issue