Skip to content

test: Implement tests for Navigation history dialog#4811

Open
harshsomankar123-tech wants to merge 3 commits intokiwix:mainfrom
harshsomankar123-tech:dialog
Open

test: Implement tests for Navigation history dialog#4811
harshsomankar123-tech wants to merge 3 commits intokiwix:mainfrom
harshsomankar123-tech:dialog

Conversation

@harshsomankar123-tech
Copy link
Copy Markdown
Contributor

@harshsomankar123-tech harshsomankar123-tech commented Apr 9, 2026

FIX #4809

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.67%. Comparing base (0298e5f) to head (1fbf95e).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4811      +/-   ##
============================================
+ Coverage     60.62%   60.67%   +0.05%     
- Complexity     1667     1675       +8     
============================================
  Files           333      333              
  Lines         16037    16037              
  Branches       2224     2224              
============================================
+ Hits           9722     9731       +9     
+ Misses         4843     4830      -13     
- Partials       1472     1476       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@harshsomankar123-tech
Copy link
Copy Markdown
Contributor Author

@MohitMaliFtechiz Please Take A look

* click interactions, app bar integration, and action menu state.
*/
@RunWith(AndroidJUnit4::class)
class NavigationHistoryDialogScreenTest {
Copy link
Copy Markdown
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@harshsomankar123-tech The testing setup is good. But I have a question. Why are we not writing these test cases with Robolectric as we did for ReaderScreenComposableTest? These tests will run on an emulator, which takes more time. Is there any reason behind it?

There are detekt issue please fix that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MohitMaliFtechiz, thank you for the review!

You're absolutely right. Since these are pure Compose UI tests (rendering, clicks, callbacks) and don't require any device-specific features, there's no reason to run them as instrumentation tests on an emulator.
I will make changes with Robolectric Test PTAL
Thanks for catching this!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add UI tests for NavigationHistoryDialogScreen Compose components

2 participants