Skip to content

Commit

Permalink
Remove incorrect tests and reenable some of the non-flaky ones (#3653)
Browse files Browse the repository at this point in the history
<!--
Note: This checklist is a reminder of our shared engineering
expectations. Feel free to change it, although assigning a GitHub
reviewer and the items in bold are required.

⚠️ If you're an external contributor, please file an issue first before
working on a PR, as we can't guarantee that we will accept your changes
if they haven't been discussed ahead of time. Thanks!
-->

Task/Issue URL:
https://app.asana.com/0/856498667320406/1208838718874817/f
- https://app.asana.com/0/856498667320406/1208796111998084/f

Tech Design URL:
CC:

**Description**:

Remove incorrect tests and reenable some of the non-flaky ones

<!--
If at any point it isn't actively being worked on/ready for
review/otherwise moving forward strongly consider closing it (or not
opening it in the first place). If you decide not to close it, use Draft
PR while work is still in progress or use `DO NOT MERGE` label to
clarify the PRs state and comment with more information.
-->

**Steps to test this PR**:

Check the Ci.

<!--
Before submitting a PR, please ensure you have tested the combinations
you expect the reviewer to test, then delete configurations you *know*
do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
-->

**Definition of Done (Internal Only)**:

* [ ] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

---
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
  • Loading branch information
bwaresiak authored Nov 29, 2024
1 parent 389b441 commit 86d978a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 310 deletions.
4 changes: 0 additions & 4 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,6 @@
CBAA195A27BFE15600A4BD49 /* NSManagedObjectContextExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBAA195927BFE15600A4BD49 /* NSManagedObjectContextExtension.swift */; };
CBC83E3429B631780008E19C /* Configuration in Frameworks */ = {isa = PBXBuildFile; productRef = CBC83E3329B631780008E19C /* Configuration */; };
CBC88EE12C7F834300F0F8C5 /* SpecialErrorPageUserScriptTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBC88EE02C7F834300F0F8C5 /* SpecialErrorPageUserScriptTests.swift */; };
CBC88EE32C7F8B1700F0F8C5 /* SpecialErrorPageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBC88EE22C7F8B1700F0F8C5 /* SpecialErrorPageTests.swift */; };
CBC88EE52C8097B500F0F8C5 /* URLCredentialCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBC88EE42C8097B500F0F8C5 /* URLCredentialCreator.swift */; };
CBCCF96828885DEE006F4A71 /* AppPrivacyConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C4BC3127C3F9B600C40026 /* AppPrivacyConfigurationTests.swift */; };
CBD4F13C279EBF4A00B20FD7 /* HomeMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBD4F13B279EBF4A00B20FD7 /* HomeMessage.swift */; };
Expand Down Expand Up @@ -2817,7 +2816,6 @@
CBB6B2542AF6D543006B777C /* lt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = lt; path = lt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CBC7AB542AF6D583008CB798 /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = ro.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CBC88EE02C7F834300F0F8C5 /* SpecialErrorPageUserScriptTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialErrorPageUserScriptTests.swift; sourceTree = "<group>"; };
CBC88EE22C7F8B1700F0F8C5 /* SpecialErrorPageTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialErrorPageTests.swift; sourceTree = "<group>"; };
CBC88EE42C8097B500F0F8C5 /* URLCredentialCreator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLCredentialCreator.swift; sourceTree = "<group>"; };
CBC8DC252AF6D4CD00BA681A /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CBD4F13B279EBF4A00B20FD7 /* HomeMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeMessage.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -6001,7 +5999,6 @@
F189AED61F18F6DE001EBAE1 /* TabTests.swift */,
D625AAEA2BBEEFC900BC189A /* TabURLInterceptorTests.swift */,
CBC88EE02C7F834300F0F8C5 /* SpecialErrorPageUserScriptTests.swift */,
CBC88EE22C7F8B1700F0F8C5 /* SpecialErrorPageTests.swift */,
);
name = Tabs;
sourceTree = "<group>";
Expand Down Expand Up @@ -8157,7 +8154,6 @@
CBDD5DE129A6741300832877 /* MockBundle.swift in Sources */,
C158AC7B297AB5DC0008723A /* MockSecureVault.swift in Sources */,
569437342BE4E41500C0881B /* SyncErrorHandlerSyncErrorsAlertsTests.swift in Sources */,
CBC88EE32C7F8B1700F0F8C5 /* SpecialErrorPageTests.swift in Sources */,
85C11E4120904BBE00BFFEB4 /* VariantManagerTests.swift in Sources */,
F1134ECE1F40EA9C00B73467 /* AtbParserTests.swift in Sources */,
F189AEE41F18FDAF001EBAE1 /* LinkTests.swift in Sources */,
Expand Down
8 changes: 8 additions & 0 deletions DuckDuckGoTests/MockTabDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ final class MockTabDelegate: TabDelegate {

}

final class MockCredentialCreator: URLCredentialCreating {

func urlCredentialFrom(trust: SecTrust?) -> URLCredential? {
return URLCredential(user: "", password: "", persistence: .forSession)
}

}

extension TabViewController {

static func fake(
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGoTests/PixelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class PixelTests: XCTestCase {
let userAgentName = "User-Agent"

override func setUpWithError() throws {
throw XCTSkip("Potentially flaky")
try super.setUpWithError()

Pixel.isDryRun = false
Expand Down Expand Up @@ -162,7 +161,8 @@ class PixelTests: XCTestCase {
wait(for: [expectation], timeout: 5.0)
}

func testPixelDebouncePreventsFiringWithinInterval() {
func testPixelDebouncePreventsFiringWithinInterval() throws {
throw XCTSkip("Flaky")
let firstFireExpectation = XCTestExpectation(description: "First pixel fire should succeed")
let thirdFireExpectation = XCTestExpectation(description: "Third pixel fire should succeed after debounce interval")

Expand Down
304 changes: 0 additions & 304 deletions DuckDuckGoTests/SpecialErrorPageTests.swift

This file was deleted.

0 comments on commit 86d978a

Please sign in to comment.