Results 1 to 2 of 2

Thread: [ERROR] [orion] TypeError: Ext.require is not a function at Object.<anonymous>

  1. #1

    Default [ERROR] [orion] TypeError: Ext.require is not a function at Object.<anonymous>

    I am getting the error listed in the Title but I am not sure why.

    Error
    Code:
    [ERROR] [model/browser/SandboxBrowser-24] [ERROR] [orion] TypeError: Ext.require is not a function at Object.<anonymous> (E:\*****\workspace\test\New_Scenario_1\Test.js:3:17) at Object.call (C:\Program Files\Sencha\Test\2_2_1_83\resources\app.asar\node_modules\orion-core\serve\orion.js:1095:30) at Object.invoke (C:\Program Files\Sencha\Test\2_2_1_83\resources\app.asar\node_modules\orion-core\serve\orion.js:1201:16) at Object.me.wrapperFn (C:\Program Files\Sencha\Test\2_2_1_83\resources\app.asar\node_modules\orion-core\serve\orion.js:1022:16) at attemptAsync (C:\Program Files\Sencha\Test\2_2_1_83\resources\app.asar\node_modules\orion-core\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:2942:26) at QueueRunner.run (C:\Program Files\Sencha\Test\2_2_1_83\resources\app.asar\node_modules\orion-core\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:2890:9) at QueueRunner.execute (C:\Program Files\Sencha\Test\2_2_1_83\resources\app.asar\node_modules\orion-core\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:2878:10) at queueRunnerFactory (C:\Program Files\Sencha\Test\2_2_1_83\resources\app.asar\node_modules\orion-core\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:715:35) at Object.fn (C:\Program Files\Sencha\Test\2_2_1_83\resources\app.asar\node_modules\orion-core\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:3602:13) at attemptAsync (C:\Program Files\Sencha\Test\2_2_1_83\resources\app.asar\node_modules\orion-core\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:2942:26)

    Here is my full code
    Code:
    describe("Test", function () {
        beforeAll(function(done) {
                Ext.require('Ext.ux.ajax.*', function() {
                    Ext.ux.ajax.SimManager.init({
                        delay: 300
                    }).register({
                        '/auth/login': {
                            type: 'json',
                            method: 'POST',
                            data: [{
                                username: 'user',
                                password: 'pass'
                            }]
                        }
                    });
                    
                    done();
                });
            });
        
    
    
        it("should pass", function () {
            expect(1).toBe(1);
        });
    });

  2. #2
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    298
    Answers
    41

    Default

    Is this within a WebDriver scenario? If so, please note that you can't make use of Ext JS APIs within WebDriver tests, as the tests are run separately from the browser. In order to use Ext JS APIs, you need to use an In-Browser scenario, where the tests run side-by-side with your app code in the browser.

    WebDriver scenarios only allow you to use the Sencha Test Futures APIs. Please see the documentation for more details on the differences: https://docs.sencha.com/sencha_test/...webdriver.html, and this guide on how to choose between the different types of scenarios: https://docs.sencha.com/sencha_test/...ing_a_scenario.
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •