Skip to content

Commit 8029132

Browse files
Merge pull request #66 from seb-oss/feature/MCORE-202/create-preview-files-for-the-progress-Indicator
[MCORE-202] Create preview files for the Circular Progress Indicator
2 parents 5aa8790 + 9286cf2 commit 8029132

7 files changed

+73
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package se.seb.gds.atoms
2+
3+
import androidx.compose.foundation.layout.Column
4+
import androidx.compose.foundation.layout.padding
5+
import androidx.compose.runtime.Composable
6+
import androidx.compose.ui.Modifier
7+
import androidx.compose.ui.unit.dp
8+
import com.android.tools.screenshot.PreviewTest
9+
import se.seb.gds.common.GdsUiTestsPreview
10+
import se.seb.gds.theme.GdsTheme
11+
12+
/**
13+
* Screenshot tests for the default [GdsCircularProgressIndicator] component.
14+
*/
15+
@PreviewTest
16+
@GdsUiTestsPreview
17+
@Composable
18+
private fun GdsCircularProgressIndicatorDefaultScreenshot() {
19+
GdsTheme {
20+
Column(
21+
modifier = Modifier.padding(GdsTheme.dimensions.spacing.SpaceM),
22+
) {
23+
GdsCircularProgressIndicator()
24+
}
25+
}
26+
}
27+
28+
@PreviewTest
29+
@GdsUiTestsPreview
30+
@Composable
31+
private fun GdsCircularProgressIndicatorWithCustomColorScreenshot() {
32+
GdsTheme {
33+
Column(
34+
modifier = Modifier.padding(GdsTheme.dimensions.spacing.SpaceM),
35+
) {
36+
GdsCircularProgressIndicator(
37+
color = GdsTheme.colors.Border.Subtle01,
38+
trackColor = GdsTheme.colors.Border.Strong,
39+
)
40+
}
41+
}
42+
}
43+
44+
@PreviewTest
45+
@GdsUiTestsPreview
46+
@Composable
47+
private fun GdsCircularProgressIndicatorWithCustomSize60DpScreenshot() {
48+
GdsTheme {
49+
Column(
50+
modifier = Modifier.padding(GdsTheme.dimensions.spacing.SpaceM),
51+
) {
52+
GdsCircularProgressIndicator(size = 60.dp)
53+
}
54+
}
55+
}
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)