In T390949 we introduced changes that broke the "Add interlanguage links" functionality for logged-in users for pages that didn't already have links. This was reported as a regression in T390949 and the bug was fixed in production with a backport (https://gerrit.wikimedia.org/r/c/1134190).
To avoid similar such regressions in the future, add a test of the functionality to an existing testsuite / test suites. QUnit tests might be the simplest (and should be able to catch a bug like this), but integration tests would catch a broader range of possible failures.
Acceptance Criteria
- Tests of the interlanguage links functionality exist, run and pass in CI (minimumly that the popup loads)
- Modifying the code to revert https://gerrit.wikimedia.org/r/c/1134190 causes the tests to fail
Note: There are no integration tests for this as its complicated, this topic will be handled in TBD