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("| --- | --- |");
|
||||
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")
|
||||
..writeln("| pattern |")
|
||||
..writeln("| --- |");
|
||||
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");
|
||||
f.writeAsString(sb.toString());
|
||||
|
|
|
@ -3,6 +3,10 @@ const dev_version = "development";
|
|||
class EnvironmentConfig {
|
||||
static const BUILD_VER = String.fromEnvironment('BUILD_VER', defaultValue: dev_version);
|
||||
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) {
|
||||
if (EnvironmentConfig.BUILD_VER == dev_version) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:cwtch/config.dart';
|
||||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:cwtch/models/appstate.dart';
|
||||
import 'package:cwtch/models/contact.dart';
|
||||
|
@ -80,7 +81,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
|||
Widget wdgIcons = Platform.isAndroid
|
||||
? SizedBox.shrink()
|
||||
: 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,
|
||||
maintainAnimation: true,
|
||||
maintainState: true,
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#!/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
|
||||
flutter pub run build_runner clean
|
||||
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
|
||||
xdg-open integration_test/gherkin/reports/cucumber_report.html
|
||||
|
|
Loading…
Reference in New Issue