Skip to content

[openvino-notes][TEST] add UI testing environment and AppNavigationTest - #1183

Open
strelkovkm wants to merge 2 commits into
openvinotoolkit:masterfrom
strelkovkm:on-013-01-test-compose
Open

strelkovkm wants to merge 2 commits into
openvinotoolkit:masterfrom
strelkovkm:on-013-01-test-compose

Conversation

@strelkovkm

Copy link
Copy Markdown

ON-013: Add UI testing environment for the :view module

Description of Changes

As part of task ON-013, configured a headless UI testing environment for the :view module screens using Robolectric and Jetpack Compose Test Rule (ui-test-junit4).

  1. Build System & Dependencies:

    • gradle/libs.versions.toml: Added catalog entries for androidx.compose.ui:ui-test-junit4 and ui-test-manifest.
    • view/build.gradle.kts: Enabled isIncludeAndroidResources = true and added test dependencies for robolectric, androidx.test.core, androidx.test.ext.junit, ui-test-junit4, and ui-test-manifest.
  2. Test Fixtures:

    • FakeNotes.kt: Updated FakeNotesService and FakeFolderService to persist created items in memory and emit updates through Flow, allowing UI components to observe note mutations.
  3. Tests:

    • AppCompositionTest.kt: Added a test verifying that AppComposition initializes without network access or Google OAuth configuration.
    • AppNavigationTest.kt (new file): Implemented Compose UI tests using createComposeRule() and @RunWith(RobolectricTestRunner::class):
      • Verified rendering and tab switching in bottom navigation (Notes, Folders, Sync, Settings, Assistant).
      • Verified that clicking the "New" button invokes FakeNotesService.create(...) exactly once.
      • Verified SignedOut state rendering and LaunchGoogleSignIn effect emission on sign-in action.

Verification Commands & Results

  1. Unit & UI Tests:
    ./gradlew :app:testDebugUnitTest :view:testDebugUnitTest

Result: BUILD SUCCESSFUL (All tests in :app and :view passed).

@strelkovkm
strelkovkm requested a review from a team as a code owner October 14, 2026 14:25
@github-actions github-actions Bot added the category: OpenVINO Notes OpenVINO Notes module (modules/openvino-notes) label Oct 14, 2026
@strelkovkm
strelkovkm marked this pull request as draft October 14, 2026 14:33
@strelkovkm
strelkovkm force-pushed the on-013-01-test-compose branch from 9f7ab38 to 503c0ac Compare October 14, 2026 14:35
@strelkovkm
strelkovkm marked this pull request as ready for review October 14, 2026 14:37
@allnes

allnes commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

please resolve conflicts

@strelkovkm

Copy link
Copy Markdown
Author

please resolve conflicts

resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: OpenVINO Notes OpenVINO Notes module (modules/openvino-notes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants