Skip to content

Commit

Permalink
add screenshottest for html
Browse files Browse the repository at this point in the history
  • Loading branch information
ccen-stripe committed Oct 10, 2023
1 parent e749686 commit 2f95cc0
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package com.stripe.android.uicore.text

import com.stripe.android.uicore.StripeTheme
import com.stripe.android.uicore.utils.PaparazziRule
import com.stripe.android.uicore.utils.SystemAppearance
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test

class HtmlScreenshotTest {
@get:Rule
val paparazziRule = PaparazziRule(
SystemAppearance.values()
)

@Test
@Ignore("Until fixed by https://issuetracker.google.com/issues/262773698")
fun testBold() {
paparazziRule.snapshot {
StripeTheme {
Html(html = "this is some <b>bold</b> text")
}
}
}

@Test
fun testItalic() {
paparazziRule.snapshot {
StripeTheme {
Html(html = "this is some <i>italic</i> text")
}
}
}

@Test
fun testUnderline() {
paparazziRule.snapshot {
StripeTheme {
Html(html = "this is some <u>underline</u> text")
}
}
}

@Test
fun testAnchor() {
paparazziRule.snapshot {
StripeTheme {
Html(html = "this is some <a href='stripe.com'>link</a> text")
}
}
}

@Test
fun testListItem() {
paparazziRule.snapshot {
StripeTheme {
Html(html = "these are some list items: <li>item1</li><li>item2</li><li>item3</li>")
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2f95cc0

Please sign in to comment.