Skip to content

Commit c41a76a

Browse files
Restoring state for blocker in teardown
1 parent 0b82bf6 commit c41a76a

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

ios/MullvadVPNUITests/RelayTests.swift

+18-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ class RelayTests: LoggedInWithTimeUITestCase {
2727
}
2828

2929
func testAdBlockingViaDNS() throws {
30+
// Undo enabling block ads in teardown
31+
addTeardownBlock {
32+
HeaderBar(self.app)
33+
.tapSettingsButton()
34+
35+
SettingsPage(self.app)
36+
.tapVPNSettingsCell()
37+
38+
VPNSettingsPage(self.app)
39+
.tapDNSSettingsCell()
40+
41+
DNSSettingsPage(self.app)
42+
.tapDNSContentBlockersHeaderExpandButton()
43+
.tapBlockAdsSwitch()
44+
}
45+
3046
HeaderBar(app)
3147
.tapSettingsButton()
3248

@@ -44,7 +60,7 @@ class RelayTests: LoggedInWithTimeUITestCase {
4460
TunnelControlPage(app)
4561
.tapSecureConnectionButton()
4662

47-
allowAddVPNConfigurations() // Allow adding VPN configurations iOS permission
63+
allowAddVPNConfigurationsIfAsked() // Allow adding VPN configurations iOS permission
4864

4965
TunnelControlPage(app)
5066
.waitForSecureConnectionLabel()
@@ -205,7 +221,7 @@ class RelayTests: LoggedInWithTimeUITestCase {
205221
TunnelControlPage(app)
206222
.tapSecureConnectionButton()
207223

208-
allowAddVPNConfigurations()
224+
allowAddVPNConfigurationsIfAsked()
209225

210226
HeaderBar(app)
211227
.tapSettingsButton()

0 commit comments

Comments
 (0)