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 0604a53 commit df4c66f
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 df4c66f

Please sign in to comment.