diff --git a/.github/workflows/playwright.yaml b/.github/workflows/playwright.yaml index 7eb5eaad..cda3d60e 100644 --- a/.github/workflows/playwright.yaml +++ b/.github/workflows/playwright.yaml @@ -11,7 +11,7 @@ jobs: matrix: tutorial: - "tests/erc20-paymaster.spec.ts" - - "tests/how-to-test-contracts.spec.ts" + - "tests/how-to-test-contracts.spec.ts" steps: - uses: actions/checkout@v4 @@ -22,4 +22,9 @@ jobs: - name: Install Playwright Browsers run: bun playwright install chromium --with-deps - name: Run test for ${{ matrix.tutorial }} - run: bun test:github ${{ matrix.tutorial }} + run: | + export TERM=xterm-256color + export COLUMNS=80 + export LINES=24 + script -q -c "bun test:github ${{ matrix.tutorial }}" + diff --git a/tests/utils/runCommand.ts b/tests/utils/runCommand.ts index 1dae3516..32e342b2 100644 --- a/tests/utils/runCommand.ts +++ b/tests/utils/runCommand.ts @@ -103,11 +103,12 @@ export async function runWithPrompts(page: Page, command: string, prompts: strin }); ptyProcess.onData((data) => { - process.stdout.write(data); + console.log('DATA:', data); for (let index = 0; index < promptsArray.length; index++) { const promptObject = promptsArray[index]; if (data.includes(promptObject.prompt)) { + console.log('FOUND PROMPT:', promptObject.prompt); ptyProcess.write(promptObject.answer + '\r'); } } @@ -115,5 +116,6 @@ export async function runWithPrompts(page: Page, command: string, prompts: strin ptyProcess.write(command + '\r'); - await page.waitForTimeout(5000); + await page.waitForTimeout(35000); + console.log('waited 35 seconds'); }