While running ng e2e I get the following
✓ should display message saying sign up
✗ should be able to sign up with a valid user
- Failed: unknown error: an X display is required for keycode conversions, consider using Xvfb
(Session info: headless chrome=59.0.3071.71)
(Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 3.13.0-48-generic x86_64)
(Session info: headless chrome=59.0.3071.71)
(Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 3.13.0-48-generic x86_64)
Configuration:
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['show-fps-counter=true', '--no-sandbox', '--headless', '--disable-gpu']
}
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
beforeLaunch: function() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
},
onPrepare() {
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
From the following link, it seems we do not need Xvfb, so what would be the right configuration?
For now followed configuration from here: Using Headless Chrome.