fix: improve global.js/Socket.js init parity
Ic661358cd47600ec9c3a329bef361b8087483017 prevented us from executing cypress tests with accessibility enabled when in calc. Unfortunately, it omitted to make the same change in the logic which sets accessibilityState in Socket.js Signed-off-by: Skyler Grey <skyler.grey@collabora.com> Change-Id: Ic0e201c6402c1c22717e789a8bcf24579c07d414
This commit is contained in:
parent
98035fedb5
commit
cb6cf1314b
2 changed files with 11 additions and 2 deletions
|
@ -1306,7 +1306,7 @@ window.app = {
|
|||
if (L.Browser.cypressTest && isCalcTest)
|
||||
global.enableAccessibility = false;
|
||||
|
||||
var accessibilityState = global.prefs.getBoolean('accessibilityState', false);
|
||||
var accessibilityState = global.prefs.getBoolean('accessibilityState');
|
||||
accessibilityState = accessibilityState || (L.Browser.cypressTest && !isCalcTest);
|
||||
msg += ' accessibilityState=' + accessibilityState;
|
||||
|
||||
|
|
|
@ -250,8 +250,17 @@ app.definitions.Socket = L.Class.extend({
|
|||
const darkTheme = window.prefs.getBoolean('darkTheme');
|
||||
msg += ' darkTheme=' + darkTheme;
|
||||
|
||||
var isCalcTest =
|
||||
window.docURL.includes('data/desktop/calc/') ||
|
||||
window.docURL.includes('data/mobile/calc/') ||
|
||||
window.docURL.includes('data/idle/calc/') ||
|
||||
window.docURL.includes('data/multiuser/calc/');
|
||||
|
||||
if (L.Browser.cypressTest && isCalcTest)
|
||||
window.enableAccessibility = false;
|
||||
|
||||
var accessibilityState = window.prefs.getBoolean('accessibilityState');
|
||||
accessibilityState = accessibilityState || L.Browser.cypressTest;
|
||||
accessibilityState = accessibilityState || (L.Browser.cypressTest && !isCalcTest);
|
||||
msg += ' accessibilityState=' + accessibilityState;
|
||||
|
||||
this._doSend(msg);
|
||||
|
|
Loading…
Reference in a new issue