Skip to content

Commit

Permalink
docs: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahschwartz committed Sep 18, 2024
1 parent fc38fd4 commit 782f5ec
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ jobs:
export TERM=xterm-256color
export COLUMNS=80
export LINES=24
script -q -c "bun test:github ${{ matrix.tutorial }}"
bun test:github ${{ matrix.tutorial }}
21 changes: 0 additions & 21 deletions code/multisig/LICENSE

This file was deleted.

1 change: 1 addition & 0 deletions tests/configs/native-aa-multisig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const steps: IStepConfig = {
'multisig-contract-code': {
action: 'writeToFile',
filepath: 'tests-output/custom-aa-tutorial/contracts/TwoUserMultisig.sol',
addSpacesAfter: false,
},
'make-factory-contract': {
action: 'runCommand',
Expand Down
4 changes: 2 additions & 2 deletions tests/utils/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { clickCopyButton } from './button';
import { expect, type Page } from '@playwright/test';
import { EOL } from 'os';

export async function writeToFile(page: Page, buttonName: string, filePath: string) {
export async function writeToFile(page: Page, buttonName: string, filePath: string, addSpacesAfter: boolean = true) {
const content = await clickCopyButton(page, buttonName);
writeFileSync(filePath, `${content}\n\n`);
writeFileSync(filePath, addSpacesAfter ? `${content}\n\n` : `${content.trimEnd()}\n`);
}

export async function modifyFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function runTest(page: Page, url: string, config: IStepConfig) {
await page.waitForTimeout(stepData.timeout);
break;
case 'writeToFile':
await writeToFile(page, stepID, stepData.filepath);
await writeToFile(page, stepID, stepData.filepath, stepData.addSpacesAfter);
break;
case 'modifyFile':
await modifyFile(
Expand Down
1 change: 1 addition & 0 deletions tests/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface IWait {
export interface IWriteToFile {
action: 'writeToFile';
filepath: string;
addSpacesAfter?: boolean;
}

export interface IModifyFile {
Expand Down

0 comments on commit 782f5ec

Please sign in to comment.