Fixup integration tests
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
e416638e65
commit
c3cd8d5d66
|
@ -1,12 +1,13 @@
|
||||||
@env:clean
|
@env:clean
|
||||||
Feature: Splash screen displays and then closes
|
Feature: Splash screen displays and then closes
|
||||||
Scenario: splash screen appears
|
Scenario: splash screen appears
|
||||||
Then I expect the widget 'SplashView' to be present within 10 seconds
|
|
||||||
Then I expect the widget 'ProfileManagerView' to be present within 10 seconds
|
Then I expect the widget 'ProfileManagerView' to be present within 10 seconds
|
||||||
# first-run of cwtch creates expected files and folders
|
# first-run of cwtch creates expected files and folders
|
||||||
|
|
||||||
Then I expect the folder 'integration_test/env/temp' to exist
|
Then I expect the folder 'integration_test/env/temp' to exist
|
||||||
And I expect the folder 'integration_test/env/temp/dev' to exist
|
And I expect the folder 'integration_test/env/temp/dev' to exist
|
||||||
And I expect the file 'integration_test/env/temp/dev/SALT' to exist
|
And I expect the file 'integration_test/env/temp/dev/SALT' to exist
|
||||||
|
Then I wait for the file 'integration_test/env/temp/dev/ui.globals' to exist
|
||||||
And I expect the file 'integration_test/env/temp/dev/ui.globals' to exist
|
And I expect the file 'integration_test/env/temp/dev/ui.globals' to exist
|
||||||
And I expect the folder 'integration_test/env/temp/dev/tor' to exist
|
And I expect the folder 'integration_test/env/temp/dev/tor' to exist
|
||||||
And I expect the file 'integration_test/env/temp/dev/tor/torrc' to exist
|
And I expect the file 'integration_test/env/temp/dev/tor/torrc' to exist
|
|
@ -32,6 +32,9 @@ Feature: Basic Profile Management
|
||||||
Scenario: Load Unencrypted Profile
|
Scenario: Load Unencrypted Profile
|
||||||
Given I wait until the widget with type 'ProfileMgrView' is present
|
Given I wait until the widget with type 'ProfileMgrView' is present
|
||||||
Then I expect a "ProfileRow" widget with text "Alice (Unencrypted)"
|
Then I expect a "ProfileRow" widget with text "Alice (Unencrypted)"
|
||||||
|
# This test is too short...if the test finishes before flutter has finished initializing then
|
||||||
|
# the framework gets very confused...
|
||||||
|
And I wait for 2 seconds
|
||||||
|
|
||||||
Scenario: Create Encrypted Profile
|
Scenario: Create Encrypted Profile
|
||||||
Given I wait until the widget with type 'ProfileMgrView' is present
|
Given I wait until the widget with type 'ProfileMgrView' is present
|
||||||
|
|
|
@ -56,6 +56,7 @@ void main() async {
|
||||||
// files
|
// files
|
||||||
FolderExists(),
|
FolderExists(),
|
||||||
FileExists(),
|
FileExists(),
|
||||||
|
WaitFileExists(),
|
||||||
];
|
];
|
||||||
|
|
||||||
var sb = StringBuffer();
|
var sb = StringBuffer();
|
||||||
|
|
|
@ -19,3 +19,16 @@ StepDefinitionGeneric FileExists() {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StepDefinitionGeneric WaitFileExists() {
|
||||||
|
return then1<String, FlutterWorld>(
|
||||||
|
RegExp(r'I wait for the file {string} to exist'),
|
||||||
|
(input1, context) async {
|
||||||
|
await context.world.appDriver.waitUntil(
|
||||||
|
() async {
|
||||||
|
await context.world.appDriver.waitForAppToSettle();
|
||||||
|
return File(input1).existsSync();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@ StepDefinitionGeneric TorVersionPresent() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print('File is now closed.');
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Error: $e');
|
print('Error: $e');
|
||||||
}
|
}
|
||||||
|
@ -44,12 +43,14 @@ StepDefinitionGeneric TorVersionPresent() {
|
||||||
context.world.attach(versionString, "text/plain", "Then I expect the Tor version to be present");
|
context.world.attach(versionString, "text/plain", "Then I expect the Tor version to be present");
|
||||||
//context.reporter.message("test!!!", MessageLevel.info);
|
//context.reporter.message("test!!!", MessageLevel.info);
|
||||||
print("looking for version string $versionString");
|
print("looking for version string $versionString");
|
||||||
final finder = context.world.appDriver.findBy(
|
return await context.world.appDriver.waitUntil(() async {
|
||||||
versionString,
|
final finder = context.world.appDriver.findBy(
|
||||||
FindType.text,
|
versionString,
|
||||||
);
|
FindType.text,
|
||||||
final isP = await context.world.appDriver.isPresent(finder);
|
);
|
||||||
context.expect(isP, true);
|
final isP = await context.world.appDriver.isPresent(finder);
|
||||||
|
return isP;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,3 +19,4 @@ StepDefinitionGeneric TakeScreenshot() {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@ class FlwtchState extends State<Flwtch> with WindowListener {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
initState() {
|
initState() {
|
||||||
|
print("initState() started, setting up handlers");
|
||||||
globalSettings = Settings(Locale("en", ''), CwtchDark());
|
globalSettings = Settings(Locale("en", ''), CwtchDark());
|
||||||
globalErrorHandler = ErrorHandler();
|
globalErrorHandler = ErrorHandler();
|
||||||
globalTorStatus = TorStatus();
|
globalTorStatus = TorStatus();
|
||||||
|
|
|
@ -7,7 +7,7 @@ flutter pub run build_runner build --delete-conflicting-outputs
|
||||||
|
|
||||||
PATH=$PATH:$PWD/linux/Tor
|
PATH=$PATH:$PWD/linux/Tor
|
||||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$PWD/linux/":"$PWD/linux/Tor/"
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$PWD/linux/":"$PWD/linux/Tor/"
|
||||||
PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH CWTCH_HOME=$PWD/integration_test/env/temp/ flutter test -d linux --dart-define TEST_MODE=true integration_test/gherkin_suite_test.dart
|
PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH LOG_FILE=test.log CWTCH_HOME=$PWD/integration_test/env/temp/ flutter test -d linux --dart-define TEST_MODE=true integration_test/gherkin_suite_test.dart
|
||||||
#node index2.js
|
#node index2.js
|
||||||
#if [ "$HEADLESS" = "false" ]; then
|
#if [ "$HEADLESS" = "false" ]; then
|
||||||
# xdg-open integration_test/gherkin/reports/cucumber_report.html
|
# xdg-open integration_test/gherkin/reports/cucumber_report.html
|
||||||
|
|
Loading…
Reference in New Issue