Skip to content

Commit ae18771

Browse files
Merge pull request #59 from Contextable/fix-tools-gradle-wrapper
Fix tools gradle wrapper
2 parents 384368a + 18a2661 commit ae18771

File tree

6 files changed

+26
-2
lines changed

6 files changed

+26
-2
lines changed

kotlin-sdk/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ temp/
9393

9494
# Package files
9595
*.jar
96-
!gradle/wrapper/gradle-wrapper.jar
96+
!**/gradle/wrapper/gradle-wrapper.jar
9797
*.war
9898
*.ear
9999
*.zip

kotlin-sdk/examples/chatapp-java/app/src/androidTest/java/com/agui/chatapp/java/ui/SettingsActivityTest.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
import static androidx.test.espresso.matcher.ViewMatchers.*;
2727
import static org.hamcrest.Matchers.*;
2828

29+
import androidx.test.espresso.Espresso;
30+
2931
/**
3032
* Android tests for the multi-agent SettingsActivity.
3133
* Tests agent list UI, CRUD operations, and dialog functionality.
@@ -304,6 +306,10 @@ public void testAgentWithSystemPromptAndDescription() {
304306
public void testDialogCancellation() {
305307
scenario = ActivityScenario.launch(SettingsActivity.class);
306308

309+
// Verify initial empty state
310+
onView(withId(R.id.layoutEmptyState))
311+
.check(matches(isDisplayed()));
312+
307313
// Open add agent dialog
308314
onView(withId(R.id.fabAddAgent))
309315
.perform(click());
@@ -312,11 +318,29 @@ public void testDialogCancellation() {
312318
onView(withId(R.id.editAgentName))
313319
.perform(typeText("Test Agent"));
314320

321+
// Close soft keyboard before clicking Cancel
322+
Espresso.closeSoftKeyboard();
323+
315324
// Cancel dialog
316325
onView(withText("Cancel"))
317326
.perform(click());
318327

319-
// Should remain in empty state (no agents added)
328+
// Wait for any UI transitions to complete
329+
try {
330+
Thread.sleep(100);
331+
} catch (InterruptedException e) {
332+
Thread.currentThread().interrupt();
333+
}
334+
335+
// Verify no agents were actually added to the repository
336+
scenario.onActivity(activity -> {
337+
MultiAgentRepository repo = MultiAgentRepository.getInstance(activity);
338+
java.util.List<AgentProfile> currentAgents = repo.getAgents().getValue();
339+
android.util.Log.d("SettingsActivityTest", "Agents count after cancel: " +
340+
(currentAgents != null ? currentAgents.size() : "null"));
341+
});
342+
343+
// The main assertion: empty state should still be displayed
320344
onView(withId(R.id.layoutEmptyState))
321345
.check(matches(isDisplayed()));
322346
}
44.4 KB
Binary file not shown.
44.4 KB
Binary file not shown.
44.4 KB
Binary file not shown.
57.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)