Compare commits

...

2 Commits

Author SHA1 Message Date
Sarah Jamie Lewis 11dfcd49d5 drone test
continuous-integration/drone/pr Build was killed Details
2023-02-22 09:56:52 -08:00
Sarah Jamie Lewis 4a74636fba Add Profile Management Tests to Pipeline
continuous-integration/drone/pr Build was killed Details
2023-02-16 14:53:32 -08:00
5 changed files with 29 additions and 13 deletions

View File

@ -67,8 +67,8 @@ steps:
path: /root/.pub-cache
commands:
- ./fetch-tor.sh
# Run 01_general and 02_global_settings features...
- ./run-tests-headless.sh "01_general|02_global_settings"
# Run 01_general, 02_global_settings, and 04_profile_mgmt features...
- ./run-tests-headless.sh "01_general|02_global_settings|04_profile_mgmt"
- name: test-build-android
image: openpriv/flutter-desktop:linux-fstable-3.7.1
@ -183,6 +183,7 @@ steps:
commands:
#- # force by pass of ssh host key check, less secure
#- ssh-keyscan -H git.openprivacy.ca >> ..\known_hosts
- Invoke-WebRequest -Uri http://git.openprivacy.ca:8000
- echo $Env:buildbot_key_b64 > ..\id_rsa.b64
- certutil -decode ..\id_rsa.b64 ..\id_rsa
- git init
@ -298,6 +299,7 @@ steps:
buildbot_key_b64:
from_secret: buildbot_key_b64
commands:
- curl http://git.openprivacy.ca:8000
- mkdir ~/.ssh
- echo $buildbot_key_b64 > ~/.ssh/id_rsa.b64
- base64 -d ~/.ssh/id_rsa.b64 > ~/.ssh/id_rsa

View File

@ -2,8 +2,9 @@
Feature: Basic Profile Management
Scenario: Error on Creating a Profile without a Display Name
Given I wait until the widget with type 'ProfileMgrView' is present
And I tap the button with tooltip "Add new profile"
Then I expect the text 'Display Name' to be present
And I tap a button with tooltip "Add new profile"
And I tap the "addNewProfileActual" button
And I wait until the text 'Display Name' is present
And I expect the text 'New Password' to be present
And I expect the text 'Please enter a display name' to be absent
Then I tap the "button" widget with label "Add new profile"
@ -12,12 +13,13 @@ Feature: Basic Profile Management
Scenario: Create Unencrypted Profile
Given I wait until the widget with type 'ProfileMgrView' is present
And I tap the button with tooltip "Add new profile"
Then I expect the text 'Display Name' to be present
And I tap a button with tooltip "Add new profile"
And I tap the "addNewProfileActual" button
And I wait until the text 'Display Name' is present
And I expect the text 'New Password' to be present
And I take a screenshot
Then I tap the "passwordCheckBox" widget
And I expect the text 'New Password' to be absent
And I expect the text 'New Password' to be absent within 2 seconds
And I take a screenshot
Then I fill the "displayNameFormElement" field with "Alice (Unencrypted)"
Then I tap the "button" widget with label "Add new profile"
@ -33,8 +35,9 @@ Feature: Basic Profile Management
Scenario: Create Encrypted Profile
Given I wait until the widget with type 'ProfileMgrView' is present
And I tap the button with tooltip "Add new profile"
Then I expect the text 'Display Name' to be present
And I tap a button with tooltip "Add new profile"
And I tap the "addNewProfileActual" button
And I wait until the text 'Display Name' is present
And I expect the text 'New Password' to be present
And I take a screenshot
Then I fill the "displayNameFormElement" field with "Alice (Encrypted)"
@ -51,7 +54,7 @@ Feature: Basic Profile Management
Scenario: Load an Encrypted Profile by Unlocking it with a Password
Given I wait until the widget with type 'ProfileMgrView' is present
Then I expect the text 'Enter a password to view your profiles' to be absent
And I tap the button with tooltip "Unlock encrypted profiles by entering their password."
And I tap a button with tooltip "Unlock encrypted profiles by entering their password."
Then I expect the text 'Enter a password to view your profiles' to be present
When I fill the "unlockPasswordProfileElement" field with "password1"
And I tap the "button" widget with label "Unlock"
@ -60,7 +63,7 @@ Feature: Basic Profile Management
Scenario: Load an Encrypted Profile by Unlocking it with a Password and Change the Name
Given I wait until the widget with type 'ProfileMgrView' is present
Then I expect the text 'Enter a password to view your profiles' to be absent
And I tap the button with tooltip "Unlock encrypted profiles by entering their password."
And I tap a button with tooltip "Unlock encrypted profiles by entering their password."
Then I expect the text 'Enter a password to view your profiles' to be present
When I fill the "unlockPasswordProfileElement" field with "password1"
And I tap the "button" widget with label "Unlock"
@ -75,7 +78,7 @@ Feature: Basic Profile Management
Scenario: Delete an Encrypted Profile
Given I wait until the widget with type 'ProfileMgrView' is present
Then I expect the text 'Enter a password to view your profiles' to be absent
And I tap the button with tooltip "Unlock encrypted profiles by entering their password."
And I tap a button with tooltip "Unlock encrypted profiles by entering their password."
Then I expect the text 'Enter a password to view your profiles' to be present
When I fill the "unlockPasswordProfileElement" field with "password1"
And I tap the "button" widget with label "Unlock"
@ -83,8 +86,9 @@ Feature: Basic Profile Management
And I take a screenshot
When I tap the "IconButton" widget with tooltip "Edit Profile Carol (Encrypted)"
Then I expect the text 'Display Name' to be present
Then I fill the "currentPasswordFormElement" field with "password1"
When I tap the button that contains the text "Delete"
Then I expect the text "Really Delete Profile" to be present
Then I wait for 2 seconds
When I tap the "button" widget with label "Really Delete Profile"
And I wait until the widget with type 'ProfileMgrView' is present
Then I expect a "ProfileRow" widget with text "Carol (Encrypted)" to be absent

View File

@ -52,6 +52,7 @@ void main() async {
// text
TorVersionPresent(),
TooltipTap(),
TooltipTapAny(),
// files
FolderExists(),
FileExists(),

View File

@ -11,6 +11,14 @@ StepDefinitionGeneric TooltipTap() {
});
}
StepDefinitionGeneric TooltipTapAny() {
return given1<String, FlutterWorld>(RegExp(r'I tap a button with tooltip {string}'), (input1, context) async {
final finder = context.world.appDriver.findBy(input1, FindType.tooltip).first;
await context.world.appDriver.tap(finder);
await context.world.appDriver.waitForAppToSettle();
});
}
StepDefinitionGeneric TorVersionPresent() {
return given<FlutterWorld>(
RegExp(r'I expect the Tor version to be present$'),

View File

@ -226,6 +226,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
shape: RoundedRectangleBorder(borderRadius: BorderRadius.horizontal(left: Radius.circular(180), right: Radius.circular(180))),
),
child: Text(
key:Key("addNewProfileActual"),
AppLocalizations.of(context)!.addProfileTitle,
semanticsLabel: AppLocalizations.of(context)!.addProfileTitle,
style: TextStyle(fontWeight: FontWeight.bold),