Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration_test/actions/add_nodes_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ part of 'base_actions.dart';

class TestAddNodesActions extends CommonBaseActions {
TestAddNodesActions(super.tester);
}
}
6 changes: 3 additions & 3 deletions integration_test/actions/dashboard_home_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class TestDashboardHomeActions extends CommonBaseActions {

Finder speedTestGoButtonFinder() {
final speedTestFinder = speedTestWidgetFinder();

final goButtonFinder = find.descendant(
of: speedTestFinder,
matching: find.byKey(ValueKey('goBtn')),
Expand Down Expand Up @@ -525,12 +525,12 @@ class TestDashboardHomeActions extends CommonBaseActions {
final dateTimeWidget = tester.widget<AppText>(dateTimeFinder);
expect(dateTimeWidget.text, isNot('--'));
final downloadBandWidthFinder = speedTestDownloadBandWidthFinder();
final downloadBandWidthWidget = tester.widget<AppText>(downloadBandWidthFinder);
final downloadBandWidthWidget =
tester.widget<AppText>(downloadBandWidthFinder);
expect(downloadBandWidthWidget.text, isNot('-'));
final uploadBandWidthFinder = speedTestUploadBandWidthFinder();
final uploadBandWidthWidget = tester.widget<AppText>(uploadBandWidthFinder);
expect(uploadBandWidthWidget.text, isNot('-'));
speedTestTryAgainFinder();

}
}
2 changes: 1 addition & 1 deletion integration_test/actions/external_speed_test_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ part of 'base_actions.dart';

class TestExternalSpeedTestActions extends CommonBaseActions {
TestExternalSpeedTestActions(super.tester);
}
}
4 changes: 1 addition & 3 deletions integration_test/actions/incredible_wifi_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,7 @@ class TestIncredibleWifiActions extends CommonBaseActions {
final context = getContext();
final finder = find.descendant(
of: alertDialogFinder(),
matching: find.text(loc(context)
.disableBandWarning(radio.bandName)),
matching: find.text(loc(context).disableBandWarning(radio.bandName)),
);
expect(finder, findsOneWidget);
return finder;
Expand Down Expand Up @@ -1054,5 +1053,4 @@ class TestIncredibleWifiActions extends CommonBaseActions {
_ => WifiRadioBand.radio_24,
};
}

}
6 changes: 4 additions & 2 deletions integration_test/actions/instant_admin_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ class TestInstantAdminActions extends CommonBaseActions {
}

Finder singaporeTaiwanRussiaTimeZoneCardFinder() {
final textFinder = find.text(loc(getContext()).timezoneSingaporeTaiwanRussia);
final textFinder =
find.text(loc(getContext()).timezoneSingaporeTaiwanRussia);
final cardFinder = find
.ancestor(
of: textFinder,
Expand All @@ -131,7 +132,8 @@ class TestInstantAdminActions extends CommonBaseActions {
)
.first;
expect(textFinder, findsOneWidget);
final checkIconFinder = find.descendant(of: card, matching: find.byType(Icon));
final checkIconFinder =
find.descendant(of: card, matching: find.byType(Icon));
return checkIconFinder;
}

Expand Down
2 changes: 1 addition & 1 deletion integration_test/actions/instant_devices_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ part of 'base_actions.dart';

class TestInstantDevicesActions extends CommonBaseActions {
TestInstantDevicesActions(super.tester);
}
}
2 changes: 1 addition & 1 deletion integration_test/actions/instant_privacy_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ class TestInstantPrivacyActions extends CommonBaseActions {
final finder = turnOnButtonFinder();
await scrollAndTap(finder);
}
}
}
2 changes: 1 addition & 1 deletion integration_test/actions/instant_topology_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ part of 'base_actions.dart';

class TestInstantTopologyActions extends CommonBaseActions {
TestInstantTopologyActions(super.tester);
}
}
2 changes: 1 addition & 1 deletion integration_test/actions/instant_verify_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ part of 'base_actions.dart';

class TestInstantVerifyActions extends CommonBaseActions {
TestInstantVerifyActions(super.tester);
}
}
2 changes: 0 additions & 2 deletions integration_test/actions/local_login_actions.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


part of 'base_actions.dart';

class TestLocalLoginActions extends CommonBaseActions {
Expand Down
4 changes: 2 additions & 2 deletions integration_test/actions/pnp_setup_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class TestPnpSetupActions extends CommonBaseActions {
await tester.pumpFrames(app(), Duration(seconds: seconds));
}

Future<void> showPassword() async {
Future<void> showPassword() async {
final visibleFinder = visibilityFinder();
await tester.tap(visibleFinder);
await tester.pumpAndSettle();
Expand Down Expand Up @@ -86,4 +86,4 @@ class TestPnpSetupActions extends CommonBaseActions {
await tester.tap(switchFinder);
await tester.pumpFrames(app(), Duration(seconds: seconds));
}
}
}
3 changes: 1 addition & 2 deletions integration_test/actions/prepair_pnp_setup_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,4 @@ class TestPrepairPnpSetupActions extends CommonBaseActions {
await tester.tap(doneBtnFinder);
await tester.pumpFrames(app(), Duration(seconds: seconds));
}

}
}
2 changes: 1 addition & 1 deletion integration_test/actions/speed_test_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ class TestSpeedTestActions extends CommonBaseActions {
final textValue = textWidget.text;
expect(textValue, isNot('-'));
}
}
}
2 changes: 1 addition & 1 deletion integration_test/apps_and_gaming_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void main() {
await advancedSettingsActions.enterAppsAndGamingPage();
await appsGamingActions.tapPortForwardingTab();
await appsGamingActions.checkSavedItems();
});
});

testWidgets('Apps and Gaming - Port range forwarding operations',
(tester) async {
Expand Down
15 changes: 9 additions & 6 deletions integration_test/config/integration_test_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ class IntegrationTestConfig {
String.fromEnvironment('wifiBands', defaultValue: '2.4,5,guest');
static const String newWifiName =
String.fromEnvironment('newWifiName', defaultValue: 'TestNewWifiName');
static const String newWifiPassword =
String.fromEnvironment('newWifiPassword', defaultValue: 'TestNewWifiPassword@');
static const String newGuestWifiName =
String.fromEnvironment('newGuestWifiName', defaultValue: 'TestNewGuestWifiName');
static const String newGuestWifiPassword =
String.fromEnvironment('newGuestWifiPassword', defaultValue: 'TestNewGuestWifiPassword@');
static const String newWifiPassword = String.fromEnvironment(
'newWifiPassword',
defaultValue: 'TestNewWifiPassword@');
static const String newGuestWifiName = String.fromEnvironment(
'newGuestWifiName',
defaultValue: 'TestNewGuestWifiName');
static const String newGuestWifiPassword = String.fromEnvironment(
'newGuestWifiPassword',
defaultValue: 'TestNewGuestWifiPassword@');
}
14 changes: 9 additions & 5 deletions integration_test/dhcp_reservations_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ void main() {
BuildConfig.load();
});

Future<TestDHCPReservationActions> enterDHCPReservationPage(WidgetTester tester) async {
Future<TestDHCPReservationActions> enterDHCPReservationPage(
WidgetTester tester) async {
await tester.pumpFrames(app(), const Duration(seconds: 5));
final topbarActions = TestTopbarActions(tester);
await topbarActions.tapMenuButton();
Expand Down Expand Up @@ -55,19 +56,22 @@ void main() {
await actions.inputIPAddress('192.168.1.21');
await actions.inputDeviceName('TestDevice1');
await actions.tapAlertSaveButton();
await actions.verifyReservationInList('TestDevice1', '192.168.1.21', 'AA:BB:CC:DD:EE:01');
await actions.verifyReservationInList(
'TestDevice1', '192.168.1.21', 'AA:BB:CC:DD:EE:01');

// Edit reservation
await actions.tapEditReservation('TestDevice1');
await actions.inputDeviceName('TestDevice1Edit');
await actions.tapAlertUpdateButton();
await actions.verifyReservationInList('TestDevice1Edit', '192.168.1.21', 'AA:BB:CC:DD:EE:01');
await actions.verifyReservationInList(
'TestDevice1Edit', '192.168.1.21', 'AA:BB:CC:DD:EE:01');

// Save and check again
await actions.tapSaveButton();
await actions.tapBackButton();
await actions.tapDHCPReservationEnterance();
await actions.verifyReservationInList('TestDevice1Edit', '192.168.1.21', 'AA:BB:CC:DD:EE:01');
await actions.verifyReservationInList(
'TestDevice1Edit', '192.168.1.21', 'AA:BB:CC:DD:EE:01');
await actions.verifyHasOneReservation();
await actions.tapReservation('TestDevice1Edit');
await actions.verifyNoReservation();
Expand All @@ -83,4 +87,4 @@ void main() {
await actions.verifyIPAddressError();
});
});
}
}
2 changes: 1 addition & 1 deletion integration_test/extensions/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ extension WidgetTesterExt on WidgetTester {
String getText(Finder finder) {
return (widget(finder) as dynamic).controller?.text ?? '';
}
}
}
8 changes: 3 additions & 5 deletions integration_test/factory_reset_setup_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,13 @@ void main() {
// Night mode
await setup.tapNextButton();
await tester.pumpFrames(app(), const Duration(seconds: 60));
//
//
await setup.tapDoneButton();
// Done
await setup.tapDoneButton();

// Dashboard
final quickPanelFinder = find.byType(DashboardQuickPanel);
expect(quickPanelFinder, findsOneWidget);
final quickPanelFinder = find.byType(DashboardQuickPanel);
expect(quickPanelFinder, findsOneWidget);
});

}

8 changes: 3 additions & 5 deletions integration_test/incredible_wifi_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -384,17 +384,15 @@ void main() {
// Disable other wifi
if (wifiBands.contains('2.4')) {
final wifiActions =
TestIncredibleWifiActions(tester, wifiBand: '2.4');
TestIncredibleWifiActions(tester, wifiBand: '2.4');
await wifiActions.tapBandSwitch();
}
if (wifiBands.contains('5')) {
final wifiActions =
TestIncredibleWifiActions(tester, wifiBand: '5');
final wifiActions = TestIncredibleWifiActions(tester, wifiBand: '5');
await wifiActions.tapBandSwitch();
}
if (wifiBands.contains('6')) {
final wifiActions =
TestIncredibleWifiActions(tester, wifiBand: '6');
final wifiActions = TestIncredibleWifiActions(tester, wifiBand: '6');
await wifiActions.tapBandSwitch();
}
// Check the warning exist
Expand Down
15 changes: 10 additions & 5 deletions integration_test/local_network_settings_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void main() {
testWidgets('Local Network Settings - Log in ', (tester) async {
// Log in
await tester.pumpFrames(app(), const Duration(seconds: 5));

final login = TestLocalLoginActions(tester);
await login.inputPassword(IntegrationTestConfig.password);
expect(
Expand All @@ -52,7 +52,8 @@ void main() {
await login.tapLoginButton();
});

testWidgets('Local Network Settings - Valid and invalid host name', (tester) async {
testWidgets('Local Network Settings - Valid and invalid host name',
(tester) async {
final actions = await enterLocalNetworkSettings(tester);
await actions.tapHostNameTab();
// Invalid
Expand All @@ -71,7 +72,9 @@ void main() {
await actions.verifyHostName('TestHostName');
});

testWidgets('Local Network Settings - Valid and invalid IP address and subnet mask', (tester) async {
testWidgets(
'Local Network Settings - Valid and invalid IP address and subnet mask',
(tester) async {
final actions = await enterLocalNetworkSettings(tester);
await actions.tapLanIPAddressTab();
// Invalid IP
Expand All @@ -97,14 +100,16 @@ void main() {
await actions.verifySubnetMask('255.255.255.0');
});

testWidgets('Local Network Settings - Valid and invalid DHCP Server settings', (tester) async {
testWidgets(
'Local Network Settings - Valid and invalid DHCP Server settings',
(tester) async {
final actions = await enterLocalNetworkSettings(tester);
await actions.tapDHCPServerTab();
await actions.toggleDHCPServer(false);
await actions.verifyDHCPServerDisable();
await actions.toggleDHCPServer(true);
await actions.verifyDHCPServerEnable();
// Invalid
// Invalid
await actions.inputStartIPAddress('192.168.1.0');
await actions.verifyStartIPAddressNotInValidRange();
await actions.inputStartIPAddress('192.168.1.1');
Expand Down
1 change: 0 additions & 1 deletion integration_test/mixin/common_actions_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ mixin CommonActionsMixin on BaseActions {
expect(finder, findsOneWidget);
return tester.element(finder);
}

}
3 changes: 2 additions & 1 deletion lib/constants/url_links.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const officialWebHost = 'https://store.linksys.com';
const officialSupportHost = 'https://support.linksys.com';

const linkEULA = 'https://www.linksys.com/pages/end-user-license-agreement';
const linkTerms = 'https://www.linksys.com/pages/linksys-smart-wifi-terms-of-service';
const linkTerms =
'https://www.linksys.com/pages/linksys-smart-wifi-terms-of-service';
const linkPrivacy =
'https://www.linksys.com/blogs/support-article/linksys-privacy-policy';
const linkThirdParty = '$officialSupportHost/kb/article/943-en';
Expand Down
2 changes: 1 addition & 1 deletion lib/core/cache/cache_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ const String cacheFileName = "dataCache";
abstract class CacheManager {
Future<String?> get();
Future<void> set(String value);
}
}
3 changes: 2 additions & 1 deletion lib/core/cache/cache_manager_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ class FlutterCacheManager implements CacheManager {
Future<String?> get() => throw UnimplementedError('Unsupported Platform!');

@override
Future<void> set(String value) => throw UnimplementedError('Unsupported Platform!');
Future<void> set(String value) =>
throw UnimplementedError('Unsupported Platform!');
}
5 changes: 2 additions & 3 deletions lib/core/cache/linksys_cache_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class LinksysCacheManager {

Future<bool> loadCache({required String serialNumber}) async {
if (serialNumber != lastSerialNumber) {
logger.d("[CacheManager] SN changed. Starting to load cache");
logger.d("[CacheManager] SN changed. Starting to load cache");
final value = await cacheManager.get();
_cache = value ?? "";
if (_cache.isEmpty) {
Expand All @@ -71,8 +71,7 @@ class LinksysCacheManager {
}
_data = allCaches[serialNumber];
lastSerialNumber = serialNumber;
logger.d(
"[CacheManager] Load cache success for $serialNumber");
logger.d("[CacheManager] Load cache success for $serialNumber");
}
if (data.isEmpty) {
return false;
Expand Down
1 change: 0 additions & 1 deletion lib/core/cloud/linksys_cloud_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ class LinksysCloudRepository {
.then((response) => CloudLinkUpModel.fromJson(response.body));
}


Future<void> associateSmartDevice({
required String linksysToken,
required String serialNumber,
Expand Down
2 changes: 0 additions & 2 deletions lib/core/cloud/linksys_requests/cloud2_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import 'package:privacy_gui/constants/cloud_const.dart';
import 'package:privacy_gui/core/http/linksys_http_client.dart';

extension Cloud2Service on LinksysHttpClient {


Future<Response> associateSmartDevice({
required String linksysToken,
required String serialNumber,
Expand Down
3 changes: 2 additions & 1 deletion lib/core/cloud/linksys_requests/ping_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import 'package:privacy_gui/core/http/linksys_http_client.dart';

extension PingService on LinksysHttpClient {
Future<Response> testPingPng() {
final endpoint = '${combineUrl(kTestPingPng)}/?ts=${DateTime.now().millisecondsSinceEpoch}';
final endpoint =
'${combineUrl(kTestPingPng)}/?ts=${DateTime.now().millisecondsSinceEpoch}';
final header = defaultHeader
..addAll({
HttpHeaders.contentTypeHeader: 'image/png',
Expand Down
Loading