diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2022-06-21 00:58:28 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2022-06-21 00:58:28 +0300 |
commit | 9ff5655f6e212cef6f006487f158244410c309fb (patch) | |
tree | bf37bac5efacf3e53964f6ee549580fdb4d1348c /test | |
parent | 3e672740f396b5c4a2fa7038ed3b23b9f1a481a2 (diff) |
Assign `AJAX` to the `window` global object
Explicitly sets the AJAX object to the window global object instead of
declaring it with var.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'test')
-rw-r--r-- | test/classes/ScriptsTest.php | 2 | ||||
-rw-r--r-- | test/selenium/TestBase.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/classes/ScriptsTest.php b/test/classes/ScriptsTest.php index 30ad0a4578..37f5e838af 100644 --- a/test/classes/ScriptsTest.php +++ b/test/classes/ScriptsTest.php @@ -52,7 +52,7 @@ class ScriptsTest extends AbstractTestCase $actual ); $this->assertStringContainsString('.add(\'common.js\', 1)', $actual); - $this->assertStringContainsString('AJAX.fireOnload(\'common.js\')', $actual); + $this->assertStringContainsString('window.AJAX.fireOnload(\'common.js\')', $actual); } /** diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php index f1d94b304e..3689609224 100644 --- a/test/selenium/TestBase.php +++ b/test/selenium/TestBase.php @@ -1073,7 +1073,7 @@ JS; $this->webDriver->executeAsyncScript( 'var callback = arguments[arguments.length - 1];' . 'function startWaitingForAjax() {' - . ' if (! AJAX.active) {' + . ' if (! window.AJAX.active) {' . ' callback();' . ' } else {' . ' setTimeout(startWaitingForAjax, 200);' |