sprint-1 #1

Merged
user10 merged 20 commits from sprint-1 into main 2025-05-26 14:29:49 +00:00
Showing only changes of commit 372b523c0b - Show all commits

View File

@ -0,0 +1,47 @@
package com.example.libary
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithText
import org.junit.Rule
import org.junit.Test
class CardPrimaryTest {
@get:Rule
val composeRule = createComposeRule()
@Test
fun test() {
composeRule.setContent {
PrimaryCard(
name = "name",
category = "category",
price = "100",
isAdd = false
)
}
composeRule.onNodeWithText("name").assertIsDisplayed()
composeRule.onNodeWithText("category").assertIsDisplayed()
composeRule.onNodeWithText("100 ₽").assertIsDisplayed()
composeRule.onNodeWithText("Убрать").assertIsDisplayed()
}
@Test
fun test1() {
composeRule.setContent {
PrimaryCard(
name = "name",
category = "category",
price = "100",
isAdd = true
)
}
composeRule.onNodeWithText("name").assertIsDisplayed()
composeRule.onNodeWithText("category").assertIsDisplayed()
composeRule.onNodeWithText("100 ₽").assertIsDisplayed()
composeRule.onNodeWithText("Добавить").assertIsDisplayed()
}
}