@ihyeon/flow-qa 0.10.12 → 0.10.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.
- package/dist/src/report.js +2 -1
- package/dist/src/ui/public/app.js +7 -3
- package/package.json +1 -1
package/dist/src/report.js
CHANGED
|
@@ -7,7 +7,8 @@ import { localized, localizeProductMessage } from "./i18n.js";
|
|
|
7
7
|
import { idSchema } from "./schema.js";
|
|
8
8
|
import { targetLabel } from "./targets.js";
|
|
9
9
|
export const RUN_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
10
|
-
|
|
10
|
+
// Saved reports include step results for each attempt in addition to the suite's checks.
|
|
11
|
+
export const MAX_SAVED_REPORT_BYTES = 16 * 1024 * 1024;
|
|
11
12
|
const archiveEnvelopeSchema = z.object({
|
|
12
13
|
schemaVersion: z.literal('flow-qa/report-1'), runId: z.string().regex(RUN_ID), suiteId: idSchema,
|
|
13
14
|
parentRunId: z.string().regex(RUN_ID).optional(),
|
|
@@ -229,10 +229,10 @@
|
|
|
229
229
|
$('target-select').firstChild.value = '';
|
|
230
230
|
for (const target of app.state?.targets || []) { const option = el('option', '', targetDisplay(target)); option.value = target.name; $('target-select').append(option); }
|
|
231
231
|
if ((app.state?.targets || []).some((x) => x.name === selected)) $('target-select').value = selected;
|
|
232
|
-
if (previousFingerprint !== app.displayTargets.find((item) => item.name === selected)?.targetFingerprint) $('review-checkbox').checked = false;
|
|
233
232
|
targetDescription();
|
|
234
233
|
const list = $('target-list'); replace(list);
|
|
235
234
|
for (const target of app.state?.targets || []) { const row = el('div', 'settings-entry'); row.append(el('strong', '', target.name), document.createTextNode(` · ${targetLabel(target)}${target.description ? ` · ${target.description}` : ''}`)); list.append(row); }
|
|
235
|
+
return previousFingerprint !== selectedTarget()?.targetFingerprint;
|
|
236
236
|
}
|
|
237
237
|
function targetDescription() { const target = selectedTarget(); $('target-description').textContent = target ? `${targetLabel(target)}${target.description ? ` · ${target.description}` : ''}` : t('scenario.targetHint'); readiness(); }
|
|
238
238
|
async function syncScriptForTarget() {
|
|
@@ -652,7 +652,11 @@
|
|
|
652
652
|
// A newer poll can satisfy the pending settings refresh.
|
|
653
653
|
const refreshSettings = pendingSettingsRefresh !== 0 && request >= pendingSettingsRefresh;
|
|
654
654
|
if (refreshSettings) pendingSettingsRefresh = 0;
|
|
655
|
-
if (refreshSettings || initialize) {
|
|
655
|
+
if (refreshSettings || initialize) {
|
|
656
|
+
const targetChanged = targetOptions();
|
|
657
|
+
modelForms();
|
|
658
|
+
if (targetChanged) void syncScriptForTarget();
|
|
659
|
+
}
|
|
656
660
|
if (previousActive?.kind === 'run' && !state.active) { if (state.lastError) notice(state.lastError, true); else noticeKey('app.runEnded'); }
|
|
657
661
|
if (state.lastError && state.lastError !== app.lastError) { app.lastError = state.lastError; notice(state.lastError, true); }
|
|
658
662
|
await validateComparisonSelection(state);
|
|
@@ -991,7 +995,7 @@
|
|
|
991
995
|
async function saveModel(event) { event.preventDefault(); const form = event.currentTarget; await work(async () => { const values = new FormData(form); const body = { role: form.dataset.role, baseURL: String(values.get('baseURL') || '').trim(), model: String(values.get('model') || '').trim() }; const apiKeyEnv = String(values.get('apiKeyEnv') || '').trim(); if (apiKeyEnv) body.apiKeyEnv = apiKeyEnv; await api('/api/models', body); await refresh(true); noticeKey('app.modelSaved'); }); }
|
|
992
996
|
async function clearModel(role) { await work(async () => { await api('/api/models', { role, clear: true }); await refresh(true); noticeKey('app.modelCleared'); }); }
|
|
993
997
|
function targetFields() { const mobile = $('target-kind').value !== 'web'; for (const [id, required] of [['target-url-field', !mobile], ['target-bundle-field', mobile], ['target-device-field', mobile]]) { const field = $(id); field.hidden = !required; field.querySelector('input').required = required; } }
|
|
994
|
-
async function saveTarget(event) { event.preventDefault(); const form = event.currentTarget; await work(async () => { const values = new FormData(form); const kind = String(values.get('kind') || 'web'); const body = { name: String(values.get('name') || '').trim(), description: String(values.get('description') || '').trim() }; if (kind === 'web') body.url = String(values.get('url') || '').trim(); else { body.kind = 'mobile'; body.platform = kind; body.bundleId = String(values.get('bundleId') || '').trim(); body.device = String(values.get('device') || '').trim(); } await api('/api/targets', body); form.reset(); targetFields(); await refresh(true);
|
|
998
|
+
async function saveTarget(event) { event.preventDefault(); const form = event.currentTarget; await work(async () => { const values = new FormData(form); const kind = String(values.get('kind') || 'web'); const body = { name: String(values.get('name') || '').trim(), description: String(values.get('description') || '').trim() }; if (kind === 'web') body.url = String(values.get('url') || '').trim(); else { body.kind = 'mobile'; body.platform = kind; body.bundleId = String(values.get('bundleId') || '').trim(); body.device = String(values.get('device') || '').trim(); } await api('/api/targets', body); form.reset(); targetFields(); await refresh(true); noticeKey('app.targetSaved'); }); }
|
|
995
999
|
function renderLanguage() {
|
|
996
1000
|
const editedModels = [...document.querySelectorAll('.model-form')].map((form) => ({ role: form.dataset.role, values: Object.fromEntries([...form.querySelectorAll('input')].map((input) => [input.name, input.value])) }));
|
|
997
1001
|
const focusedModel = document.activeElement?.closest?.('.model-form');
|