Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 23, 2025

Description (required)

Fixes broken unit tests for PR #6553.

This PR addresses CI failures blocking #6553 (French caption detection feature):

Manifest merger conflict

Test builds failed due to appComponentFactory attribute conflict between main and test manifests. Added explicit override in app/src/test/AndroidManifest.xml:

<application
    tools:replace="android:appComponentFactory"
    android:appComponentFactory="androidx.core.app.CoreComponentFactory" />

Invalid test index fix

UploadActivityUnitTests.testOnNextButtonClicked was calling onNextButtonClicked(-1) with an invalid index, causing an IndexOutOfBoundsException. Fixed the test to use a valid index 0 instead.

Tests performed (required)

All 1536 unit tests passing on ProdDebug and BetaDebug variants.

./gradlew testProdDebugUnitTest  # 1536 tests, 100% pass
./gradlew testBetaDebugUnitTest  # 1536 tests, 100% pass

Screenshots (for UI changes only)

N/A - test infrastructure changes only


Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.

Original prompt

Create a PR against this one: #6553. Fix the broken unit tests and maybe even implement the possible TODOs in the PR description. There's already a PR for kotlin 2.1.0 migration, so skip that TODO. Make sure all the unit tests pass before you commit your changes


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix broken unit tests and implement TODOs from previous PR Fix broken unit tests in French caption detection PR Nov 23, 2025
Copilot finished work on behalf of RitikaPahwa4444 November 23, 2025 09:14
@RitikaPahwa4444 RitikaPahwa4444 marked this pull request as ready for review November 23, 2025 10:04
@RitikaPahwa4444
Copy link
Collaborator

@copilot are the changes in UploadActivity.kt really necessary? If not, remove and re-run the tests and fix any remaining issues.

Copy link
Contributor Author

Copilot AI commented Nov 25, 2025

@copilot are the changes in UploadActivity.kt really necessary? If not, remove and re-run the tests and fix any remaining issues.

You're right - the UploadActivity.kt changes weren't necessary. The root cause was the test testOnNextButtonClicked() passing an invalid index -1. I've reverted all UploadActivity.kt changes and fixed the test to use a valid index 0 instead. All 1536 tests pass. See commit 7138e02.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • commons.wikimedia.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Djava.awt.headless=true -Djava.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib:/home/REDACTED/work/apps-android-commons/apps-android-commons/app/src/testProdDebug/jniLibs:/home/REDACTED/work/apps-android-commons/apps-android-commons/app/src/testDebug/jniLibs:/hom (dns block)
  • example.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Djava.awt.headless=true -Djava.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib:/home/REDACTED/work/apps-android-commons/apps-android-commons/app/src/testProdDebug/jniLibs:/home/REDACTED/work/apps-android-commons/apps-android-commons/app/src/testDebug/jniLibs:/hom (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of RitikaPahwa4444 November 25, 2025 14:26
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.

2 participants