Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arifBurakDemiray committed Nov 11, 2024
1 parent fdcec88 commit f25c264
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,8 @@ public void recordEvent_visibilityTracking_onlyAddingItToViewsAndEvents() throws
countly.events().recordEvent(ModuleFeedback.RATING_EVENT_KEY, TestUtils.map());
validateEventInRQ(ModuleFeedback.RATING_EVENT_KEY, TestUtils.map(), 1, 0.0d, 0.0d, 4);

countly.events().recordEvent(ModuleViews.VIEW_EVENT_KEY, TestUtils.map());
validateEventInRQ(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("cly_v", 0), 1, 0.0d, 0.0d, 5);
countly.events().recordEvent(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("visit", 1));
validateEventInRQ(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("cly_v", 0, "visit", 1), 1, 0.0d, 0.0d, 5);

countly.events().recordEvent(ModuleViews.ORIENTATION_EVENT_KEY, TestUtils.map());
validateEventInRQ(ModuleViews.ORIENTATION_EVENT_KEY, TestUtils.map(), 1, 0.0d, 0.0d, 6);
Expand All @@ -835,15 +835,15 @@ public void recordEvent_visibilityTracking_bgFgSwitch() throws JSONException {
countly.onStart(Mockito.mock(Activity.class)); //foreground

countly.events().recordEvent(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("visit", 1));
validateEventInRQ(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("cly_v", 1), 1, 0.0d, 0.0d, 2);
validateEventInRQ(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("cly_v", 1, "visit", 1), 1, 0.0d, 0.0d, 2);

countly.events().recordEvent("fg", TestUtils.map());
validateEventInRQ("fg", TestUtils.map("cly_v", 1), 1, 0.0d, 0.0d, 3);

countly.onStop(); //background

countly.events().recordEvent(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("visit", 1));
validateEventInRQ(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("cly_v", 0), 1, 0.0d, 0.0d, 5);
validateEventInRQ(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("cly_v", 0, "visit", 1), 1, 0.0d, 0.0d, 5);

countly.events().recordEvent("bg", TestUtils.map());
validateEventInRQ("bg", TestUtils.map("cly_v", 0), 1, 0.0d, 0.0d, 6);
Expand All @@ -865,15 +865,15 @@ public void recordEvent_visibilityTracking_notEnabled() throws JSONException {
countly.onStart(Mockito.mock(Activity.class)); //foreground

countly.events().recordEvent(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("visit", 1));
validateEventInRQ(ModuleViews.VIEW_EVENT_KEY, TestUtils.map(), 1, 0.0d, 0.0d, 2);
validateEventInRQ(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("visit", 1), 1, 0.0d, 0.0d, 2);

countly.events().recordEvent("fg", TestUtils.map());
validateEventInRQ("fg", TestUtils.map(), 1, 0.0d, 0.0d, 3);

countly.onStop(); //background

countly.events().recordEvent(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("visit", 1));
validateEventInRQ(ModuleViews.VIEW_EVENT_KEY, TestUtils.map(), 1, 0.0d, 0.0d, 5);
validateEventInRQ(ModuleViews.VIEW_EVENT_KEY, TestUtils.map("visit", 1), 1, 0.0d, 0.0d, 5);

countly.events().recordEvent("bg", TestUtils.map());
validateEventInRQ("bg", TestUtils.map(), 1, 0.0d, 0.0d, 6);
Expand Down

0 comments on commit f25c264

Please sign in to comment.