Skip to content

Conversation

@david-livefront
Copy link
Collaborator

🎟️ Tracking

N/A

📔 Objective

This PR cleans up a bunch of tests that were using isDisplayed() and isNotDisplayed() instead of the assertisDisplayed() and assertIsNotDisplayed(). This change ensures the tests are properly checking if the item is in fact visible or not.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@david-livefront david-livefront marked this pull request as ready for review November 10, 2025 22:23

composeTestRule.onNodeWithText("Email").assertDoesNotExist()
composeTestRule.onNodeWithText("Authenticator App").isDisplayed()
composeTestRule.onNodeWithText("Authenticator app").assertIsDisplayed()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test was checking for inaccurate text previously but without the assertion, it was still passing

@claude
Copy link
Contributor

claude bot commented Nov 10, 2025

Claude finished @david-livefront's task —— View job


Overall Assessment: APPROVE

This PR correctly converts non-asserting display checks to proper assertions, improving test reliability by ensuring visibility checks actually fail when elements aren't in the expected state.

Key Findings

Finding 1: Test was checking incorrect text without assertions - now fixed

The TwoFactorLoginScreenTest was checking for "Authenticator App" (capital 'A') without asserting, so it passed despite the actual UI showing "Authenticator app" (lowercase 'a'). Both the assertion and text are now correct.

Finding 2: Semantic change from isNotDisplayed to assertIsDisplayed needs verification

FoldersScreenTest.kt:114 changed from checking the empty state is NOT displayed to asserting it IS displayed. Based on test context, this appears correct, but please verify as it's a behavioral change beyond just adding assertions.

Finding 3: Test removed entirely rather than fixed

VerifyPasswordScreenTest had a test for password visibility toggling that was removed rather than fixed with proper assertions. Consider whether this functionality still needs test coverage.

See inline comments for details on each finding.


composeTestRule
.onNodeWithText("There are no folders to list.")
.isNotDisplayed()
.assertIsDisplayed()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test was backwards, this text should be displayed when the list is empty.

"security policy may restrict importing items from Bitwarden to another app."
composeTestRule
.onNodeWithText(
text = "You don't have any accounts you can import from.",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hard to tell here but this uses a quote and should have had a curly quote.

@github-actions
Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Detailsdcc76725-dc4e-4180-8805-c13820e2ca8b

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.99%. Comparing base (7a6a493) to head (edcd086).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6153   +/-   ##
=======================================
  Coverage   84.99%   84.99%           
=======================================
  Files         723      723           
  Lines       52740    52740           
  Branches     7649     7649           
=======================================
  Hits        44824    44824           
  Misses       5243     5243           
  Partials     2673     2673           

☔ 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.

@david-livefront david-livefront added this pull request to the merge queue Nov 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 10, 2025
@SaintPatrck SaintPatrck added this pull request to the merge queue Nov 11, 2025
Merged via the queue into main with commit 8010e8d Nov 11, 2025
25 of 45 checks passed
@SaintPatrck SaintPatrck deleted the test-clean-up branch November 11, 2025 14:45
dev-sharma3624 pushed a commit to dev-sharma3624/android that referenced this pull request Nov 12, 2025
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.

4 participants