I'm trying to run my existing Protractor script using Serenity-JS.
In order to do so, I followed the internet's instructions and added the following to my config after installing Serenity-JS ('npm install -g serenity-js', plus the required 'npm install -g mocha --save-dev');
exports.config = {
framework: 'custom',
frameworkPath: require.resolve('serenity-js'),
// ...
}
The framework is attempting to run my test but does not seem to recognize my beforeAll().
I get the following error:
ReferenceError: beforeAll is not defined
My Protractor script which is referenced by my conf file contains the following code at the start:
var generic = require('./generic.js');
var tools = new generic.Tools();
describe('Testscript 1', function () {
beforeAll( function () {
//Open none angular site
browser.driver.get('http://localhost/');
browser.driver.findElement(by.xpath('//*[@id="url"]/option[4]')).click();
browser.driver.findElement(by.xpath('//*[@id="submit"]')).click();
});
beforeEach(function () {
browser.refresh();
});
I'm totally new to a framework around Protractor, so I have no idea where to look.
Can someone please point me in the right direction?
Thanks in advance!