Skip to content

ADFA-4313 Fix CompilerTest missing activity_layouteditor.xml fixture#1401

Merged
hal-eisen-adfa merged 2 commits into
stagefrom
ADFA-4313-aaptcompiler-missing-layouteditor-fixture
Jun 23, 2026
Merged

ADFA-4313 Fix CompilerTest missing activity_layouteditor.xml fixture#1401
hal-eisen-adfa merged 2 commits into
stagefrom
ADFA-4313-aaptcompiler-missing-layouteditor-fixture

Conversation

@hal-eisen-adfa

Copy link
Copy Markdown
Collaborator

What

Both tests in subprojects/aaptcompiler/.../CompilerTest.kt referenced a fixture named activity_layouteditor.xml that no longer exists, causing :subprojects:aaptcompiler:testV8DebugUnitTest to fail in the nightly Jacoco/SonarQube analyze.yml run (surfaced after ADFA-4306 / #1385 landed).

  • test simple compilatation -> app/src/main/res/layout/activity_layouteditor.xml
  • test xml processor -> src/test/resources/layout/activity_layouteditor.xml

Root cause

activity_layouteditor.xml only ever lived in the now-deleted layouteditor/ module (removed in 85a1a0713 "Editor fix"). The fixture both tests actually depend on was renamed to activity_editor.xml and already exists in both referenced locations.

Fix

Repoint both tests at the existing activity_editor.xml fixture (two one-line changes). No new files — keeps a single source of truth rather than restoring a duplicate from the deleted module.

Verification

  • ./gradlew :subprojects:aaptcompiler:testV8DebugUnitTest -> tests=2 failures=0 errors=0 (was 2 failing).
  • Full sonarqube-driven suite run locally: the aaptcompiler CompilerTest failures are gone; module failure count dropped by the expected 2. (The :sonarqube upload step fails locally only due to no SONAR_TOKEN, which is expected.)

Closes ADFA-4313.

Point both CompilerTest tests at the existing activity_editor.xml fixture
instead of activity_layouteditor.xml, which was removed along with the
deleted layouteditor/ module during the LayoutEditor refactor. The
renamed fixture already exists in both referenced locations
(app/src/main/res/layout and src/test/resources/layout).

Surfaced by the nightly Jacoco/SonarQube analyze.yml run after ADFA-4306.
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 87f7c725-1986-46fd-8054-f7339711e2d8

📥 Commits

Reviewing files that changed from the base of the PR and between 8082c92 and dec4261.

📒 Files selected for processing (1)
  • subprojects/aaptcompiler/src/test/java/com/itsaky/androidide/aaptcompiler/CompilerTest.kt

📝 Walkthrough

Release Notes

  • Fixes failing unit tests: Resolves 2 failing tests in CompilerTest within the aaptcompiler subproject that were triggered during nightly Jacoco/SonarQube analysis runs
  • Updates test fixture references: Changes both the test simple compilatation and test xml processor tests to reference the correct existing fixture file (activity_editor.xml) instead of the non-existent activity_layouteditor.xml
  • Root cause: The fixture file reference became invalid after the layouteditor module was deleted (following ADFA-4306 merge)
  • No fixture duplication: Reuses existing fixture files located in app/src/main/res/layout/ and src/test/resources/layout/, maintaining a single source of truth rather than duplicating from the deleted module
  • Minimal, low-risk change: Only 2 one-line modifications with no changes to test logic or public API signatures

Note: Verify cleanup of any residual layouteditor module files to prevent future maintenance issues

Walkthrough

Two fixture file path references in CompilerTest are updated from activity_layouteditor.xml to activity_editor.xml. The change affects the resource compilation test and the XML processor test. No test logic, assertions, or public API signatures are modified.

Changes

Test Fixture Path Update

Layer / File(s) Summary
Fixture path rename in both test methods
subprojects/aaptcompiler/src/test/java/com/itsaky/androidide/aaptcompiler/CompilerTest.kt
test simple compilatation and test xml processor both switch the layout XML fixture reference from activity_layouteditor.xml to activity_editor.xml.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A bunny renamed a file one spring day,
activity_layouteditor hopped away,
activity_editor took its place,
Two little tests now run with grace,
The compiler hops on without delay! 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing a test issue by updating fixture file references from a missing file to an existing one.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about the test fixture references being updated and the reason for the fix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ADFA-4313-aaptcompiler-missing-layouteditor-fixture

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hal-eisen-adfa hal-eisen-adfa requested a review from a team June 17, 2026 13:40
@hal-eisen-adfa hal-eisen-adfa merged commit 6145496 into stage Jun 23, 2026
2 checks passed
@hal-eisen-adfa hal-eisen-adfa deleted the ADFA-4313-aaptcompiler-missing-layouteditor-fixture branch June 23, 2026 23:19
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