Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified ad blocking test flow #5731

Merged
merged 1 commit into from
Feb 2, 2024
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
6 changes: 6 additions & 0 deletions ios/MullvadVPNUITests/Pages/Page.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ class Page {
app.typeText(text)
return self
}

/// Fast swipe down action to dismiss a modal view. Will swipe on the middle of the screen.
@discardableResult func swipeDownToDismissModal() -> Self {
app.swipeDown(velocity: .fast)
return self
}
}
21 changes: 10 additions & 11 deletions ios/MullvadVPNUITests/RelayTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ import XCTest

class RelayTests: LoggedInWithTimeUITestCase {
func testAdBlockingViaDNS() throws {
HeaderBar(app)
.tapSettingsButton()

SettingsPage(app)
.tapVPNSettingsCell()
.tapDNSSettingsCell()
.tapDNSContentBlockingHeaderExpandButton()
.tapBlockAdsSwitch()
.swipeDownToDismissModal()

TunnelControlPage(app)
.tapSelectLocationButton()

Expand All @@ -23,17 +33,6 @@ class RelayTests: LoggedInWithTimeUITestCase {

TunnelControlPage(app) // Make sure we're taken back to tunnel control page again

verifyCanReachAdServingDomain()

HeaderBar(app)
.tapSettingsButton()

SettingsPage(app)
.tapVPNSettingsCell()
.tapDNSSettingsCell()
.tapDNSContentBlockingHeaderExpandButton()
.tapBlockAdsSwitch()

verifyCannotReachAdServingDomain()
}

Expand Down
Loading