skopix 2.0.89 → 2.0.90

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 (2) hide show
  1. package/package.json +1 -1
  2. package/web/app/index.html +21 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skopix",
3
- "version": "2.0.89",
3
+ "version": "2.0.90",
4
4
  "description": "Browser-based QA tool — record tests by using your app, replay them deterministically, generate Playwright code automatically",
5
5
  "main": "cli/index.js",
6
6
  "bin": {
@@ -6777,10 +6777,30 @@ async function saveBuiltTest() {
6777
6777
  }));
6778
6778
 
6779
6779
  try {
6780
+ showToast('Processing steps...');
6781
+
6782
+ // Run through LLM to generate Playwright code
6783
+ let processedSteps = steps;
6784
+ let playwrightJs = '';
6785
+ let playwrightTs = '';
6786
+ try {
6787
+ const procRes = await fetch(API_BASE + '/api/record/process', {
6788
+ method: 'POST',
6789
+ headers: { 'Content-Type': 'application/json' },
6790
+ body: JSON.stringify({ steps, testName: name, url }),
6791
+ });
6792
+ if (procRes.ok) {
6793
+ const proc = await procRes.json();
6794
+ processedSteps = proc.steps || steps;
6795
+ playwrightJs = proc.playwrightJs || '';
6796
+ playwrightTs = proc.playwrightTs || '';
6797
+ }
6798
+ } catch {}
6799
+
6780
6800
  const res = await fetch(API_BASE + '/api/record/save', {
6781
6801
  method: 'POST',
6782
6802
  headers: { 'Content-Type': 'application/json' },
6783
- body: JSON.stringify({ scope: 'saved', name, url, steps, tags: [] }),
6803
+ body: JSON.stringify({ scope: 'saved', name, url, steps: processedSteps, playwrightJs, playwrightTs, tags: [] }),
6784
6804
  });
6785
6805
  if (!res.ok) throw new Error(await res.text());
6786
6806
  showToast(`Test "${name}" saved`);