@ihyeon/flow-qa 0.10.8 → 0.10.9

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.
@@ -5,7 +5,7 @@
5
5
  const t = i18n.t;
6
6
  const names = { scenario: 'nav.scenario', library: 'nav.library', history: 'nav.history', settings: 'nav.settings' };
7
7
  const defaultReportFilter = () => ({ search: '', status: 'all', sort: 'recorded', repeatedOnly: false });
8
- const app = { state: null, connected: false, displayTargets: [], draft: null, selectedCaseIds: new Set(), script: '', neutralScript: '', scriptRevision: 0, savedFile: '', savedHash: '', origin: 'none', sourceFlow: '', boundSource: null, stale: false, dirty: false, busy: false, planning: false, planRequest: 0, stopping: false, report: null, reportParent: null, reportMarkdown: '', selectedRun: '', reportFilter: defaultReportFilter(), rerunOrigin: null, rerunTargetMismatch: false, navigationVersion: 0, comparison: null, comparisonRequest: 0, comparisonBusy: false, comparisonStatus: 'comparison.selectBoth', comparisonPins: { baseline: null, current: null }, comparisonSelectionGeneration: 0, comparisonValidation: null, history: { runs: [], nextCursor: null, pagesLoaded: 0, loaded: false, loading: false, request: 0, debounce: null, kind: null, error: null, updatesAvailable: false, pendingRecentUpdate: false, parentRunId: '' }, view: 'scenario' };
8
+ const app = { state: null, connected: false, displayTargets: [], draft: null, selectedCaseIds: new Set(), script: '', neutralScript: '', scriptRevision: 0, savedFile: '', savedHash: '', origin: 'none', sourceFlow: '', boundSource: null, stale: false, dirty: false, busy: false, planning: false, planRequest: 0, stopping: false, report: null, reportParent: null, reportMarkdown: '', selectedRun: '', reportRequest: 0, reportLoading: false, reportFilter: defaultReportFilter(), rerunOrigin: null, rerunTargetMismatch: false, navigationVersion: 0, comparison: null, comparisonRequest: 0, comparisonBusy: false, comparisonStatus: 'comparison.selectBoth', comparisonPins: { baseline: null, current: null }, comparisonSelectionGeneration: 0, comparisonValidation: null, history: { runs: [], nextCursor: null, pagesLoaded: 0, loaded: false, loading: false, request: 0, debounce: null, kind: null, error: null, updatesAvailable: false, pendingRecentUpdate: false, parentRunId: '' }, view: 'scenario' };
9
9
 
10
10
  function el(tag, className, value) {
11
11
  const node = document.createElement(tag);
@@ -732,7 +732,35 @@
732
732
  catch (error) { showError(error); }
733
733
  finally { app.stopping = false; readiness(); }
734
734
  }
735
- async function loadReport(runId) { await work(async () => { const result = await api(`/api/report?runId=${encodeURIComponent(runId)}`); if (app.selectedRun !== runId) app.reportFilter = defaultReportFilter(); app.report = result.report; app.reportParent = result.parentRun || null; app.reportMarkdown = result.markdown; app.selectedRun = runId; renderReport(); readiness(); $('report-panel').hidden = false; $('report-panel').scrollIntoView({ behavior: 'smooth', block: 'start' }); }); }
735
+ async function loadReport(runId) {
736
+ if (app.busy && !app.reportLoading) return;
737
+ const request = ++app.reportRequest;
738
+ app.reportLoading = true;
739
+ app.busy = true;
740
+ readiness();
741
+ notice('');
742
+ try {
743
+ const result = await api(`/api/report?runId=${encodeURIComponent(runId)}`);
744
+ if (request !== app.reportRequest) return;
745
+ if (app.selectedRun !== runId) app.reportFilter = defaultReportFilter();
746
+ app.report = result.report;
747
+ app.reportParent = result.parentRun || null;
748
+ app.reportMarkdown = result.markdown;
749
+ app.selectedRun = runId;
750
+ renderReport();
751
+ readiness();
752
+ $('report-panel').hidden = false;
753
+ $('report-panel').scrollIntoView({ behavior: 'smooth', block: 'start' });
754
+ } catch (error) {
755
+ if (request === app.reportRequest) showError(error);
756
+ } finally {
757
+ if (request === app.reportRequest) {
758
+ app.reportLoading = false;
759
+ app.busy = false;
760
+ readiness();
761
+ }
762
+ }
763
+ }
736
764
  async function prepareFailedCases() { await work(async () => {
737
765
  const runId = app.selectedRun;
738
766
  const report = app.report;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ihyeon/flow-qa",
3
- "version": "0.10.8",
3
+ "version": "0.10.9",
4
4
  "license": "MIT",
5
5
  "author": "Hyeonse Im",
6
6
  "repository": {