Skip to content
Open
57 changes: 57 additions & 0 deletions app/src/androidTest/java/com/example/sw0b_001/AboutAppBarTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package com.example.sw0b_001

import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.navigation.compose.rememberNavController
import com.example.sw0b_001.ui.appbars.AboutAppBar
import com.example.sw0b_001.ui.theme.AppTheme
import org.junit.Rule
import org.junit.Test

class AboutAppBarTest {

@get:Rule
val composeTestRule = createComposeRule()

@Test
fun aboutAppBar_displaysAllMainElements() {

composeTestRule.setContent {
AppTheme {
AboutAppBar(navController = rememberNavController())
}
}

composeTestRule
.onNodeWithText("About")
.assertExists()


composeTestRule
.onNodeWithContentDescription("Back")
.assertExists()


composeTestRule
.onNodeWithTag("bug_report_button")
.assertExists()
}

@Test
fun aboutAppBar_bugReportButton_isClickable() {

composeTestRule.setContent {
AppTheme {
AboutAppBar(navController = rememberNavController())
}
}

composeTestRule
.onNodeWithTag("bug_report_button")
.assertExists()
.performClick()
}
}
39 changes: 28 additions & 11 deletions app/src/main/java/com/example/sw0b_001/ui/appbars/AboutAppBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.example.sw0b_001.ui.appbars
import android.content.Context
import android.content.Intent
import android.net.Uri
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
Expand All @@ -29,6 +30,7 @@ import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import com.example.sw0b_001.R
import com.example.sw0b_001.ui.theme.AppTheme
import androidx.compose.ui.platform.testTag

@OptIn(ExperimentalMaterial3Api::class)
@Composable
Expand All @@ -42,39 +44,54 @@ fun AboutAppBar(
Text(
text = stringResource(R.string.about),
style = MaterialTheme.typography.titleLarge,
fontWeight = FontWeight.Bold
fontWeight = FontWeight.SemiBold
)
},
navigationIcon = {
IconButton(onClick = { navController.popBackStack() }) {
IconButton(
onClick = { navController.popBackStack() }
) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = stringResource(R.string.back)
)
}
},
actions = {

Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.padding(end = 16.dp)
.padding(end = 12.dp)
.background(
color = MaterialTheme.colorScheme.surfaceContainerHigh,
shape = MaterialTheme.shapes.large
)
.clickable { sendBugReportEmail(context) }
.padding(horizontal = 12.dp, vertical = 6.dp)
.testTag("bug_report_button")
) {
Text(
text = stringResource(R.string.bug_report),
style = MaterialTheme.typography.bodySmall,
)
Spacer(modifier = Modifier.width(4.dp))

Icon(
imageVector = Icons.Default.Email,
contentDescription = stringResource(R.string.report_bug_feedback)
contentDescription = stringResource(R.string.report_bug_feedback),
tint = MaterialTheme.colorScheme.primary
)

Spacer(modifier = Modifier.width(6.dp))

Text(
text = stringResource(R.string.bug_report),
style = MaterialTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.primary
)
}
},
colors = TopAppBarDefaults.topAppBarColors()
colors = TopAppBarDefaults.centerAlignedTopAppBarColors(
containerColor = MaterialTheme.colorScheme.surface
)
)
}

private fun sendBugReportEmail(context: Context) {
val emailIntent = Intent(Intent.ACTION_SENDTO).apply {
data = Uri.parse("mailto:")
Expand Down
6 changes: 3 additions & 3 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SWOB (SMSWithoutBorders aka SMS without Borders) is a platforms which enables users with a smartphone to communicate with online third-party platforms using SMS messages.
SWOB ("SMSWithoutBorders", AKA "SMS Sithout Borders") is a platform which enables users with a smartphone to communicate with online third-party platforms using SMS messages.

A typical use-case of the platforms is sending out emails from platforms such as Gmail accounts. This becomes a useful tool in cases where access to the internet is limited or completely unavailable. Usage of SWOB intales having a proactive approach to maintaining your communications; the features that SWOB supports require the users to take delebrate actions prior to usage.
A typical use-case of the platforms is sending out emails from platforms such as Gmail accounts. This becomes a useful tool in cases where access to the internet is limited or completely unavailable. Usage of SWOB entails having a proactive approach to maintaining your communications; the features that SWOB supports require the users to take delebrate actions prior to usage.

Our goal is not to replace the internet; for the most part, the internet is an already efficient method of communication with many abilities that surpass what's possible with simple SMS. Unfortunately, we still have a good portion of telecom users in the world who will have to rely on SMS for task built for the internet. Based on value, internet based communications are cheaper than SMS based communications. We are using SWOB on the bases of accessibility to a communication medium.
Our goal is not to replace the internet; for the most part, the internet is an already efficient method of communication with many abilities that surpass what's possible with simple SMS. Unfortunately, we still have a good portion of telecom users in the world who will have to rely on SMS for tasks built for the internet. Based on value, internet based communications are cheaper than SMS based communications. We are using SWOB on the basis of accessibility of a communication medium.