AC
Size: a a a
AC
B
AV
AV
AV
AV
AV
OS

OS
onPrepare: async () => {
global.SMALL_TIMEOUT = 2000;
//Adding HTML reporter
jasmine.getEnv().addReporter(new AllureReporter({
resultsDir: 'target/screenshots'
}));
jasmine.getEnv().afterEach(function (done) {
browser.takeScreenshot().then(function (png) {
allure.createAttachment('Screenshot', function () {
return new Buffer.from(png, 'base64')
}, 'image/png')();
done();
})
});OS
OS
allure serve target/allure-report
OS

OS
PS
OS
PS
OS
PS
PS
jasmine.getEnv().addReporter(new AllureReporter({
resultsDir: 'allure-results',
}));
jasmine.getEnv().afterEach(async () => {
const png = await browser.takeScreenshot();
const pngBuffer = Buffer.from(png, 'base64');
allure.createAttachment('Screenshot', pngBuffer, 'image/png');
});PS
"scripts": {
"cleanup": "rimraf allure-results allure-report",
"test": "npm run cleanup && protractor conf.js",
"report": "allure generate && allure open",
"lint": "eslint ."
},