summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPN
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2024-01-24 14:23:15 +0100
committerBug Magnet <marco.nikic@mullvad.net>2024-01-24 14:23:15 +0100
commitf4ec9f8a2b1e1390b8580eaaeee6d9cb283909fa (patch)
treeabfb4bf071f45c475d9937d5b8956a4836fab65b /ios/MullvadVPN
parentf4d2f443d792cf4b871d871a20a509f80c9f0434 (diff)
parent3a5ba4a0d80810567a02c43c442913505759757d (diff)
downloadmullvadvpn-f4ec9f8a2b1e1390b8580eaaeee6d9cb283909fa.tar.xz
mullvadvpn-f4ec9f8a2b1e1390b8580eaaeee6d9cb283909fa.zip
Merge branch 'ad-blocking-via-dns-ios-440'
Diffstat (limited to 'ios/MullvadVPN')
-rw-r--r--ios/MullvadVPN/Classes/AccessbilityIdentifier.swift10
-rw-r--r--ios/MullvadVPN/View controllers/Preferences/CustomDNSDataSource.swift1
-rw-r--r--ios/MullvadVPN/View controllers/SelectLocation/SelectLocationViewController.swift2
-rw-r--r--ios/MullvadVPN/View controllers/Settings/SettingsViewController.swift1
-rw-r--r--ios/MullvadVPN/View controllers/Tunnel/ConnectionPanelView.swift5
-rw-r--r--ios/MullvadVPN/View controllers/Tunnel/TunnelControlView.swift1
-rw-r--r--ios/MullvadVPN/Views/CustomSwitch.swift2
7 files changed, 22 insertions, 0 deletions
diff --git a/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift b/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift
index 7cb2e0e607..dd0fe98a35 100644
--- a/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift
+++ b/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift
@@ -15,6 +15,7 @@ public enum AccessibilityIdentifier: String {
case alertOkButton
case applyButton
case cancelButton
+ case connectionPanelButton
case collapseButton
case deleteButton
case disconnectButton
@@ -47,9 +48,18 @@ public enum AccessibilityIdentifier: String {
case alertTitle
case loginView
case termsOfServiceView
+ case selectLocationView
+ case selectLocationTableView
+ case settingsTableView
+ case tunnelControlView
// Other UI elements
+ case connectionPanelInAddressRow
+ case connectionPanelOutAddressRow
+ case customSwitch
+ case dnsContentBlockersHeaderView
case loginTextField
+ case selectLocationSearchTextField
// DNS settings
case dnsSettings
diff --git a/ios/MullvadVPN/View controllers/Preferences/CustomDNSDataSource.swift b/ios/MullvadVPN/View controllers/Preferences/CustomDNSDataSource.swift
index ea7217b1ea..afed9c5845 100644
--- a/ios/MullvadVPN/View controllers/Preferences/CustomDNSDataSource.swift
+++ b/ios/MullvadVPN/View controllers/Preferences/CustomDNSDataSource.swift
@@ -589,6 +589,7 @@ final class CustomDNSDataSource: UITableViewDiffableDataSource<
header.titleLabel.text = title
header.accessibilityCustomActionName = title
+ header.accessibilityIdentifier = .dnsContentBlockersHeaderView
header.infoButtonHandler = { [weak self] in
self?.delegate?.showInfo(for: .contentBlockers)
diff --git a/ios/MullvadVPN/View controllers/SelectLocation/SelectLocationViewController.swift b/ios/MullvadVPN/View controllers/SelectLocation/SelectLocationViewController.swift
index b19fef0df6..47e9a4309f 100644
--- a/ios/MullvadVPN/View controllers/SelectLocation/SelectLocationViewController.swift
+++ b/ios/MullvadVPN/View controllers/SelectLocation/SelectLocationViewController.swift
@@ -133,6 +133,7 @@ final class SelectLocationViewController: UIViewController {
tableView.estimatedRowHeight = 53
tableView.indicatorStyle = .white
tableView.keyboardDismissMode = .onDrag
+ tableView.accessibilityIdentifier = .selectLocationTableView
}
private func setUpTopContent() {
@@ -167,6 +168,7 @@ final class SelectLocationViewController: UIViewController {
value: "Search for...",
comment: ""
)
+ searchBar.searchTextField.accessibilityIdentifier = .selectLocationSearchTextField
UITextField.SearchTextFieldAppearance.inactive.apply(to: searchBar)
}
diff --git a/ios/MullvadVPN/View controllers/Settings/SettingsViewController.swift b/ios/MullvadVPN/View controllers/Settings/SettingsViewController.swift
index 7ac7167840..13f6f6d1e2 100644
--- a/ios/MullvadVPN/View controllers/Settings/SettingsViewController.swift
+++ b/ios/MullvadVPN/View controllers/Settings/SettingsViewController.swift
@@ -54,6 +54,7 @@ class SettingsViewController: UITableViewController, SettingsDataSourceDelegate
})
)
+ tableView.accessibilityIdentifier = .settingsTableView
tableView.backgroundColor = .secondaryColor
tableView.separatorColor = .secondaryColor
tableView.rowHeight = UITableView.automaticDimension
diff --git a/ios/MullvadVPN/View controllers/Tunnel/ConnectionPanelView.swift b/ios/MullvadVPN/View controllers/Tunnel/ConnectionPanelView.swift
index 7908906d3b..2e975c9c38 100644
--- a/ios/MullvadVPN/View controllers/Tunnel/ConnectionPanelView.swift
+++ b/ios/MullvadVPN/View controllers/Tunnel/ConnectionPanelView.swift
@@ -75,6 +75,9 @@ class ConnectionPanelView: UIView {
inAddressRow.translatesAutoresizingMaskIntoConstraints = false
outAddressRow.translatesAutoresizingMaskIntoConstraints = false
+ inAddressRow.accessibilityIdentifier = .connectionPanelInAddressRow
+ outAddressRow.accessibilityIdentifier = .connectionPanelOutAddressRow
+
inAddressRow.title = NSLocalizedString(
"IN_ADDRESS_LABEL",
tableName: "ConnectionPanel",
@@ -285,6 +288,8 @@ class ConnectionPanelCollapseButton: CustomButton {
imageAlignment = .trailing
inlineImageSpacing = 0
+ accessibilityIdentifier = .connectionPanelButton
+
updateButtonImage()
}
diff --git a/ios/MullvadVPN/View controllers/Tunnel/TunnelControlView.swift b/ios/MullvadVPN/View controllers/Tunnel/TunnelControlView.swift
index 75d2b012c8..e1f393b1b7 100644
--- a/ios/MullvadVPN/View controllers/Tunnel/TunnelControlView.swift
+++ b/ios/MullvadVPN/View controllers/Tunnel/TunnelControlView.swift
@@ -118,6 +118,7 @@ final class TunnelControlView: UIView {
backgroundColor = .clear
directionalLayoutMargins = UIMetrics.contentLayoutMargins
accessibilityContainerType = .semanticGroup
+ accessibilityIdentifier = .tunnelControlView
addSubviews()
addButtonHandlers()
diff --git a/ios/MullvadVPN/Views/CustomSwitch.swift b/ios/MullvadVPN/Views/CustomSwitch.swift
index 4596cb56b6..a696d52142 100644
--- a/ios/MullvadVPN/Views/CustomSwitch.swift
+++ b/ios/MullvadVPN/Views/CustomSwitch.swift
@@ -31,6 +31,8 @@ class CustomSwitch: UISwitch {
onTintColor = .clear
overrideUserInterfaceStyle = .light
+ accessibilityIdentifier = .customSwitch
+
updateThumbColor(isOn: isOn, animated: false)
addTarget(self, action: #selector(valueChanged(_:)), for: .valueChanged)