Skip to content

Commit fc46769

Browse files
committed
Add snapshot tests for OudsAvatar
1 parent 27ea07d commit fc46769

5 files changed

Lines changed: 38 additions & 0 deletions
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Software Name: OUDS Android
3+
* SPDX-FileCopyrightText: Copyright (c) Orange SA
4+
* SPDX-License-Identifier: MIT
5+
*
6+
* This software is distributed under the MIT license,
7+
* the text of which is available at https://opensource.org/license/MIT/
8+
* or see the "LICENSE" file for more details.
9+
*
10+
* Software description: Android library of reusable graphical components
11+
*/
12+
13+
package com.orange.ouds.core.component
14+
15+
import androidx.compose.runtime.Composable
16+
import com.orange.ouds.core.test.OudsSnapshotTest
17+
import com.orange.ouds.theme.orange.OrangeTheme
18+
import org.junit.runner.RunWith
19+
import org.junit.runners.Parameterized
20+
21+
@RunWith(Parameterized::class)
22+
internal class OudsAvatarTest(val isMonogram: Boolean) : OudsSnapshotTest(theme = OrangeTheme()) {
23+
24+
companion object {
25+
@JvmStatic
26+
@Parameterized.Parameters
27+
internal fun data() = OudsAvatarPreviewParameterProvider().values.toList()
28+
}
29+
30+
@Composable
31+
override fun Snapshot(darkThemeEnabled: Boolean, highContrastModeEnabled: Boolean) {
32+
PreviewOudsAvatar(
33+
theme = theme,
34+
darkThemeEnabled = darkThemeEnabled,
35+
isMonogram = isMonogram
36+
)
37+
}
38+
}
11.9 KB
Loading
12.2 KB
Loading
11.6 KB
Loading
12 KB
Loading

0 commit comments

Comments
 (0)