Skip to content

Commit ccc1b1d

Browse files
committed
chore: Add debug capabilities
1 parent cd43cdf commit ccc1b1d

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.changeset/brave-fireants-rush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@phantom/synpress': patch
3+
---
4+
5+
Add debug

commands/phantom.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ module.exports = {
307307

308308
await playwright.switchToWindow(PROVIDER);
309309

310+
if (process.env.DEBUG != null) {
311+
await playwright
312+
.windows(PROVIDER)
313+
.on('console', msg => console.log(msg.text()));
314+
}
315+
310316
await playwright.windows(PROVIDER).evaluate(walletState => {
311317
// eslint-disable-next-line no-undef
312318
chrome.storage.local.set(walletState);
@@ -351,6 +357,12 @@ module.exports = {
351357

352358
await playwright.switchToWindow(PROVIDER);
353359

360+
if (process.env.DEBUG != null) {
361+
await playwright
362+
.windows(PROVIDER)
363+
.on('console', msg => console.log(msg.text()));
364+
}
365+
354366
const isImportButtonVisible = await playwright
355367
.windows(PROVIDER)
356368
.locator(firstTimeFlowPageElements.importWalletButton)

0 commit comments

Comments
 (0)