|
| 1 | +package org.cru.godtools.shared.renderer.content |
| 2 | + |
| 3 | +import com.android.ide.common.rendering.api.SessionParams.RenderingMode |
| 4 | +import kotlin.test.Test |
| 5 | +import org.cru.godtools.shared.renderer.BasePaparazziTest |
| 6 | +import org.cru.godtools.shared.tool.parser.model.Text |
| 7 | + |
| 8 | +class RenderTextPaparazziTest : BasePaparazziTest(renderingMode = RenderingMode.SHRINK) { |
| 9 | + @Test |
| 10 | + fun `RenderText() - Simple`() = contentSnapshot { |
| 11 | + RenderText(Text(text = "Simple Text")) |
| 12 | + } |
| 13 | + |
| 14 | + @Test |
| 15 | + fun `RenderText() - Styles`() = contentSnapshot { |
| 16 | + RenderText(Text(text = "Italic Text", textStyles = setOf(Text.Style.ITALIC))) |
| 17 | + RenderText(Text(text = "Underline Text", textStyles = setOf(Text.Style.UNDERLINE))) |
| 18 | + RenderText(Text(text = "Italic Underline Text", textStyles = setOf(Text.Style.ITALIC, Text.Style.UNDERLINE))) |
| 19 | + } |
| 20 | + |
| 21 | + @Test |
| 22 | + fun `RenderText() - Font Weight`() = contentSnapshot { |
| 23 | + RenderText(Text(text = "Font Weight 100", fontWeight = 100)) |
| 24 | + RenderText(Text(text = "Font Weight 200", fontWeight = 200)) |
| 25 | + RenderText(Text(text = "Font Weight 300", fontWeight = 300)) |
| 26 | + RenderText(Text(text = "Font Weight 400", fontWeight = 400)) |
| 27 | + RenderText(Text(text = "Font Weight 500", fontWeight = 500)) |
| 28 | + RenderText(Text(text = "Font Weight 600", fontWeight = 600)) |
| 29 | + RenderText(Text(text = "Font Weight 700", fontWeight = 700)) |
| 30 | + RenderText(Text(text = "Font Weight 800", fontWeight = 800)) |
| 31 | + RenderText(Text(text = "Font Weight 900", fontWeight = 900)) |
| 32 | + RenderText(Text(text = "Font Weight 1000", fontWeight = 1000)) |
| 33 | + } |
| 34 | +} |
0 commit comments