frisby icon indicating copy to clipboard operation
frisby copied to clipboard

TypeError: Cannot read property 'addExpectationResult' of undefined at Env.fail

Open neelay opened this issue 6 years ago • 1 comments

I have a simple login frisby testcase. this is one of the examples, i am running this in jenkins, randomly on or the other test case fails with error below.

       it('##EWA_314: Login with registered non admin user and should return correct response', 
        function (done) {
         frisby
            .post(loginEndpoint, data.non_admin_login_payload)
            .expect('status', 200)
           // .expect('json', data.non_admin_response)
            .expect('json','user.name',data.non_admin_response.user.name)
            .expect('json','user.orgConfig.showSettings','true')
            .done(done);

        });

TypeError: Cannot read property 'addExpectationResult' of undefined at Env.fail (/var/lib/jenkins/workspace/qa_api_testing/api_testing/node_modules/jest-jasmine2/build/jasmine/Env.js:522:24) at fail (/var/lib/jenkins/workspace/qa_api_testing/api_testing/node_modules/jest-jasmine2/build/jasmine/jasmine_light.js:116:23) at /var/lib/jenkins/workspace/qa_api_testing/api_testing/tests/login_registration/test_register.js:88:11 at _fetch._fetch.catch.err (/var/lib/jenkins/workspace/qa_api_testing/api_testing/node_modules/frisby/src/frisby/spec.js:242:57) at at process._tickCallback (internal/process/next_tick.js:188:7)

neelay avatar Mar 06 '18 13:03 neelay

@neelay

Please adjust Jasmine timeout in either way.(default: 5[ms])

  • set jasmine.DEFAULT_TIMEOUT_INTERVAL.
  • set 3rd argument in it().

https://jasmine.github.io/api/2.6/global.html#it

H1Gdev avatar Mar 18 '18 11:03 H1Gdev