Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SendAmountContentTest {
composeTestRule.onNodeWithTag("send_amount_screen").assertExists()
// composeTestRule.onNodeWithTag("amount_input_field").assertExists() doesn't displayed because of viewmodel injection
composeTestRule.onNodeWithTag("available_balance").assertExists()
composeTestRule.onNodeWithTag("payment_method_button").assertExists()
composeTestRule.onNodeWithTag("AssetButton-switch").assertExists()
composeTestRule.onNodeWithTag("continue_button").assertExists()
composeTestRule.onNodeWithTag("amount_keyboard").assertExists()
}
Expand Down Expand Up @@ -98,7 +98,7 @@ class SendAmountContentTest {
)
}

composeTestRule.onNodeWithTag("payment_method_button")
composeTestRule.onNodeWithTag("AssetButton-switch")
.performClick()

assert(eventTriggered)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class BlocksEditScreenTest {

// Assert main elements exist
composeTestRule.onNodeWithTag("blocks_edit_screen").assertExists()
composeTestRule.onNodeWithTag("main_content").assertExists()
composeTestRule.onNodeWithTag("WidgetEditScrollView").assertExists()

// Verify description
composeTestRule.onNodeWithTag("edit_description").assertExists()
Expand All @@ -82,18 +82,18 @@ class BlocksEditScreenTest {

// Verify buttons
composeTestRule.onNodeWithTag("buttons_row").assertExists()
composeTestRule.onNodeWithTag("reset_button").assertExists()
composeTestRule.onNodeWithTag("preview_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEditReset").assertExists()
composeTestRule.onNodeWithTag("WidgetEditPreview").assertExists()

// Test button clicks
composeTestRule.onNodeWithTag("block_toggle_button").performClick()
assert(blockClicked)

composeTestRule.onNodeWithTag("preview_button").performClick()
composeTestRule.onNodeWithTag("WidgetEditPreview").performClick()
assert(previewClicked)

// Reset button should be disabled with default preferences
composeTestRule.onNodeWithTag("reset_button").assertIsNotEnabled()
composeTestRule.onNodeWithTag("WidgetEditReset").assertIsNotEnabled()
}

@Test
Expand Down Expand Up @@ -128,10 +128,10 @@ class BlocksEditScreenTest {
}

// Assert reset button should be enabled when preferences are customized
composeTestRule.onNodeWithTag("reset_button").assertIsEnabled()
composeTestRule.onNodeWithTag("WidgetEditReset").assertIsEnabled()

// Test reset button click
composeTestRule.onNodeWithTag("reset_button").performClick()
composeTestRule.onNodeWithTag("WidgetEditReset").performClick()
assert(resetClicked)
}

Expand Down Expand Up @@ -159,7 +159,7 @@ class BlocksEditScreenTest {
}
}

composeTestRule.onNodeWithTag("preview_button").assertIsEnabled()
composeTestRule.onNodeWithTag("WidgetEditPreview").assertIsEnabled()
}

@Test
Expand Down Expand Up @@ -193,7 +193,7 @@ class BlocksEditScreenTest {
}
}

composeTestRule.onNodeWithTag("preview_button").assertIsNotEnabled()
composeTestRule.onNodeWithTag("WidgetEditPreview").assertIsNotEnabled()
}

@Test
Expand Down Expand Up @@ -255,10 +255,10 @@ class BlocksEditScreenTest {
composeTestRule.onNodeWithTag("source_toggle_button").performClick()
assert(sourceClicked)

composeTestRule.onNodeWithTag("preview_button").performClick()
composeTestRule.onNodeWithTag("WidgetEditPreview").performClick()
assert(previewClicked)

composeTestRule.onNodeWithTag("reset_button").performClick()
composeTestRule.onNodeWithTag("WidgetEditReset").performClick()
assert(resetClicked)
}

Expand Down Expand Up @@ -330,7 +330,7 @@ class BlocksEditScreenTest {

// Assert all tagged elements exist
composeTestRule.onNodeWithTag("blocks_edit_screen").assertExists()
composeTestRule.onNodeWithTag("main_content").assertExists()
composeTestRule.onNodeWithTag("WidgetEditScrollView").assertExists()
composeTestRule.onNodeWithTag("edit_description").assertExists()

listOf("block", "time", "date", "transactions", "size", "source").forEach { prefix ->
Expand All @@ -342,8 +342,8 @@ class BlocksEditScreenTest {
}

composeTestRule.onNodeWithTag("buttons_row").assertExists()
composeTestRule.onNodeWithTag("reset_button").assertExists()
composeTestRule.onNodeWithTag("preview_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEditReset").assertExists()
composeTestRule.onNodeWithTag("WidgetEditPreview").assertExists()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,23 @@ class BlocksPreviewContentTest {
composeTestRule.onNodeWithTag("widget_description").assertExists()

// Verify settings and preview section
composeTestRule.onNodeWithTag("edit_settings_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEdit").assertExists()
composeTestRule.onNodeWithTag("preview_label").assertExists()
composeTestRule.onNodeWithTag("block_card").assertExists()

// Verify buttons
composeTestRule.onNodeWithTag("buttons_row").assertExists()
composeTestRule.onNodeWithTag("delete_button").assertExists()
composeTestRule.onNodeWithTag("save_button").assertExists()
composeTestRule.onNodeWithTag("WidgetDelete").assertExists()
composeTestRule.onNodeWithTag("WidgetSave").assertExists()

// Test button clicks
composeTestRule.onNodeWithTag("edit_settings_button").performClick()
composeTestRule.onNodeWithTag("WidgetEdit").performClick()
assert(editClicked)

composeTestRule.onNodeWithTag("delete_button").performClick()
composeTestRule.onNodeWithTag("WidgetDelete").performClick()
assert(deleteClicked)

composeTestRule.onNodeWithTag("save_button").performClick()
composeTestRule.onNodeWithTag("WidgetSave").performClick()
assert(saveClicked)
}

Expand Down Expand Up @@ -113,11 +113,11 @@ class BlocksPreviewContentTest {
composeTestRule.onNodeWithTag("buttons_row").assertExists()

// Delete button should not exist when widget is disabled
composeTestRule.onNodeWithTag("delete_button").assertDoesNotExist()
composeTestRule.onNodeWithTag("save_button").assertExists()
composeTestRule.onNodeWithTag("WidgetDelete").assertDoesNotExist()
composeTestRule.onNodeWithTag("WidgetSave").assertExists()

// Test save button click
composeTestRule.onNodeWithTag("save_button").performClick()
composeTestRule.onNodeWithTag("WidgetSave").performClick()
assert(saveClicked)
}

Expand Down Expand Up @@ -152,7 +152,7 @@ class BlocksPreviewContentTest {

// Assert that all elements still exist with custom preferences
composeTestRule.onNodeWithTag("blocks_preview_screen").assertExists()
composeTestRule.onNodeWithTag("edit_settings_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEdit").assertExists()
composeTestRule.onNodeWithTag("block_card").assertExists()
}

Expand Down Expand Up @@ -183,12 +183,12 @@ class BlocksPreviewContentTest {
composeTestRule.onNodeWithTag("widget_icon").assertExists()
composeTestRule.onNodeWithTag("widget_description").assertExists()
composeTestRule.onNodeWithTag("divider").assertExists()
composeTestRule.onNodeWithTag("edit_settings_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEdit").assertExists()
composeTestRule.onNodeWithTag("preview_label").assertExists()
composeTestRule.onNodeWithTag("block_card").assertExists()
composeTestRule.onNodeWithTag("buttons_row").assertExists()
composeTestRule.onNodeWithTag("delete_button").assertExists()
composeTestRule.onNodeWithTag("save_button").assertExists()
composeTestRule.onNodeWithTag("WidgetDelete").assertExists()
composeTestRule.onNodeWithTag("WidgetSave").assertExists()
}

@Test
Expand Down Expand Up @@ -248,8 +248,8 @@ class BlocksPreviewContentTest {
// Assert core elements still exist
composeTestRule.onNodeWithTag("blocks_preview_screen").assertExists()
composeTestRule.onNodeWithTag("block_card").assertExists()
composeTestRule.onNodeWithTag("save_button").assertExists()
composeTestRule.onNodeWithTag("delete_button").assertDoesNotExist()
composeTestRule.onNodeWithTag("WidgetSave").assertExists()
composeTestRule.onNodeWithTag("WidgetDelete").assertDoesNotExist()
}

@Test
Expand Down Expand Up @@ -305,7 +305,7 @@ class BlocksPreviewContentTest {
}

// Assert edit button shows custom state
composeTestRule.onNodeWithTag("edit_settings_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEdit").assertExists()
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class FactsEditContentTest {

// Assert main elements exist
composeTestRule.onNodeWithTag("facts_edit_screen").assertExists()
composeTestRule.onNodeWithTag("main_content").assertExists()
composeTestRule.onNodeWithTag("WidgetEditScrollView").assertExists()

// Verify description
composeTestRule.onNodeWithTag("edit_description").assertExists()
Expand All @@ -68,18 +68,18 @@ class FactsEditContentTest {

// Verify buttons
composeTestRule.onNodeWithTag("buttons_row").assertExists()
composeTestRule.onNodeWithTag("reset_button").assertExists()
composeTestRule.onNodeWithTag("preview_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEditReset").assertExists()
composeTestRule.onNodeWithTag("WidgetEditPreview").assertExists()

// Test button clicks
composeTestRule.onNodeWithTag("source_toggle_button").performClick()
assert(sourceClicked)

composeTestRule.onNodeWithTag("preview_button").performClick()
composeTestRule.onNodeWithTag("WidgetEditPreview").performClick()
assert(previewClicked)

// Reset button should be disabled when source is enabled (default state)
composeTestRule.onNodeWithTag("reset_button").assertIsNotEnabled()
composeTestRule.onNodeWithTag("WidgetEditReset").assertIsNotEnabled()
}

@Test
Expand All @@ -105,10 +105,10 @@ class FactsEditContentTest {
}

// Assert reset button should be enabled when source is enabled
composeTestRule.onNodeWithTag("reset_button").assertIsEnabled()
composeTestRule.onNodeWithTag("WidgetEditReset").assertIsEnabled()

// Test reset button click
composeTestRule.onNodeWithTag("reset_button").performClick()
composeTestRule.onNodeWithTag("WidgetEditReset").performClick()
assert(resetClicked)
}

Expand Down Expand Up @@ -152,7 +152,7 @@ class FactsEditContentTest {

// Assert all tagged elements exist
composeTestRule.onNodeWithTag("facts_edit_screen").assertExists()
composeTestRule.onNodeWithTag("main_content").assertExists()
composeTestRule.onNodeWithTag("WidgetEditScrollView").assertExists()
composeTestRule.onNodeWithTag("edit_description").assertExists()
composeTestRule.onNodeWithTag("title_setting_row").assertExists()
composeTestRule.onNodeWithTag("title_text").assertExists()
Expand All @@ -166,8 +166,8 @@ class FactsEditContentTest {
composeTestRule.onNodeWithTag("source_toggle_icon", useUnmergedTree = true).assertExists()
composeTestRule.onNodeWithTag("source_divider").assertExists()
composeTestRule.onNodeWithTag("buttons_row").assertExists()
composeTestRule.onNodeWithTag("reset_button").assertExists()
composeTestRule.onNodeWithTag("preview_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEditReset").assertExists()
composeTestRule.onNodeWithTag("WidgetEditPreview").assertExists()
}

@Test
Expand All @@ -189,7 +189,7 @@ class FactsEditContentTest {
}
}

composeTestRule.onNodeWithTag("reset_button").assertIsEnabled()
composeTestRule.onNodeWithTag("WidgetEditReset").assertIsEnabled()
}

@Test
Expand All @@ -211,7 +211,7 @@ class FactsEditContentTest {
}
}

composeTestRule.onNodeWithTag("reset_button").assertIsNotEnabled()
composeTestRule.onNodeWithTag("WidgetEditReset").assertIsNotEnabled()
}

@Test
Expand Down Expand Up @@ -243,10 +243,10 @@ class FactsEditContentTest {
composeTestRule.onNodeWithTag("source_toggle_button").performClick()
assert(sourceClicked)

composeTestRule.onNodeWithTag("reset_button").performClick()
composeTestRule.onNodeWithTag("WidgetEditReset").performClick()
assert(resetClicked)

composeTestRule.onNodeWithTag("preview_button").performClick()
composeTestRule.onNodeWithTag("WidgetEditPreview").performClick()
assert(previewClicked)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,23 @@ class FactsPreviewContentTest {
composeTestRule.onNodeWithTag("widget_description").assertExists()

// Verify settings and preview section
composeTestRule.onNodeWithTag("edit_settings_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEdit").assertExists()
composeTestRule.onNodeWithTag("preview_label").assertExists()
composeTestRule.onNodeWithTag("fact_card").assertExists()

// Verify buttons
composeTestRule.onNodeWithTag("buttons_row").assertExists()
composeTestRule.onNodeWithTag("delete_button").assertExists()
composeTestRule.onNodeWithTag("save_button").assertExists()
composeTestRule.onNodeWithTag("WidgetDelete").assertExists()
composeTestRule.onNodeWithTag("WidgetSave").assertExists()

// Test button clicks
composeTestRule.onNodeWithTag("edit_settings_button").performClick()
composeTestRule.onNodeWithTag("WidgetEdit").performClick()
assert(editClicked)

composeTestRule.onNodeWithTag("delete_button").performClick()
composeTestRule.onNodeWithTag("WidgetDelete").performClick()
assert(deleteClicked)

composeTestRule.onNodeWithTag("save_button").performClick()
composeTestRule.onNodeWithTag("WidgetSave").performClick()
assert(saveClicked)
}

Expand Down Expand Up @@ -105,11 +105,11 @@ class FactsPreviewContentTest {
composeTestRule.onNodeWithTag("buttons_row").assertExists()

// Delete button should not exist when widget is disabled
composeTestRule.onNodeWithTag("delete_button").assertDoesNotExist()
composeTestRule.onNodeWithTag("save_button").assertExists()
composeTestRule.onNodeWithTag("WidgetDelete").assertDoesNotExist()
composeTestRule.onNodeWithTag("WidgetSave").assertExists()

// Test save button click
composeTestRule.onNodeWithTag("save_button").performClick()
composeTestRule.onNodeWithTag("WidgetSave").performClick()
assert(saveClicked)
}

Expand Down Expand Up @@ -137,7 +137,7 @@ class FactsPreviewContentTest {

// Assert that all elements still exist with custom preferences
composeTestRule.onNodeWithTag("facts_preview_screen").assertExists()
composeTestRule.onNodeWithTag("edit_settings_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEdit").assertExists()
composeTestRule.onNodeWithTag("fact_card").assertExists()
}

Expand Down Expand Up @@ -168,12 +168,12 @@ class FactsPreviewContentTest {
composeTestRule.onNodeWithTag("widget_icon").assertExists()
composeTestRule.onNodeWithTag("widget_description").assertExists()
composeTestRule.onNodeWithTag("divider").assertExists()
composeTestRule.onNodeWithTag("edit_settings_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEdit").assertExists()
composeTestRule.onNodeWithTag("preview_label").assertExists()
composeTestRule.onNodeWithTag("fact_card").assertExists()
composeTestRule.onNodeWithTag("buttons_row").assertExists()
composeTestRule.onNodeWithTag("delete_button").assertExists()
composeTestRule.onNodeWithTag("save_button").assertExists()
composeTestRule.onNodeWithTag("WidgetDelete").assertExists()
composeTestRule.onNodeWithTag("WidgetSave").assertExists()
}

@Test
Expand Down Expand Up @@ -226,8 +226,8 @@ class FactsPreviewContentTest {
// Assert core elements still exist
composeTestRule.onNodeWithTag("facts_preview_screen").assertExists()
composeTestRule.onNodeWithTag("fact_card").assertExists()
composeTestRule.onNodeWithTag("save_button").assertExists()
composeTestRule.onNodeWithTag("delete_button").assertDoesNotExist()
composeTestRule.onNodeWithTag("WidgetSave").assertExists()
composeTestRule.onNodeWithTag("WidgetDelete").assertDoesNotExist()
}

@Test
Expand Down Expand Up @@ -276,6 +276,6 @@ class FactsPreviewContentTest {
}

// Assert edit button shows custom state
composeTestRule.onNodeWithTag("edit_settings_button").assertExists()
composeTestRule.onNodeWithTag("WidgetEdit").assertExists()
}
}
Loading