famous-secretary-98668
03/08/2023, 12:21 PMtestIsolation set to true at a global level. I'd like certain describe blocks to run without testIsolation, so that I can run several it commands in sequence, each with an assertion.
According to the docs, I can define testIsolation at a describe level. My interpretation is that is would apply to block only, but it doesn't appear to work like that, or perhaps I'm misunderstanding.
Here's an example, for a given spec file
describe('Some tests', () => {
describe('Test A', { testIsolation: false }, () => {
it('C1: verifies something', () => {
// run some assertion
});
it('C2: verifies something else', () => {
// run some assertion
});
});
describe('Test B', { testIsolation: false } () => {
it('C3: verifies something', () => {
// run some assertion
});
it('C4: verifies something else', () => {
// run some assertion
});
});
});
In this case, I'd expect testIsolation to only be applicable to the "inner" it commands. That is, "Test A" and "Test B" would run in isolation of each other. In practice, I'm observing "Test B" doesn't clear the browser session, etc.
Thanks!incalculable-rainbow-43330
03/08/2023, 12:25 PMfamous-secretary-98668
03/08/2023, 12:34 PMfamous-secretary-98668
03/08/2023, 1:21 PMDefault blank page This page was cleared by navigating to about:blank. All active session data (cookies, localStorage and sessionStorage) across all domains are cleared. doesn't even appearfamous-secretary-98668
03/08/2023, 1:22 PMtestIsolation: false just disables it for the entire specfamous-secretary-98668
03/08/2023, 1:37 PMincalculable-rainbow-43330
03/08/2023, 3:51 PMenough-summer-50273
03/08/2023, 5:49 PMfamous-secretary-98668
03/08/2023, 6:24 PMfamous-secretary-98668
03/08/2023, 6:46 PMdescribe (whether nested or not) should "reset/clear" browser context when testIsolation is true. Only if a describe does override testIsolation: false it should notincalculable-rainbow-43330
03/09/2023, 5:31 AMfamous-secretary-98668
03/09/2023, 4:40 PMincalculable-rainbow-43330
03/10/2023, 5:31 AM