Open
Description
I have a set of screenshot tests using Angular Catalyst that pass when run A, B but fail when run B, A; the failure is that the screenshot for A, when run after B, shows the shadow of the dialog that was created for B. (I'm not linking to them because they're internal to Google.)
If I add:
afterEach(async () => {
const dialog = await getHarness(MatDialogHarness, {useDocumentRoot: true});
await dialog.close();
});
to test B, then they pass in either order. The test infrastructure should clean this up automatically to keep the tests hermetic.
@josephperrott indicated that "it is created by an injector which doesn't belong to a specific NgModule so it isn't torn down".