Skip to content

Commit

Permalink
Test pixels fired
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisBarreiro committed Nov 7, 2024
1 parent 96f7c1a commit b474a78
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,18 @@ class CtaViewModelTest {
verify(mockPixel, never()).fire(eq(SURVEY_CTA_SHOWN), any(), any(), eq(Count))
}

@Test
fun whenBrokenSitePromptDialogCtaIsShownThenPixelIsFired() = runTest {
testee.onCtaShown(BrokenSitePromptDialogCta())
verify(mockPixel).fire(eq(SITE_NOT_WORKING_SHOWN), any(), any(), eq(Count))
}

@Test
fun whenUserClicksReportBrokenSiteThenPixelIsFired() = runTest {
testee.onUserClickCtaOkButton(BrokenSitePromptDialogCta())
verify(mockPixel).fire(eq(SITE_NOT_WORKING_WEBSITE_BROKEN), any(), any(), eq(Count))
}

@Test
fun whenCtaShownAndCtaIsDaxAndCanSendPixelThenPixelIsFired() = runTest {
whenever(mockOnboardingStore.onboardingDialogJourney).thenReturn("s:0")
Expand Down

0 comments on commit b474a78

Please sign in to comment.