Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,17 @@ function createTestFile(targetDir: string, testDir: string, language: Language):
? `import { test, expect } from '@mobilewright/test';`
: `const { test, expect } = require('@mobilewright/test');`;

const content = `${importLine}

test('app launches and shows home screen', async ({ screen }) => {
await expect(screen.getByText('Welcome')).toBeVisible();
});
`;
const content = [
"// this is a skeleton test for mobilewright (see https://github.com/mobile-next/mobilewright/blob/main/README.md)",
"// for documentation see: https://mobilewright.dev/docs/",
"// for agent skill see: https://github.com/mobile-next/mobilewright-skill",
importLine,
"",
"test('app launches and shows home screen', async ({ screen }) => {",
" await expect(screen.getByText('Welcome')).toBeVisible();",
"});",
"",
].join("\n");
fs.writeFileSync(path.join(fullTestDir, `example.spec.${ext}`), content);
}

Expand Down
Loading