Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit abea580

Browse files
committed
1.0.3 - metrics
1 parent 717f7f2 commit abea580

File tree

5 files changed

+73
-6
lines changed

5 files changed

+73
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Changelog
44
All notable changes to this project will be documented in this file.
55

66
---
7+
## 1.0.3
8+
### Features
9+
* Metrics recording
710

811
## 1.0.2
912
### Bug Fixes

Marlin/Marlin.xcodeproj/project.pbxproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
F75324C229833BBB005C509F /* MalrinMapTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F75324C129833BBB005C509F /* MalrinMapTests.swift */; };
152152
F75324C529885521005C509F /* SearchResultsMapTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F75324C429885521005C509F /* SearchResultsMapTests.swift */; };
153153
F75324C72989854F005C509F /* UserTrackingButtonTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F75324C62989854F005C509F /* UserTrackingButtonTests.swift */; };
154+
F75324C92989D143005C509F /* MSIListViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F75324C82989D143005C509F /* MSIListViewModelTests.swift */; };
154155
F75F81D529526E9C0062A708 /* AsamSummaryViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F75F81D429526E9C0062A708 /* AsamSummaryViewTests.swift */; };
155156
F75F81D8295DE0EF0062A708 /* AboutCellTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F75F81D7295DE0EF0062A708 /* AboutCellTests.swift */; };
156157
F75F81DA295DE4640062A708 /* AboutViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F75F81D9295DE4640062A708 /* AboutViewTests.swift */; };
@@ -497,6 +498,7 @@
497498
F75324C129833BBB005C509F /* MalrinMapTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MalrinMapTests.swift; sourceTree = "<group>"; };
498499
F75324C429885521005C509F /* SearchResultsMapTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultsMapTests.swift; sourceTree = "<group>"; };
499500
F75324C62989854F005C509F /* UserTrackingButtonTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserTrackingButtonTests.swift; sourceTree = "<group>"; };
501+
F75324C82989D143005C509F /* MSIListViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MSIListViewModelTests.swift; sourceTree = "<group>"; };
500502
F75F81D229526D5C0062A708 /* libKIF.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libKIF.a; sourceTree = BUILT_PRODUCTS_DIR; };
501503
F75F81D429526E9C0062A708 /* AsamSummaryViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsamSummaryViewTests.swift; sourceTree = "<group>"; };
502504
F75F81D7295DE0EF0062A708 /* AboutCellTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutCellTests.swift; sourceTree = "<group>"; };
@@ -1102,6 +1104,7 @@
11021104
F72D88F72971FF8000D022FB /* HamburgerTests.swift */,
11031105
F75324B729807F04005C509F /* SubmitReportViewTests.swift */,
11041106
F75324BF2983272A005C509F /* MarlinCompactWidthViewTests.swift */,
1107+
F75324C82989D143005C509F /* MSIListViewModelTests.swift */,
11051108
);
11061109
path = Views;
11071110
sourceTree = "<group>";
@@ -1943,6 +1946,7 @@
19431946
F72D89062979D56500D022FB /* PortDetailViewTests.swift in Sources */,
19441947
F72D8910297A002100D022FB /* ElectronicPublicationSummaryViewTests.swift in Sources */,
19451948
F72D8914297EF99400D022FB /* ElectronicPublicationDetailViewTests.swift in Sources */,
1949+
F75324C92989D143005C509F /* MSIListViewModelTests.swift in Sources */,
19461950
F75F81E2295F70A50062A708 /* BooleanFilterTests.swift in Sources */,
19471951
F72D89022979BCA300D022FB /* ModuDetailViewTests.swift in Sources */,
19481952
F72D891B297F449C00D022FB /* DFRSDataTests.swift in Sources */,
@@ -2430,7 +2434,7 @@
24302434
"$(inherited)",
24312435
"@executable_path/Frameworks",
24322436
);
2433-
MARKETING_VERSION = 1.0.2;
2437+
MARKETING_VERSION = 1.0.3;
24342438
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.marlin;
24352439
PRODUCT_NAME = Marlin;
24362440
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -2468,7 +2472,7 @@
24682472
"$(inherited)",
24692473
"@executable_path/Frameworks",
24702474
);
2471-
MARKETING_VERSION = 1.0.2;
2475+
MARKETING_VERSION = 1.0.3;
24722476
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.marlin;
24732477
PRODUCT_NAME = Marlin;
24742478
PROVISIONING_PROFILE_SPECIFIER = "";

Marlin/Marlin/Views/MSIListView.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
import SwiftUI
99
import CoreData
1010

11-
struct MSIListView<T: BatchImportable & DataSourceViewBuilder, Content: View>: View {
12-
// @Environment(\.managedObjectContext) private var viewContext
13-
11+
struct MSIListView<T: BatchImportable & DataSourceViewBuilder, Content: View>: View {
1412
@State var sortOpen: Bool = false
1513

1614
@ObservedObject var focusedItem: ItemWrapper

Marlin/Marlin/appFeatures.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@
3535
<key>forceReloadDate</key>
3636
<date>2022-12-19T17:52:33Z</date>
3737
<key>metricsEnabled</key>
38-
<false/>
38+
<true/>
3939
</dict>
4040
</plist>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
//
2+
// MSIListViewModelTests.swift
3+
// MarlinTests
4+
//
5+
// Created by Daniel Barela on 1/31/23.
6+
//
7+
8+
import XCTest
9+
import Combine
10+
import SwiftUI
11+
12+
@testable import Marlin
13+
14+
final class MSIListViewModelTests: XCTestCase {
15+
16+
var cancellable = Set<AnyCancellable>()
17+
var persistentStore: PersistentStore = PersistenceController.shared
18+
let persistentStoreLoadedPub = NotificationCenter.default.publisher(for: .PersistentStoreLoaded)
19+
.receive(on: RunLoop.main)
20+
21+
override func setUp(completion: @escaping (Error?) -> Void) {
22+
for item in DataSourceList().allTabs {
23+
UserDefaults.standard.initialDataLoaded = false
24+
UserDefaults.standard.clearLastSyncTimeSeconds(item.dataSource as! any BatchImportable.Type)
25+
}
26+
UserDefaults.standard.lastLoadDate = Date(timeIntervalSince1970: 0)
27+
28+
UserDefaults.standard.setValue(Date(), forKey: "forceReloadDate")
29+
persistentStore.viewContext.performAndWait {
30+
if let lights = persistentStore.viewContext.fetchAll(Light.self) {
31+
for light in lights {
32+
persistentStore.viewContext.delete(light)
33+
}
34+
}
35+
}
36+
37+
persistentStoreLoadedPub
38+
.removeDuplicates()
39+
.sink { output in
40+
completion(nil)
41+
}
42+
.store(in: &cancellable)
43+
persistentStore.reset()
44+
45+
}
46+
override func tearDown(completion: @escaping (Error?) -> Void) {
47+
persistentStore.viewContext.performAndWait {
48+
if let lights = persistentStore.viewContext.fetchAll(Light.self) {
49+
for light in lights {
50+
persistentStore.viewContext.delete(light)
51+
}
52+
}
53+
}
54+
completion(nil)
55+
}
56+
57+
func testExample() throws {
58+
// focusedItem: itemWrapper, filterPublisher: UserDefaults.standard.publisher(for: \.asamFilter), sortPublisher: UserDefaults.standard.publisher(for: \.asamSort)
59+
// let listViewModel =
60+
}
61+
62+
}

0 commit comments

Comments
 (0)