Evilweed/protractor-beautiful-reporter

afterAll(), beforeAll(), afterEach(), beforeEach() block

Closed this issue · 1 comments

I use in my tests afterAll(), beforeAll(), afterEach(), beforeEach() methods.

When fail after/before Each(), block for IT is failed.

When fail after/before All(), nothing info is in html report.

Perhaps it would be good...
afterAll(), beforeAll(), afterEach(), beforeEach() blocks display as it blocks where they should be displayed.

beforeAll block - passed/failed
beforeEach block - passed/failed
it block - passed/failed
afterEach block - passed/failed
beforeEach block - passed/failed
it2 block - passed/failed
afterEach block - passed/failed
afterAll block - passed/failed

@rebajz we rely on jasmine framework to get the test results. And the bevahior you described seems to be normal. see https://jasmine.github.io/api/3.3/global.
It says:

Be careful, sharing the teardown from a afterAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.

after or before code is only for preparing tests and should not fail.
And It is not meant to be an "it" or to contain an it.