fastercwtch #351
|
@ -1,4 +0,0 @@
|
|||
@env:aliceandbob1
|
||||
Feature: Streamer mode setting hides onions
|
||||
Scenario: Turning on streamer mode
|
||||
Given
|
|
@ -1,3 +1,4 @@
|
|||
@env:persist
|
||||
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
|
||||
|
@ -18,14 +19,18 @@ Feature: Basic Profile Management
|
|||
Then I tap the "passwordCheckBox" widget
|
||||
And I expect the text 'New Password' to be absent
|
||||
And I take a screenshot
|
||||
Then I fill the "displayNameFormElement" field with "Alice (<h1>hello</h1>)"
|
||||
Then I fill the "displayNameFormElement" field with "Alice (Unencrypted)"
|
||||
Then I tap the "button" widget with label "Add new profile"
|
||||
And I expect a "ProfileRow" widget with text "Alice (<h1>hello</h1>)"
|
||||
And I expect a "ProfileRow" widget with text "Alice (Unencrypted)"
|
||||
And I take a screenshot
|
||||
Then I tap the "ProfileRow" widget with label "Alice (<h1>hello</h1>)"
|
||||
And I expect the text 'Alice (<h1>hello</h1>) » Conversations' to be present
|
||||
Then I tap the "ProfileRow" widget with label "Alice (Unencrypted)"
|
||||
And I expect the text "Alice (Unencrypted) » Conversations" to be present
|
||||
And I take a screenshot
|
||||
|
||||
Scenario: Load Unencrypted Profile
|
||||
Given I wait until the widget with type 'ProfileMgrView' is present
|
||||
Then I expect a "ProfileRow" widget with text "Alice (Unencrypted)"
|
||||
|
||||
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"
|
||||
|
@ -42,3 +47,44 @@ Feature: Basic Profile Management
|
|||
Then I tap the "ProfileRow" widget with label "Alice (Encrypted)"
|
||||
And I expect the text 'Alice (Encrypted) » Conversations' to be present
|
||||
And I take a screenshot
|
||||
|
||||
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."
|
||||
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"
|
||||
Then I expect a "ProfileRow" widget with text "Alice (Encrypted)"
|
||||
|
||||
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."
|
||||
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"
|
||||
Then I expect a "ProfileRow" widget with text "Alice (Encrypted)"
|
||||
When I tap the "IconButton" widget with tooltip "Edit Profile Alice (Encrypted)"
|
||||
Then I expect the text 'Display Name' to be present
|
||||
Then I fill the "displayNameFormElement" field with "Carol (Encrypted)"
|
||||
And I tap the "button" widget with label "Save Profile"
|
||||
And I wait until the widget with type 'ProfileMgrView' is present
|
||||
Then I expect a "ProfileRow" widget with text "Carol (Encrypted)"
|
||||
|
||||
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."
|
||||
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"
|
||||
Then I expect a "ProfileRow" widget with text "Carol (Encrypted)"
|
||||
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
|
||||
When I tap the button that contains the text "Delete"
|
||||
Then I expect the text "Really Delete Profile" to be present
|
||||
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
|
||||
|
|
|
@ -38,7 +38,9 @@ void main() {
|
|||
// overrides
|
||||
TapWidgetWithType(),
|
||||
TapWidgetWithLabel(),
|
||||
TapWidgetWithTooltip(),
|
||||
ExpectWidgetWithText(),
|
||||
AbsentWidgetWithText(),
|
||||
WaitUntilTypeExists(),
|
||||
ExpectTextToBePresent(),
|
||||
ExpectWidgetWithTextWithin(),
|
||||
|
|
|
@ -37,6 +37,22 @@ StepDefinitionGeneric TapWidgetWithLabel() {
|
|||
firstMatchOnly: true);
|
||||
//Text wdg = await context.world.appDriver.widget(finder, ExpectedWidgetResultType.first);
|
||||
//print(wdg.debugDescribeChildren().first.)
|
||||
await context.world.appDriver.scrollIntoView(finder);
|
||||
await context.world.appDriver.tap(finder);
|
||||
await context.world.appDriver.waitForAppToSettle();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
StepDefinitionGeneric TapWidgetWithTooltip() {
|
||||
return given2<String, String, FlutterWorld>(
|
||||
RegExp(r'I tap the {string} widget with tooltip {string}$'),
|
||||
(ofType, text, context) async {
|
||||
final finder = context.world.appDriver.findByDescendant(
|
||||
context.world.appDriver.findBy(widgetTypeByName(ofType), FindType.type),
|
||||
context.world.appDriver.findBy(text, FindType.tooltip),
|
||||
firstMatchOnly: true);
|
||||
await context.world.appDriver.scrollIntoView(finder);
|
||||
await context.world.appDriver.tap(finder);
|
||||
await context.world.appDriver.waitForAppToSettle();
|
||||
},
|
||||
|
@ -59,6 +75,23 @@ StepDefinitionGeneric ExpectWidgetWithText() {
|
|||
);
|
||||
}
|
||||
|
||||
StepDefinitionGeneric AbsentWidgetWithText() {
|
||||
return given2<String, String, FlutterWorld>(
|
||||
RegExp(r'I expect a {string} widget with text {string} to be absent$'),
|
||||
(ofType, text, context) async {
|
||||
final finder = context.world.appDriver.findByDescendant(
|
||||
context.world.appDriver.findBy(widgetTypeByName(ofType), FindType.type),
|
||||
context.world.appDriver.findBy(text, FindType.text),
|
||||
firstMatchOnly: true);
|
||||
//Text wdg = await context.world.appDriver.widget(finder, ExpectedWidgetResultType.first);
|
||||
//print(wdg.debugDescribeChildren().first.)
|
||||
await context.world.appDriver.isAbsent(finder);
|
||||
await context.world.appDriver.waitForAppToSettle();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
StepDefinitionGeneric TapButtonWithText() {
|
||||
return given1<String, FlutterWorld>(
|
||||
RegExp(r'I tap the {string} (?:button|element|label|icon|field|text|widget)$'),
|
||||
|
@ -67,8 +100,7 @@ StepDefinitionGeneric TapButtonWithText() {
|
|||
context.world.appDriver.findBy(Flwtch, FindType.type),
|
||||
context.world.appDriver.findBy(input1, FindType.key),
|
||||
firstMatchOnly: true);
|
||||
//Text wdg = await context.world.appDriver.widget(finder, ExpectedWidgetResultType.first);
|
||||
//print(wdg.debugDescribeChildren().first.)
|
||||
await context.world.appDriver.scrollIntoView(finder);
|
||||
await context.world.appDriver.tap(finder);
|
||||
await context.world.appDriver.waitForAppToSettle();
|
||||
},
|
||||
|
@ -229,6 +261,8 @@ Type widgetTypeByName(String input1) {
|
|||
return TorIcon;
|
||||
case "button":
|
||||
return ElevatedButton;
|
||||
case "IconButton":
|
||||
return IconButton;
|
||||
case "ProfileRow":
|
||||
return ProfileRow;
|
||||
default:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"@@locale": "de",
|
||||
"@@last_modified": "2022-01-18T00:38:14+01:00",
|
||||
"@@last_modified": "2022-01-28T19:57:41+01:00",
|
||||
"torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.",
|
||||
"torSettingsEnableCache": "Cache Tor Consensus",
|
||||
"labelTorNetwork": "Tor Network",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"@@locale": "en",
|
||||
"@@last_modified": "2022-01-18T00:38:14+01:00",
|
||||
"@@last_modified": "2022-01-28T19:57:41+01:00",
|
||||
"editProfile": "Edit Profile",
|
||||
"torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.",
|
||||
"torSettingsEnableCache": "Cache Tor Consensus",
|
||||
"labelTorNetwork": "Tor Network",
|
||||
|
@ -239,7 +240,6 @@
|
|||
"radioNoPassword": "Unencrypted (No password)",
|
||||
"radioUsePassword": "Password",
|
||||
"copiedToClipboardNotification": "Copied to Clipboard",
|
||||
"editProfile": "Edit Profille",
|
||||
"newProfile": "New Profile",
|
||||
"defaultProfileName": "Alice",
|
||||
"profileName": "Display name",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"@@locale": "es",
|
||||
"@@last_modified": "2022-01-18T00:38:14+01:00",
|
||||
"@@last_modified": "2022-01-28T19:57:41+01:00",
|
||||
"torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.",
|
||||
"torSettingsEnableCache": "Cache Tor Consensus",
|
||||
"labelTorNetwork": "Tor Network",
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
{
|
||||
"@@locale": "fr",
|
||||
"@@last_modified": "2022-01-18T00:38:14+01:00",
|
||||
"torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.",
|
||||
"torSettingsEnableCache": "Cache Tor Consensus",
|
||||
"labelTorNetwork": "Tor Network",
|
||||
"descriptionACNCircuitInfo": "In depth information about the path that the anonymous communication network is using to connect to this conversation.",
|
||||
"labelACNCircuitInfo": "ACN Circuit Info",
|
||||
"fileSharingSettingsDownloadFolderTooltip": "Browse to select a different default folder for downloaded files.",
|
||||
"fileSharingSettingsDownloadFolderDescription": "When files are downloaded automatically (e.g. image files, when image previews are enabled) a default location to download the files to is needed.",
|
||||
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
||||
"torSettingsCustomControlPort": "Custom Control Port",
|
||||
"torSettingsCustomSocksPortDescription": "Use a custom port for data connections to the Tor proxy",
|
||||
"torSettingsCustomSocksPort": "Custom SOCKS Port",
|
||||
"torSettingsEnabledAdvancedDescription": "Use an existing Tor service on your system, or change the parameters of the Cwtch Tor Service",
|
||||
"torSettingsEnabledAdvanced": "Enable Advanced Tor Configuration",
|
||||
"@@last_modified": "2022-01-28T19:57:41+01:00",
|
||||
"editProfile": "Modifier le profil",
|
||||
"settingTheme": "Utilisez des thèmes clairs",
|
||||
"torSettingsUseCustomTorServiceConfiguration": "Utiliser une configuration personnalisée du service Tor (torrc)",
|
||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Remplacer la configuration par défaut de tor. Avertissement : Cela peut être dangereux. Ne l'activez que si vous savez ce que vous faites.",
|
||||
"torSettingsErrorSettingPort": "Le numéro de port doit être compris entre 1 et 65535.",
|
||||
"torSettingsEnableCache": "Cache du Consensus Tor",
|
||||
"torSettingsEnabledCacheDescription": "Mettre en cache le consensus Tor actuellement téléchargé pour le réutiliser la prochaine fois que Cwtch est ouvert. Cela permettra à Tor de démarrer plus rapidement. Lorsqu'il est désactivé, Cwtch purgera les données mises en cache au démarrage.",
|
||||
"torSettingsEnabledAdvancedDescription": "Utilisez un service Tor existant sur votre système ou modifiez les paramètres du service Tor de Cwtch.",
|
||||
"torSettingsEnabledAdvanced": "Activer la configuration avancée de Tor",
|
||||
"torSettingsCustomSocksPortDescription": "Utiliser un port personnalisé pour les connexions de données au proxy Tor",
|
||||
"torSettingsCustomSocksPort": "Port SOCKS personnalisé",
|
||||
"torSettingsCustomControlPortDescription": "Utiliser un port personnalisé pour contrôler les connexions au proxy Tor",
|
||||
"torSettingsCustomControlPort": "Port de contrôle personnalisé",
|
||||
"labelTorNetwork": "Réseau Tor",
|
||||
"labelACNCircuitInfo": "Informations sur le circuit ACN",
|
||||
"fileSharingSettingsDownloadFolderTooltip": "Parcourir pour sélectionner un autre dossier par défaut pour les fichiers téléchargés.",
|
||||
"fileSharingSettingsDownloadFolderDescription": "Lorsque les fichiers sont téléchargés automatiquement (par exemple, les fichiers image, lorsque les aperçus d'image sont activés), un emplacement par défaut pour télécharger les fichiers est nécessaire.",
|
||||
"descriptionACNCircuitInfo": "Informations détaillées sur le chemin que le réseau de communication anonyme utilise pour se connecter à cette conversation.",
|
||||
"msgConfirmSend": "Êtes-vous sûr de vouloir envoyer",
|
||||
"acceptGroupInviteLabel": "Voulez-vous accepter l'invitation au groupe de",
|
||||
"msgFileTooBig": "La taille du fichier ne peut pas dépasser 10 Go",
|
||||
|
@ -187,7 +189,6 @@
|
|||
"deleteConfirmLabel": "Tapez SUPPRIMER pour confirmer",
|
||||
"addNewProfileBtn": "Ajouter un nouveau profil",
|
||||
"enterProfilePassword": "Entrez un mot de passe pour consulter vos profils",
|
||||
"editProfile": "Modifier le profil",
|
||||
"radioUsePassword": "Mot de passe",
|
||||
"radioNoPassword": "Non chiffré (pas de mot de passe)",
|
||||
"saveProfileBtn": "Sauvegarder le profil",
|
||||
|
@ -205,7 +206,6 @@
|
|||
"localePt": "Portugais",
|
||||
"localeDe": "Allemand",
|
||||
"settingInterfaceZoom": "Niveau de zoom",
|
||||
"settingTheme": "Thème",
|
||||
"themeLight": "Clair",
|
||||
"themeDark": "Sombre",
|
||||
"experimentsEnabled": "Activer les expériences",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"@@locale": "it",
|
||||
"@@last_modified": "2022-01-18T00:38:14+01:00",
|
||||
"@@last_modified": "2022-01-28T19:57:41+01:00",
|
||||
"torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.",
|
||||
"torSettingsEnableCache": "Cache Tor Consensus",
|
||||
"labelTorNetwork": "Tor Network",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"@@locale": "pl",
|
||||
"@@last_modified": "2022-01-18T00:38:14+01:00",
|
||||
"@@last_modified": "2022-01-28T19:57:41+01:00",
|
||||
"torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.",
|
||||
"torSettingsEnableCache": "Cache Tor Consensus",
|
||||
"labelTorNetwork": "Tor Network",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"@@locale": "pt",
|
||||
"@@last_modified": "2022-01-18T00:38:14+01:00",
|
||||
"@@last_modified": "2022-01-28T19:57:41+01:00",
|
||||
"torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.",
|
||||
"torSettingsEnableCache": "Cache Tor Consensus",
|
||||
"labelTorNetwork": "Tor Network",
|
||||
|
@ -227,7 +227,7 @@
|
|||
"radioNoPassword": "Unencrypted (No password)",
|
||||
"radioUsePassword": "Password",
|
||||
"copiedToClipboardNotification": "Copiado",
|
||||
"editProfile": "Edit Profille",
|
||||
"editProfile": "Edit Profile",
|
||||
"newProfile": "New Profile",
|
||||
"defaultProfileName": "Alice",
|
||||
"profileName": "Display name",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"@@locale": "ru",
|
||||
"@@last_modified": "2022-01-18T00:38:14+01:00",
|
||||
"@@last_modified": "2022-01-28T19:57:41+01:00",
|
||||
"torSettingsEnabledCacheDescription": "Cache the current downloaded Tor consensus to reuse next time Cwtch is opened. This will allow Tor to start faster. When disabled, Cwtch will purge cached data on start up.",
|
||||
"torSettingsEnableCache": "Cache Tor Consensus",
|
||||
"labelTorNetwork": "Tor Network",
|
||||
|
|
|
@ -123,6 +123,7 @@ abstract class OpaqueThemeType {
|
|||
|
||||
ThemeData mkThemeData(Settings opaque) {
|
||||
return ThemeData(
|
||||
fontFamily: "OpenSans",
|
||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||
primarySwatch: Colors.red,
|
||||
primaryIconTheme: IconThemeData(
|
||||
|
@ -149,6 +150,7 @@ ThemeData mkThemeData(Settings opaque) {
|
|||
color: opaque.current().mainTextColor,
|
||||
),
|
||||
titleTextStyle: TextStyle(
|
||||
fontFamily: "OpenSans",
|
||||
color: opaque.current().mainTextColor,
|
||||
),
|
||||
actionsIconTheme: IconThemeData(
|
||||
|
@ -183,7 +185,7 @@ ThemeData mkThemeData(Settings opaque) {
|
|||
scrollbarTheme: ScrollbarThemeData(isAlwaysShown: false, thumbColor: MaterialStateProperty.all(opaque.current().scrollbarDefaultColor)),
|
||||
tabBarTheme: TabBarTheme(indicator: UnderlineTabIndicator(borderSide: BorderSide(color: opaque.current().defaultButtonActiveColor))),
|
||||
dialogTheme: DialogTheme(
|
||||
backgroundColor: opaque.current().backgroundPaneColor, titleTextStyle: TextStyle(color: opaque.current().mainTextColor), contentTextStyle: TextStyle(color: opaque.current().mainTextColor)),
|
||||
backgroundColor: opaque.current().backgroundPaneColor, titleTextStyle: TextStyle( fontFamily: "OpenSans", color: opaque.current().mainTextColor), contentTextStyle: TextStyle(color: opaque.current().mainTextColor, fontFamily: "OpenSans",)),
|
||||
textTheme: TextTheme(
|
||||
headline1: TextStyle(color: opaque.current().mainTextColor),
|
||||
headline2: TextStyle(color: opaque.current().mainTextColor),
|
||||
|
|
|
@ -186,13 +186,13 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
|
|||
autoFillHints: [AutofillHints.newPassword],
|
||||
validator: (value) {
|
||||
// Password field can be empty when just updating the profile, not on creation
|
||||
if (Provider.of<ProfileInfoState>(context).isEncrypted &&
|
||||
if (Provider.of<ProfileInfoState>(context, listen: false).isEncrypted &&
|
||||
Provider.of<ProfileInfoState>(context, listen: false).onion.isEmpty &&
|
||||
value.isEmpty &&
|
||||
usePassword) {
|
||||
return AppLocalizations.of(context)!.passwordErrorEmpty;
|
||||
}
|
||||
if (Provider.of<ErrorHandler>(context).deleteProfileError == true) {
|
||||
if (Provider.of<ErrorHandler>(context, listen: false).deleteProfileError == true) {
|
||||
return AppLocalizations.of(context)!.enterCurrentPasswordForDelete;
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -191,6 +191,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
|||
height: 20,
|
||||
),
|
||||
CwtchPasswordField(
|
||||
key: Key("unlockPasswordProfileElement"),
|
||||
autofocus: true,
|
||||
controller: ctrlrPassword,
|
||||
action: unlock,
|
||||
|
|
|
@ -95,6 +95,9 @@ flutter:
|
|||
- family: CwtchIcons
|
||||
fonts:
|
||||
- asset: assets/fonts/CwtchIcons.ttf
|
||||
- family: OpenSans
|
||||
fonts:
|
||||
- asset: assets/fonts/OpenSans-Regular.ttf
|
||||
|
||||
# To add custom fonts to your application, add a fonts section here,
|
||||
# in this "flutter" section. Each entry in this list should have a
|
||||
|
|
Loading…
Reference in New Issue