Skip to content

Commit

Permalink
Add test for MaterialTextPreview
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Feb 26, 2025
1 parent 7d2b44b commit 715aa29
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/

package io.element.android.compound.screenshot

import androidx.test.ext.junit.runners.AndroidJUnit4
import com.github.takahirom.roborazzi.captureRoboImage
import io.element.android.compound.screenshot.utils.screenshotFile
import io.element.android.compound.theme.MaterialTextPreview
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.annotation.Config
import org.robolectric.annotation.GraphicsMode

@RunWith(AndroidJUnit4::class)
@GraphicsMode(GraphicsMode.Mode.NATIVE)
class MaterialTextTests {
@Test
@Config(sdk = [35], qualifiers = "w480dp-h1200dp-xxhdpi")
fun screenshots() {
captureRoboImage(file = screenshotFile("MaterialText Colors.png")) {
MaterialTextPreview()
}
}
}

0 comments on commit 715aa29

Please sign in to comment.