-
Notifications
You must be signed in to change notification settings - Fork 1
chore: update ktlint.yml #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [*.{kt,kts}] | ||
| ktlint_standard_function-naming = disabled |
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 |
|---|---|---|
|
|
@@ -28,7 +28,6 @@ import org.junit.runner.RunWith | |
| */ | ||
| @RunWith(AndroidJUnit4::class) | ||
| class ProjectDetailsScreenTest { | ||
|
|
||
| @get:Rule | ||
| val composeTestRule = createComposeRule() | ||
|
|
||
|
|
@@ -72,6 +71,7 @@ class ProjectDetailsScreenTest { | |
| ProjectDetailsScreen( | ||
| project = project, | ||
| onBackClick = {}, | ||
| onEditClick = {}, | ||
| onShareClick = {}, | ||
| ) | ||
| } | ||
|
|
@@ -91,6 +91,7 @@ class ProjectDetailsScreenTest { | |
| ProjectDetailsScreen( | ||
| project = project, | ||
| onBackClick = {}, | ||
| onEditClick = {}, | ||
| onShareClick = {}, | ||
| ) | ||
| } | ||
|
|
@@ -113,6 +114,7 @@ class ProjectDetailsScreenTest { | |
| ProjectDetailsScreen( | ||
| project = project, | ||
| onBackClick = {}, | ||
| onEditClick = {}, | ||
| onShareClick = {}, | ||
| ) | ||
| } | ||
|
|
@@ -133,6 +135,7 @@ class ProjectDetailsScreenTest { | |
| ProjectDetailsScreen( | ||
| project = project, | ||
| onBackClick = {}, | ||
| onEditClick = {}, | ||
| onShareClick = {}, | ||
| ) | ||
| } | ||
|
|
@@ -149,6 +152,7 @@ class ProjectDetailsScreenTest { | |
| ProjectDetailsScreen( | ||
| project = project, | ||
| onBackClick = {}, | ||
| onEditClick = {}, | ||
| onShareClick = { sharedProject = it }, | ||
| ) | ||
| } | ||
|
|
@@ -170,6 +174,7 @@ class ProjectDetailsScreenTest { | |
| ProjectDetailsScreen( | ||
| project = project, | ||
| onBackClick = {}, | ||
| onEditClick = {}, | ||
| onShareClick = {}, | ||
| ) | ||
| } | ||
|
|
@@ -186,6 +191,7 @@ class ProjectDetailsScreenTest { | |
| ProjectDetailsScreen( | ||
| project = project, | ||
| onBackClick = { backClicked = true }, | ||
| onEditClick = {}, | ||
| onShareClick = {}, | ||
| ) | ||
| } | ||
|
|
@@ -194,4 +200,43 @@ class ProjectDetailsScreenTest { | |
|
|
||
| assertEquals(true, backClicked) | ||
| } | ||
| } | ||
|
|
||
| // ------------------------------------------------------------------ | ||
| // Edit button | ||
| // ------------------------------------------------------------------ | ||
|
|
||
| @Test | ||
| fun editButton_isDisplayed() { | ||
| val project = buildProject() | ||
|
|
||
| composeTestRule.setContent { | ||
| ProjectDetailsScreen( | ||
| project = project, | ||
| onBackClick = {}, | ||
| onEditClick = {}, | ||
| onShareClick = {}, | ||
| ) | ||
| } | ||
|
|
||
| composeTestRule.onNodeWithText("Edit Project").assertIsDisplayed() | ||
| } | ||
|
|
||
| @Test | ||
| fun editButton_invokesOnEditClickWithProject() { | ||
| val project = buildProject(id = "edit-test") | ||
| var editedProject: MotionProject? = null | ||
|
|
||
| composeTestRule.setContent { | ||
| ProjectDetailsScreen( | ||
| project = project, | ||
| onBackClick = {}, | ||
| onEditClick = { editedProject = it }, | ||
| onShareClick = {}, | ||
| ) | ||
| } | ||
|
|
||
| composeTestRule.onNodeWithText("Edit Project").performClick() | ||
|
|
||
| assertEquals(project.id, editedProject?.id) | ||
| } | ||
| } | ||
|
Comment on lines
+203
to
+242
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check how the Edit button is actually rendered (Text vs contentDescription-only Icon)
rg -n -A5 -B15 'onEditClick\(project\)' modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/compose/details/ProjectDetailsScreen.kt
rg -n '"Edit Project"' modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/compose/details/ProjectDetailsScreen.ktRepository: tejpratap46/AndroidVideoMotion Length of output: 1033 🏁 Script executed: #!/bin/bash
set -euo pipefail
file="modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/compose/details/ProjectDetailsScreen.kt"
# Show the Edit button block with line numbers
sed -n '196,225p' "$file" | cat -n
# Also show any nearby text labels/semantics for the screen
rg -n '"Edit Project"|"Back"|contentDescription|Text\(' "$file"Repository: tejpratap46/AndroidVideoMotion Length of output: 1289 Use the correct semantics matcher for the Edit button
🤖 Prompt for AI Agents |
||
Uh oh!
There was an error while loading. Please reload this page.