Add hierarchy logging to test failures

This commit is contained in:
Tim Perry
2025-07-08 16:12:40 +02:00
parent 88ac21a3d5
commit 1065a613a9
+11
View File
@@ -135,6 +135,17 @@ describe('Test Android unpinning', function () {
});
}
afterEach(async function (this: Mocha.Context) {
if (this.currentTest?.state === 'failed') {
console.log('Test failed');
if (driver) {
const source = await driver.getPageSource().catch((e) => e.message);
console.log('Current page source:', source);
}
}
});
afterEach(async () => {
if (driver) {
await driver.deleteSession();