@ihyeon/flow-qa 0.9.11 → 0.9.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/THIRD_PARTY_NOTICES.md +2 -2
  2. package/dist/src/cli.js +13 -4
  3. package/dist/src/compiler.js +14 -5
  4. package/dist/src/engine.js +3 -3
  5. package/dist/src/ui/design-system/components.css +787 -0
  6. package/{node_modules/@hyeonse/design-system/dist → dist/src/ui/design-system}/preferences.js +20 -12
  7. package/{node_modules/@hyeonse/design-system/src → dist/src/ui/design-system}/tokens.css +56 -0
  8. package/dist/src/ui/public/app.js +28 -7
  9. package/dist/src/ui/server.js +39 -12
  10. package/docs/mobile.md +4 -0
  11. package/docs/releases.md +6 -0
  12. package/docs/ui.md +1 -1
  13. package/package.json +2 -5
  14. package/node_modules/@hyeonse/design-system/.github/workflows/ci.yml +0 -21
  15. package/node_modules/@hyeonse/design-system/.npmignore +0 -5
  16. package/node_modules/@hyeonse/design-system/AGENTS.md +0 -10
  17. package/node_modules/@hyeonse/design-system/README.md +0 -67
  18. package/node_modules/@hyeonse/design-system/THIRD_PARTY_NOTICES.md +0 -5
  19. package/node_modules/@hyeonse/design-system/dist/components.css +0 -105
  20. package/node_modules/@hyeonse/design-system/dist/preferences.d.ts +0 -21
  21. package/node_modules/@hyeonse/design-system/dist/react.d.ts +0 -21
  22. package/node_modules/@hyeonse/design-system/dist/react.js +0 -100
  23. package/node_modules/@hyeonse/design-system/dist/tokens.css +0 -75
  24. package/node_modules/@hyeonse/design-system/docs/api.md +0 -33
  25. package/node_modules/@hyeonse/design-system/docs/assets/fonts/dm-sans.woff2 +0 -0
  26. package/node_modules/@hyeonse/design-system/docs/assets/fonts/noto-kr-subset.woff2 +0 -0
  27. package/node_modules/@hyeonse/design-system/docs/audit.md +0 -29
  28. package/node_modules/@hyeonse/design-system/docs/foundations.md +0 -30
  29. package/node_modules/@hyeonse/design-system/docs/verification.md +0 -13
  30. package/node_modules/@hyeonse/design-system/index.html +0 -51
  31. package/node_modules/@hyeonse/design-system/licenses/DM-Sans-LICENSE.txt +0 -93
  32. package/node_modules/@hyeonse/design-system/licenses/Noto-Sans-KR-LICENSE.txt +0 -93
  33. package/node_modules/@hyeonse/design-system/licenses/arla6ka-MIT.txt +0 -21
  34. package/node_modules/@hyeonse/design-system/package.json +0 -35
  35. package/node_modules/@hyeonse/design-system/scripts/audit-tokens.mjs +0 -48
  36. package/node_modules/@hyeonse/design-system/scripts/build.mjs +0 -12
  37. package/node_modules/@hyeonse/design-system/showcase.css +0 -75
  38. package/node_modules/@hyeonse/design-system/showcase.mjs +0 -63
  39. package/node_modules/@hyeonse/design-system/skills/hyeonse-design-system/SKILL.md +0 -18
  40. package/node_modules/@hyeonse/design-system/skills/hyeonse-design-system/references/api.md +0 -7
  41. package/node_modules/@hyeonse/design-system/skills/hyeonse-design-system/references/build.md +0 -7
  42. package/node_modules/@hyeonse/design-system/skills/hyeonse-design-system/references/foundations.md +0 -7
  43. package/node_modules/@hyeonse/design-system/skills/hyeonse-design-system/references/mapping.md +0 -7
  44. package/node_modules/@hyeonse/design-system/skills/hyeonse-design-system/references/migration.md +0 -5
  45. package/node_modules/@hyeonse/design-system/skills/hyeonse-design-system/references/review-docs.md +0 -5
  46. package/node_modules/@hyeonse/design-system/src/components.css +0 -105
  47. package/node_modules/@hyeonse/design-system/src/preferences.ts +0 -87
  48. package/node_modules/@hyeonse/design-system/src/react.tsx +0 -161
  49. package/node_modules/@hyeonse/design-system/tests/audit.test.mjs +0 -30
  50. package/node_modules/@hyeonse/design-system/tests/preferences.test.mjs +0 -86
  51. package/node_modules/@hyeonse/design-system/tsconfig.json +0 -16
  52. /package/{node_modules/@hyeonse → dist/src/ui}/design-system/LICENSE +0 -0
@@ -2,8 +2,8 @@
2
2
 
3
3
  Flow QA uses [tester-army/e2e](https://github.com/tester-army/e2e), `@e2e-dev/web` for browser tests, and `@e2e-dev/mobile` for native iOS and Android tests. Those packages are licensed under Apache-2.0 and retain their upstream LICENSE and NOTICE files in their installed distributions. The mobile engine uses [agent-device](https://github.com/callstack/agent-device), licensed under MIT. Flow QA adds the flow specification, schema validation, orchestration, report interpretation, and local UI; it does not claim authorship of the execution engines.
4
4
 
5
- Flow QA uses `@hyeonse/design-system` from [Hyeonse Design System](https://github.com/hyeonse-swing/hyeonse-design-system), pinned to commit `38978c6a86f422fc0e63e919f600bc2dd3451e5c`. The npm tarball bundles this dependency so consumers do not need Git or GitHub credentials. Its MIT license and notices are preserved in the bundled package. Source checkout installation fetches the pinned public source archive over HTTPS.
5
+ Flow QA uses `@hyeonse/design-system` version 0.4.8 from the [Hyeonse Design System release archive](https://design-system.hyeonse.dev/releases/hyeonse-design-system-0.4.8.tgz) during development and packaging. The Flow QA npm tarball includes copies of its `tokens.css`, `components.css`, and `preferences.js` files alongside its MIT `LICENSE`; it does not include the design-system package or its other dependencies. Installed consumers do not need Git or the design-system source archive. Source checkout installation fetches the versioned public archive over HTTPS.
6
6
 
7
- The local DM Sans and Noto Sans KR font files were copied from that repository's `docs/assets/fonts/` at the same commit. Their licenses are preserved in [DM Sans license](licenses/DM-Sans-LICENSE.txt) and [Noto Sans KR license](licenses/Noto-Sans-KR-LICENSE.txt).
7
+ The local DM Sans and Noto Sans KR font files were copied from that repository's `docs/assets/fonts/` at commit `38978c6a86f422fc0e63e919f600bc2dd3451e5c`. Their licenses are preserved in [DM Sans license](licenses/DM-Sans-LICENSE.txt) and [Noto Sans KR license](licenses/Noto-Sans-KR-LICENSE.txt).
8
8
 
9
9
  The Korean font is a subset and does not cover every Korean character. The UI falls back to installed Korean/system fonts for missing glyphs. No external font service is contacted.
package/dist/src/cli.js CHANGED
@@ -28,7 +28,8 @@ Usage: flow-qa <command> [arguments] [options]
28
28
  Plan cases before target setup; produce a prompt if no model is configured
29
29
  plan <flow.md> --prompt-only Create a prompt for your current AI tool
30
30
  validate <cases.json> Check case structure and assertions
31
- generate <cases.json> [--out test.ts] Generate e2e test code
31
+ generate <cases.json> [--target <name>] [--out test.ts]
32
+ Generate target-aware e2e code (without --target: target-neutral)
32
33
  run <cases.json> --target <name> Run against a registered target and save a QA report
33
34
  [--case <id> ...] Run only the selected case IDs (repeat --case for more)
34
35
  agent-handoff <cases.json> --target <name> [--case <id> ...] [--out directory]
@@ -58,7 +59,8 @@ Local example: flow-qa ui --demo
58
59
  대상 설정 전에 케이스 설계; 모델 미연결 시 프롬프트 생성
59
60
  plan <flow.md> --prompt-only 현재 사용하는 AI에 전달할 프롬프트 생성
60
61
  validate <cases.json> 케이스 구조와 검증 조건 확인
61
- generate <cases.json> [--out test.ts] e2e 테스트 코드 생성
62
+ generate <cases.json> [--target <name>] [--out test.ts]
63
+ 대상별 e2e 코드 생성 (--target 생략 시 대상 중립)
62
64
  run <cases.json> --target <name> 연결한 대상에서 실행하고 QA 리포트 저장
63
65
  [--case <id> ...] 선택한 케이스만 실행 (--case를 반복해 여러 개 선택)
64
66
  agent-handoff <cases.json> --target <name> [--case <id> ...] [--out directory]
@@ -262,8 +264,15 @@ export async function main(args) {
262
264
  }
263
265
  if (command === 'generate') {
264
266
  const output = resolve(workspace, values.out ?? `generated/${suite.id}.e2e.ts`);
265
- await writeOutput(output, compileSuite(suite));
266
- console.log(localized(locale, `Test script: ${output}`, `실행 스크립트: ${output}`));
267
+ const targetName = values.target;
268
+ const target = targetName === undefined ? undefined : (await readConfig(workspace)).targets[targetName];
269
+ if (targetName !== undefined && !target)
270
+ throw new Error(localized(locale, `Target not found: ${targetName}`, `대상을 찾지 못했습니다: ${targetName}`));
271
+ if (target && (suite.platform ?? 'web') !== (target.kind === 'mobile' ? 'mobile' : 'web')) {
272
+ throw new Error(localized(locale, 'The case platform and selected target do not match.', '케이스 플랫폼과 선택한 대상이 일치하지 않습니다.'));
273
+ }
274
+ await writeOutput(output, compileSuite(suite, target));
275
+ console.log(localized(locale, `Test script (${targetName ? `target: ${targetName}` : 'target-neutral; use --target to match a run'}): ${output}`, `실행 스크립트 (${targetName ? `대상: ${targetName}` : '대상 중립; 실행과 일치시키려면 --target 사용'}): ${output}`));
267
276
  return;
268
277
  }
269
278
  if (command === 'agent-handoff') {
@@ -9,10 +9,10 @@ function locatorCode(locator) {
9
9
  const method = { text: 'getByText', label: 'getByLabel', testId: 'getByTestId' }[locator.by];
10
10
  return `screen.${method}(${literal(locator.value)})`;
11
11
  }
12
- function stepCode(step) {
12
+ function stepCode(step, launchApp) {
13
13
  switch (step.type) {
14
14
  case 'open': return `await app.open(${literal(step.path)});`;
15
- case 'launchApp': return 'await app.open();';
15
+ case 'launchApp': return launchApp;
16
16
  case 'back': return 'await app.back();';
17
17
  case 'swipe': return `await screen.swipe({ direction: ${literal(step.direction)} });`;
18
18
  case 'act': return `await agent.act(${literal(step.instruction)});`;
@@ -38,9 +38,16 @@ export function expectedChecks(testCase) {
38
38
  export function needsAgent(suite) {
39
39
  return suite.cases.some((testCase) => !testCase.questions.length && testCase.steps.some((step) => step.type === 'act' || step.type === 'assertAgent'));
40
40
  }
41
- export function compileSuite(suite) {
41
+ export function compileSuite(suite, target) {
42
42
  const parsed = suiteSchema.parse(suite);
43
43
  const mobile = parsed.platform === 'mobile';
44
+ // Android Settings may keep a system process alive after force-stop. The
45
+ // mobile SDK's app.open() requires that process to disappear, so use its
46
+ // supported foreground launch for this one built-in app.
47
+ const settings = mobile && target?.kind === 'mobile' && target.platform === 'android' && target.bundleId === 'com.android.settings';
48
+ const launchApp = settings
49
+ ? 'await device.home();\n await device.openApp("com.android.settings");\n if ((await device.foregroundApp()).bundleId !== "com.android.settings") throw new Error("Android Settings did not reach the foreground.");'
50
+ : 'await app.open();';
44
51
  const lines = [`import { test } from '${mobile ? '@e2e-dev/mobile' : '@e2e-dev/web'}';`, "import { expect } from 'e2e';", ''];
45
52
  for (const testCase of parsed.cases) {
46
53
  const title = literal(`[${testCase.id}] ${testCase.title}`);
@@ -49,6 +56,8 @@ export function compileSuite(suite) {
49
56
  continue;
50
57
  }
51
58
  const fixtures = ['app'];
59
+ if (settings)
60
+ fixtures.push('device');
52
61
  if (testCase.steps.some((step) => 'locator' in step || step.type === 'swipe'))
53
62
  fixtures.push('screen');
54
63
  if (testCase.steps.some((step) => step.type === 'assertUrl'))
@@ -58,12 +67,12 @@ export function compileSuite(suite) {
58
67
  lines.push(`test(${title}, async ({ ${fixtures.join(', ')} }) => {`);
59
68
  if (mobile) {
60
69
  if (testCase.steps[0]?.type !== 'launchApp')
61
- lines.push(' await app.open();');
70
+ lines.push(` ${launchApp}`);
62
71
  }
63
72
  else if (testCase.steps[0]?.type !== 'open')
64
73
  lines.push(" await app.open('/');");
65
74
  for (const step of testCase.steps)
66
- lines.push(` ${stepCode(step)}`);
75
+ lines.push(` ${stepCode(step, launchApp)}`);
67
76
  lines.push('});');
68
77
  }
69
78
  return `${lines.join('\n')}\n`;
@@ -21,8 +21,8 @@ function agentCase(testCase) {
21
21
  function packageModule(specifier) {
22
22
  return import.meta.resolve(specifier);
23
23
  }
24
- function compiledTest(suite) {
25
- const source = compileSuite(suite);
24
+ function compiledTest(suite, target) {
25
+ const source = compileSuite(suite, target);
26
26
  return source
27
27
  .replace("from '@e2e-dev/web'", `from ${JSON.stringify(packageModule('@e2e-dev/web'))}`)
28
28
  .replace("from '@e2e-dev/mobile'", `from ${JSON.stringify(packageModule('@e2e-dev/mobile'))}`)
@@ -238,7 +238,7 @@ export async function runSuite(options) {
238
238
  const testFile = path.join(runDir, TEST_FILE);
239
239
  const configFile = path.join(runDir, CONFIG_FILE);
240
240
  const agentAvailable = runnable.some(agentCase);
241
- await writeFile(testFile, compiledTest(executable), { mode: 0o600 });
241
+ await writeFile(testFile, compiledTest(executable, selectedTarget), { mode: 0o600 });
242
242
  await writeFile(configFile, generatedConfig(suite, config, options.targetName, agentAvailable, runId, sdkDevice), { mode: 0o600 });
243
243
  if (options.signal?.aborted) {
244
244
  report = failureReport(context(), 'interrupted', 'An interrupt signal arrived before the run started.');