Skip to content

Commit

Permalink
DTSERWONE-821 - Enhance unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
grmeyer-hw-dev committed Mar 29, 2023
2 parents 8d3f5d5 + f62c1d0 commit 8f2be70
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
--min-acl public \
--no-hide-documentation-coverage \
--theme fullwidth \
--title HyperwalletSDK \
--module HyperwalletSDK \
--title Insights \
--module Insights \
--output ./docs \
--documentation=./*.md
Expand Down
15 changes: 15 additions & 0 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
author: Hyperwallet Systems Inc
clean: true
author_url: https://www.hyperwallet.com/
github_url: https://github.com/hyperwallet/hyperwallet-ios-sdk
copyright: Copyright (c) 2018-present, Hyperwallet Systems Inc. All rights reserved.
module: Insights
module_version: 0.0.1
hide_documentation_coverage: true
podspec: Insights.podspec
readme: README.md
skip_undocumented: true
source_directory: Sources
theme: fullwidth
use_safe_filenames: true
output: docs
12 changes: 6 additions & 6 deletions Tests/InsightsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class InsightsTests: XCTestCase {
pageGroup: pageGroup,
link: link,
params: [:])
sleep(10)
sleep(4)

let events = EventManager.shared.loadEvents(before: Date().epochMilliseconds())
XCTAssertEqual(events.count, 1, "There should be 1 record in database")
Expand All @@ -67,7 +67,7 @@ final class InsightsTests: XCTestCase {
params: [:])
}

sleep(10)
sleep(4)

let events = EventManager.shared.loadEvents(before: Date().epochMilliseconds())
XCTAssertEqual(events.count, 2, "There should be 2 Impression events in the storage")
Expand All @@ -90,7 +90,7 @@ final class InsightsTests: XCTestCase {
errorInfo: errorInfo)
}

sleep(10)
sleep(4)

let events = EventManager.shared.loadEvents(before: Date().epochMilliseconds())
XCTAssertEqual(events.count, 3, "There should be 3 Error events in the storage")
Expand All @@ -107,7 +107,7 @@ final class InsightsTests: XCTestCase {
link: "test_link",
params: [:])
}
sleep(10)
sleep(4)

let countAfterSave = EventManager.shared.getEventsCount()
XCTAssertEqual(countAfterSave, 5, "There should be 5 Click events in the storage")
Expand All @@ -127,11 +127,11 @@ final class InsightsTests: XCTestCase {
params: [:])
if eventNumber == 10 {
// wait 1 second to separate other events (createdOn)
sleep(10)
sleep(4)
}
}

sleep(10)
sleep(4)

let countAfterSave = EventManager.shared.getEventsCount()
XCTAssertEqual(countAfterSave, 15, "There should be 15 Click events in the storage")
Expand Down

0 comments on commit 8f2be70

Please sign in to comment.