From c247886e49f802a9459bb0115f7338ce24396eab Mon Sep 17 00:00:00 2001 From: gmegidish Date: Thu, 30 Apr 2026 10:04:56 +0200 Subject: [PATCH] feat: add link to skill to test file --- src/index.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3ef54f5..0b12a8f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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); }