I am setting up what I THINK is a simple e2e test for my Angular 8 app. I am trying to learn BDD, so I tried swapping out Jasmine for Cucumber since it uses language more consistent with BDD.
When I run Protractor using Jasmine, the test passes:
this works:
navigateTo () {
return browser.get(browser.baseUrl) as Promise<any>;
}
When I run a cucumber version of the test, I get an error.
this fails:
Given ('Evidentia4 is running', (done) => {
browser.get (browser.baseUrl)
.then (done ());
});
"Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined."
The protractor config:
exports.config = {
allScriptsTimeout: 61000,
getPageTimeout: 60000,
specs: [
'./src/features/**/*.feature'
],
capabilities: {
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
cucumberOpts: {
require: 'features/step-definitions/app-step-definitions.js',
tags: false,
format: 'node_modules/cucumber-pretty',
profile: false,
'no-source': true
}
};
I've read up on the error but have no idea why I am getting it.