Bugs/613059 enable test in codeunit 139965#8579
Conversation
…AreaEnabled test by removing unnecessary records and using LibraryApplicationArea for setup
787f106 to
413b212
Compare
|
…st-in-codeunit-139965
|
Hi @microsoft/d365-bc-engineering-systems, I am facing problems with this PR. My change is tiny: I only edited one test file in src/Apps/W1/Quality Management/test (swapped some manual setup for LibraryApplicationArea.EnableEssentialSetup()). All layers pass except the Build Apps (W1) (Clean) job, which fails with:
What confuses me is that the app.json looks fine to me; everything is 29.0.0.0 and the dependency entries are identical to other test apps that build OK. So I don't think it's my test code or my manifest, but I'm not sure where to look next. I did some digging and I have a suspicion I'd love you to sanity-check: The Clean build seems to wipe every .app from the compiler symbols folder except System.app (in build/projects/Apps (W1)/.AL-Go/PreCompileApp.ps1), and then relies on build/scripts/PreCompileApp.ps1 to recompile the external dependencies via recompileDependencies. In that shared script, the part that recompiles those dependencies in Clean mode looks like it lives inside if($appType -eq 'app'). So I'm wondering: when the thing being compiled is a test app (appType = 'testApp'), does that restore step get skipped? That would explain why Application and Tests-TestLibraries go missing. However, only when an isolated test project is recompiled on its own (which I think is what the incremental modifiedApps build does for my PR). Is that a plausible explanation, or am I misreading how the Clean/incremental build is supposed to feed dependencies to test apps? If my hunch is right, is this something on my side to fix, or is it expected to be handled by the build tooling? Thanks a lot for taking a look 🙏 |
Fixes AB#613059
However, when this fix is merged, we will need to remove NAV/App/DisabledTests/QltyTestsMoreTests.DisabledTest.json from master so the tests gets enabled again and only then the WI will be actually fixed.
Draft PR to NAV created here: https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_git/NAV/pullrequest/248942 the disabler JSON is alredy removed. Therefore we only need now to merge this PR and update the BCApps pointer afterwards.