editor tests: Fix failing test on FF Mac by detecting end key behavior