HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/node_modules/protractor/built/driverProviders/mock.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/*
 * This is an mock implementation of the Driver Provider.
 * It returns a fake webdriver and never actually contacts a selenium
 * server.
 */
const q = require("q");
const selenium_webdriver_1 = require("selenium-webdriver");
const driverProvider_1 = require("./driverProvider");
class MockExecutor {
    execute(command) { }
}
exports.MockExecutor = MockExecutor;
class Mock extends driverProvider_1.DriverProvider {
    constructor(config) {
        super(config);
    }
    /**
     * An execute function that returns a promise with a test value.
     */
    execute() {
        let deferred = q.defer();
        deferred.resolve({ value: 'test_response' });
        return deferred.promise;
    }
    /**
     * Configure and launch (if applicable) the object's environment.
     * @public
     * @return {q.promise} A promise which will resolve immediately.
     */
    setupDriverEnv() {
        return q.fcall(function () { });
    }
    /**
     * Create a new driver.
     *
     * @public
     * @override
     * @return webdriver instance
     */
    getNewDriver() {
        let mockSession = new selenium_webdriver_1.Session('test_session_id', {});
        let newDriver = new selenium_webdriver_1.WebDriver(mockSession, new MockExecutor());
        this.drivers_.push(newDriver);
        return newDriver;
    }
}
exports.Mock = Mock;
//# sourceMappingURL=mock.js.map