skopix 2.0.66 → 2.0.68

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.
@@ -1851,7 +1851,14 @@ export async function dashboardCommand(options) {
1851
1851
  const sel = (step.stableSelector || step.selector || '').toLowerCase();
1852
1852
  const allTests = await listAllTests(suitesDir);
1853
1853
  const usages = allTests
1854
- .filter(t => t.steps && t.steps.some(s => (s.stableSelector||s.selector||'').toLowerCase() === sel))
1854
+ .filter(t => t.steps && t.steps.some(s => {
1855
+ const sSel = (s.stableSelector||s.selector||'').toLowerCase();
1856
+ if (!sSel) return false;
1857
+ // Exact match
1858
+ if (sSel === sel) return true;
1859
+ // Similarity match — same element different selector format
1860
+ return stepSimilarity({ selector: sSel }, { selector: sel }) >= 0.7;
1861
+ }))
1855
1862
  .map(t => ({ id: t.id, name: t.name, scope: t.scope }));
1856
1863
  sendJSON(res, 200, usages);
1857
1864
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skopix",
3
- "version": "2.0.66",
3
+ "version": "2.0.68",
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": {
@@ -5870,9 +5870,18 @@ function openMergeSteps() {
5870
5870
  // Override the confirm button
5871
5871
  const actions = document.querySelector('.confirm-actions');
5872
5872
  if (actions) {
5873
- actions.innerHTML = `
5874
- <button class="btn btn-ghost" onclick="closeConfirm()">Cancel</button>
5875
- <button class="btn btn-primary" onclick="confirmMergeSteps(${JSON.stringify(ids)})">Merge</button>`;
5873
+ const mergeBtn = document.createElement('button');
5874
+ mergeBtn.className = 'btn btn-primary';
5875
+ mergeBtn.textContent = 'Merge';
5876
+ mergeBtn.dataset.mergeIds = JSON.stringify(ids);
5877
+ mergeBtn.addEventListener('click', () => confirmMergeSteps(JSON.parse(mergeBtn.dataset.mergeIds)));
5878
+ actions.innerHTML = '';
5879
+ const cancelBtn = document.createElement('button');
5880
+ cancelBtn.className = 'btn btn-ghost';
5881
+ cancelBtn.textContent = 'Cancel';
5882
+ cancelBtn.addEventListener('click', closeConfirm);
5883
+ actions.appendChild(cancelBtn);
5884
+ actions.appendChild(mergeBtn);
5876
5885
  }
5877
5886
  document.getElementById('confirm-overlay').classList.add('open');
5878
5887
  }