I'm trying to run some e2e tests using protractor
and phantomjs
.
When I run the test I get the error:
- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
The test is:
import { browser, element, by } from 'protractor';
describe('example test', () => {
it('stupid test', () => {
console.log('in test');
expect(true).toBe(true);
});
});
Any idea what the problem is ? any help is welcomed :)
For me (using karma), the specified port in the Karma config file did not match up with the specified port in the protractor config file.
exports.config = {
...,
baseUrl: 'http://localhost:9876/',//<--This port should match the port in your Karma (test runner) config file
framework: 'jasmine',
jasmineNodeOpts: {
defaultTimeoutInterval: 3000,
print: function() {}
}
This answer seemed obvious after I found it, but the ports had gotten changed in source control and the fix wasn't immediately apparent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With