Skip to content

Commit 4a90a49

Browse files
committed
Added some screenshots for the ProfileHeader
1 parent 248ba15 commit 4a90a49

6 files changed

+64
-1
lines changed

homeUi/src/main/kotlin/com/gravatar/app/homeUi/presentation/home/profile/ProfileHeader.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fun ProfileHeader(
4949
Text(
5050
text = jobInfo,
5151
style = MaterialTheme.typography.bodyMedium,
52-
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.7f)
52+
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.6f)
5353
)
5454
}
5555
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
package com.gravatar.app.homeUi.presentation.home.profile
2+
3+
import androidx.compose.foundation.layout.padding
4+
import androidx.compose.ui.Modifier
5+
import androidx.compose.ui.unit.dp
6+
import com.gravatar.app.testUtils.roborazzi.RoborazziTest
7+
import com.gravatar.extensions.defaultProfile
8+
import org.junit.Test
9+
10+
class ProfileHeaderTest : RoborazziTest() {
11+
12+
@Test
13+
fun profileHeader_bothJobTitleAndCompany() = screenshotTest {
14+
ProfileHeader(
15+
profile = defaultProfile(
16+
hash = "",
17+
displayName = "John Doe",
18+
jobTitle = "Software Engineer",
19+
company = "Automattic"
20+
),
21+
modifier = Modifier.padding(16.dp),
22+
)
23+
}
24+
25+
@Test
26+
fun profileHeader_onlyJobTitle() = screenshotTest {
27+
ProfileHeader(
28+
profile = defaultProfile(
29+
hash = "",
30+
displayName = "John Doe",
31+
jobTitle = "Software Engineer",
32+
company = ""
33+
),
34+
modifier = Modifier.padding(16.dp),
35+
)
36+
}
37+
38+
@Test
39+
fun profileHeader_onlyCompany() = screenshotTest {
40+
ProfileHeader(
41+
profile = defaultProfile(
42+
hash = "",
43+
displayName = "John Doe",
44+
jobTitle = "",
45+
company = "Automattic"
46+
),
47+
modifier = Modifier.padding(16.dp)
48+
)
49+
}
50+
51+
@Test
52+
fun profileHeader_neitherJobTitleNorCompany() = screenshotTest {
53+
ProfileHeader(
54+
profile = defaultProfile(
55+
hash = "",
56+
displayName = "John Doe",
57+
jobTitle = "",
58+
company = ""
59+
),
60+
modifier = Modifier.padding(16.dp),
61+
)
62+
}
63+
}

0 commit comments

Comments
 (0)