Skip to content

Commit

Permalink
Updating All the Tarka components (#256)
Browse files Browse the repository at this point in the history
* Updating Formatting for the base components, adding TUIToggleRow feature to show unavailable. Adjusting padding and other measurements stuff.

* Updating Formatting for the base components, adding Not available for TUICheckRoxRow and tuiSelectionCard

* Updating Formatting for Email components.

* Updating Formatting for Radio components.

* Updating Formatting for tab components.

* Adding Shape for extra small, adding color for error55, formatting the code.

* Adding new component of TuiAppBottomBar

* Adding behaviour of barcode to TuiSearchBar, and fixing trailing Icon issue.

* Adding behaviour of barcode to TUIAppTopBar

* Updating formatting of TUIAttachmentUpload

* Updating formatting of TUIChip.

* Adding new component of TUIContentBox.

* Updating Formatting for TUIDivider.

* Updating Formatting for TUIMediaThumbnail.kt.

* Adding Custom Style Parametrizing for TUIMobileButtonBlock

* Updating Formatting in TUIMobileOverlayFooter

* Updating Formatting in TUIMobileOverlayHeader

* Updating Formatting in TUIMobileOverlayMenuItem

* Updating Formatting in TUINavigationRow

* Updating Formatting in TUIPlayPauseButton

* Updating Formatting in TUISnackBar

* Updating Formatting in TUIStatusIndicator

* Updating Formatting in TUITableCell

* Updating Formatting in TUITag.

* Updating Formatting in TUITextRow, improving the design of Stepper, and General Design.

* Updating Formatting in TUIToggleSwitch

* Updating Test for TUIBadgeTest and TUITableCellTest
  • Loading branch information
Younes-Charfaoui authored Oct 25, 2024
1 parent 53d3d19 commit 8cac87f
Show file tree
Hide file tree
Showing 45 changed files with 1,868 additions and 1,073 deletions.
10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,50 @@ import com.tarkalabs.tarkaui.components.base.BadgeStyle
import com.tarkalabs.tarkaui.components.base.TUIBadge
import com.tarkalabs.tarkaui.components.base.TUIBadgeTags
import com.tarkalabs.tarkaui.icons.Symbols16
import com.tarkalabs.tarkaui.icons.TarkaIcon
import com.tarkalabs.tarkaui.icons.TarkaIcons
import org.junit.Rule
import org.junit.Test

class TUIBadgeTest {
@get:Rule val composeTestRule = createComposeRule()

private val tags = TUIBadgeTags(parentTag = "testTag")

@Test fun text_badge_Displayed() {
composeTestRule.setContent {
TUIBadge(
badgeSize = L, tags = tags, style = BadgeStyle.Count(299)
)
@get:Rule
val composeTestRule = createComposeRule()

private val tags = TUIBadgeTags(parentTag = "testTag")

@Test
fun text_badge_Displayed() {
composeTestRule.setContent {
TUIBadge(
badgeSize = L,
tags = tags,
style = BadgeStyle.Count(299)
)
}
composeTestRule.onNodeWithText("299").assertIsDisplayed()
composeTestRule.onNodeWithTag(tags.iconTag).assertDoesNotExist()
}
composeTestRule.onNodeWithText("299").assertIsDisplayed()
composeTestRule.onNodeWithTag(tags.iconTag).assertDoesNotExist()
}


@Test fun icon_badge_Displayed() {
composeTestRule.setContent {
TUIBadge(
badgeSize = L, tags = tags, style = BadgeStyle.Icon(TarkaIcons.Regular.Symbols16)
)
@Test
fun icon_badge_Displayed() {
composeTestRule.setContent {
TUIBadge(
badgeSize = L,
tags = tags,
style = BadgeStyle.Icon(TarkaIcons.Regular.Symbols16)
)
}
composeTestRule.onNodeWithTag(tags.iconTag).assertIsDisplayed()
}
composeTestRule.onNodeWithTag(tags.iconTag).assertIsDisplayed()
}

@Test fun empty_badge_Displayed() {
composeTestRule.setContent {
TUIBadge(
badgeSize = L, tags = tags
)
@Test
fun empty_badge_Displayed() {
composeTestRule.setContent {
TUIBadge(
badgeSize = L,
tags = tags
)
}
composeTestRule.onNodeWithTag(tags.iconTag).assertDoesNotExist()
composeTestRule.onNodeWithTag(tags.parentTag).assertExists()
}
composeTestRule.onNodeWithTag(tags.iconTag).assertDoesNotExist()
composeTestRule.onNodeWithTag(tags.parentTag).assertExists()
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.tarkalabs.uicomponents

import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.assertTextEquals
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithTag
import com.tarkalabs.tarkaui.components.TUITableCell
Expand All @@ -11,22 +10,24 @@ import org.junit.Rule
import org.junit.Test

class TUITableCellTest {
@get:Rule val composeTestRule = createComposeRule()
@get:Rule
val composeTestRule = createComposeRule()

private val testTags: TUITableCellTags = TUITableCellTags()
private val testTags: TUITableCellTags = TUITableCellTags()

@Test fun tuiTableCellDisplayed() {
val cellValue = "Label"
composeTestRule.setContent {
TUITheme {
TUITableCell(
cellValue = cellValue,
isHeader = true,
isTopBorderVisible = true,
isBottomBorderVisible = true
)
}
@Test
fun tuiTableCellDisplayed() {
val cellValue = "Label"
composeTestRule.setContent {
TUITheme {
TUITableCell(
cellValue = cellValue,
isHeader = true,
isTopBorderVisible = true,
isBottomBorderVisible = true
)
}
}
composeTestRule.onNodeWithTag(testTags.parentTag).assertExists().assertIsDisplayed()
}
composeTestRule.onNodeWithTag(testTags.parentTag).assertExists().assertIsDisplayed()
}
}
Loading

0 comments on commit 8cac87f

Please sign in to comment.