How to use the gemini-core.BrowserAgent function in gemini-core

To help you get started, we’ve selected a few gemini-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gemini-testing / gemini / test / unit / runner / browser-runner / index.js View on Github external
it('should pass to suite runner browser agent associated with current browser', () => {
            const browserAgent = new BrowserAgent('browser');
            const suiteCollection = new SuiteCollection([makeSuiteStub({browsers: ['browser']})]);

            sandbox.stub(BrowserAgent, 'create');
            BrowserAgent.create.returns(browserAgent);

            const runner = mkRunner_('browser');

            return runner.run(suiteCollection)
                .then(() => assert.calledWith(suiteRunnerFabric.create, sinon.match.any, browserAgent));
        });
github gemini-testing / gemini / test / unit / runner / browser-runner / index.js View on Github external
it('should create browser agent instance for each suite', () => {
            const suiteCollection = new SuiteCollection([
                makeSuiteStub({browsers: ['bro']}),
                makeSuiteStub({browsers: ['bro']})
            ]);
            sandbox.spy(BrowserAgent, 'create');

            return mkRunner_('bro')
                .run(suiteCollection)
                .then(() => {
                    assert.calledTwice(BrowserAgent.create);
                    assert.notEqual(
                        suiteRunnerFabric.create.firstCall.args[1],
                        suiteRunnerFabric.create.secondCall.args[1]
                    );
                });
        });
github gemini-testing / gemini / test / unit / runner / browser-runner / index.js View on Github external
it('should pass to suite runner browser agent associated with current browser', () => {
            const browserAgent = new BrowserAgent('browser');
            const suiteCollection = new SuiteCollection([makeSuiteStub({browsers: ['browser']})]);

            sandbox.stub(BrowserAgent, 'create');
            BrowserAgent.create.returns(browserAgent);

            const runner = mkRunner_('browser');

            return runner.run(suiteCollection)
                .then(() => assert.calledWith(suiteRunnerFabric.create, sinon.match.any, browserAgent));
        });
github gemini-testing / gemini / test / unit / runner / suite-runner / skipped-suite-runner.js View on Github external
const mkRunner_ = (suite, browserId) => {
        suite = suite || util.makeSuiteStub();

        const browserAgent = new BrowserAgent();
        browserAgent.browserId = browserId || 'default-browser';

        return new SkippedSuiteRunner(suite, browserAgent);
    };
github gemini-testing / hermione / test / lib / runner / mocha-runner / mocha-builder.js View on Github external
beforeEach(() => {
        sandbox.stub(BrowserAgent, 'create');

        sandbox.stub(SingleTestMochaAdapter, 'create').returns({tests: []});

        sandbox.stub(MochaAdapter, 'prepare');
        sandbox.stub(MochaAdapter, 'create').callsFake(() => mkMochaAdapterStub_());
        sandbox.stub(MochaAdapter.prototype, 'applySkip').returnsThis();
        sandbox.stub(MochaAdapter.prototype, 'loadFiles');
    });
github gemini-testing / hermione / test / lib / runner / mocha-runner / index.js View on Github external
const createMochaRunner_ = () => {
        return new MochaRunner(
            'bro',
            makeConfigStub({browsers: ['bro']}),
            sinon.createStubInstance(BrowserAgent),
            sinon.createStubInstance(TestSkipper)
        );
    };
github gemini-testing / gemini / test / unit / runner / suite-runner / regular-suite-runner.js View on Github external
const mkRunner_ = (suite, browserId) => {
        const browserAgent = new BrowserAgent();
        browserAgent.browserId = browserId || browser.id;

        return RegularSuiteRunner.create(
            suite || makeSuiteStub(),
            browserAgent
        );
    };
github gemini-testing / gemini / test / unit / runner / suite-runner / insistent-suite-runner.js View on Github external
const mkBrowserAgentStub_ = (browserId) => {
        const browserAgent = new BrowserAgent();
        browserAgent.browserId = browserId || 'default-bro';
        return browserAgent;
    };