Skip to content

Commit

Permalink
style(association-manager): format using ktmft formating
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelien9Code committed Dec 20, 2024
1 parent 27ca2a6 commit 643cee9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,31 +219,32 @@ class AssociationProfileE2ETest : EndToEndTest() {
}
composeTestRule.onNodeWithTag(AssociationProfileTestTags.ACTIONS_PAGE).performClick()

composeTestRule.onNodeWithTag(AssociationProfileActionsTestTags.EDIT_ROLE + "Test Role").performScrollTo()
composeTestRule.onNodeWithTag(AssociationProfileActionsTestTags.EDIT_ROLE + "Test Role").performClick()
composeTestRule
.onNodeWithTag(AssociationProfileActionsTestTags.EDIT_ROLE + "Test Role")
.performScrollTo()
composeTestRule
.onNodeWithTag(AssociationProfileActionsTestTags.EDIT_ROLE + "Test Role")
.performClick()

composeTestRule.waitUntil(40000) {
composeTestRule
.onNodeWithTag(AssociationProfileActionsTestTags.CREATE_ROLE_DISPLAY_NAME)
.isDisplayed()
.onNodeWithTag(AssociationProfileActionsTestTags.CREATE_ROLE_DISPLAY_NAME)
.isDisplayed()
}

// Enter role display name
val roleDisplayName = "Edited Test Role"
composeTestRule
.onNodeWithTag(AssociationProfileActionsTestTags.CREATE_ROLE_DISPLAY_NAME)
.performTextInput("Edited ")
.onNodeWithTag(AssociationProfileActionsTestTags.CREATE_ROLE_DISPLAY_NAME)
.performTextInput("Edited ")

Espresso.closeSoftKeyboard()

// Confirm the role creation
composeTestRule
.onNodeWithText(
composeTestRule.activity.getString(
R.string.association_profile_save_role_dialog_save))
.performClick()


.onNodeWithText(
composeTestRule.activity.getString(R.string.association_profile_save_role_dialog_save))
.performClick()

// Verify the role was created
composeTestRule.waitUntil(10000) {
Expand Down Expand Up @@ -294,10 +295,12 @@ class AssociationProfileE2ETest : EndToEndTest() {
}
composeTestRule.onNodeWithTag(AssociationProfileTestTags.ACTIONS_PAGE).performClick()

composeTestRule.onNodeWithTag(AssociationProfileActionsTestTags.DELETE_ROLE + "Edited Test Role").performScrollTo()
composeTestRule.onNodeWithTag(AssociationProfileActionsTestTags.DELETE_ROLE + "Edited Test Role").performClick()


composeTestRule
.onNodeWithTag(AssociationProfileActionsTestTags.DELETE_ROLE + "Edited Test Role")
.performScrollTo()
composeTestRule
.onNodeWithTag(AssociationProfileActionsTestTags.DELETE_ROLE + "Edited Test Role")
.performClick()

composeTestRule.waitUntil(50000) {
composeTestRule.onNodeWithTag(AssociationProfileTestTags.OVERVIEW_PAGE).isDisplayed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ import com.android.unio.ui.theme.AppTypography
import com.android.unio.ui.utils.ToastUtils
import com.github.skydoves.colorpicker.compose.HsvColorPicker
import com.github.skydoves.colorpicker.compose.rememberColorPickerController
import kotlinx.coroutines.launch

/**
* Composable element that contain the association profile screen. It display the association.
Expand Down Expand Up @@ -691,10 +690,7 @@ private fun AssociationActionsMembers(
}

if (members != null) {
SearchPagerSection(
items = members,
cardContent = { cardContent(it) },
pagerState = pagerState)
SearchPagerSection(items = members, cardContent = { cardContent(it) }, pagerState = pagerState)

association?.let {
RolesManagementScreen(it.roles, associationViewModel = associationViewModel)
Expand Down Expand Up @@ -778,14 +774,22 @@ fun RoleCard(role: Role, associationViewModel: AssociationViewModel) {
imageVector = Icons.Default.Edit,
contentDescription =
context.getString(R.string.association_profile_role_card_edit_role),
modifier = Modifier.size(24.dp).clickable { showEditDialog = true }.padding(4.dp).testTag(AssociationProfileActionsTestTags.EDIT_ROLE + role.displayName))
modifier =
Modifier.size(24.dp)
.clickable { showEditDialog = true }
.padding(4.dp)
.testTag(AssociationProfileActionsTestTags.EDIT_ROLE + role.displayName))

Icon(
imageVector = Icons.Default.Delete,
contentDescription =
context.getString(R.string.association_profile_role_card_delete_role),
modifier =
Modifier.size(24.dp).clickable { showDeleteDialog = true }.padding(4.dp).testTag(AssociationProfileActionsTestTags.DELETE_ROLE + role.displayName))
Modifier.size(24.dp)
.clickable { showDeleteDialog = true }
.padding(4.dp)
.testTag(
AssociationProfileActionsTestTags.DELETE_ROLE + role.displayName))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ import androidx.compose.ui.platform.testTag
import androidx.compose.ui.unit.dp
import com.android.unio.R
import com.android.unio.model.association.Association
import com.android.unio.model.association.Member
import com.android.unio.model.event.Event
import com.android.unio.model.search.SearchViewModel
import com.android.unio.model.strings.test_tags.explore.ExploreContentTestTags
import com.android.unio.ui.theme.AppTypography
Expand Down Expand Up @@ -237,4 +235,4 @@ fun AssociationSearchBar(
}
}
}
}
}

0 comments on commit 643cee9

Please sign in to comment.