lib-e2e-cypress-for-dummys-ts 0.6.0 → 0.6.1
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/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1867,7 +1867,7 @@ var RecordingService = class {
|
|
|
1867
1867
|
this.interceptors$.next([...ints.slice(0, index), ...ints.slice(index + 1)]);
|
|
1868
1868
|
}
|
|
1869
1869
|
registerInterceptor(method, url, alias) {
|
|
1870
|
-
if (this.isPaused$.getValue()) return;
|
|
1870
|
+
if (!this.isRecording$.getValue() || this.isPaused$.getValue()) return;
|
|
1871
1871
|
const command = `cy.intercept('${method}', '${this.urlToWildcard(url, method)}').as('${alias}')`;
|
|
1872
1872
|
const current = this.interceptors$.getValue();
|
|
1873
1873
|
if (!current.includes(command)) {
|
|
@@ -5431,6 +5431,7 @@ var LibE2eRecorderElement = class extends HTMLElement {
|
|
|
5431
5431
|
_previsualizerRef = null;
|
|
5432
5432
|
httpMonitor;
|
|
5433
5433
|
smartSelectorEnabled = true;
|
|
5434
|
+
_needsRecordingRebuild = false;
|
|
5434
5435
|
recording;
|
|
5435
5436
|
persistence;
|
|
5436
5437
|
translation;
|
|
@@ -5456,7 +5457,10 @@ var LibE2eRecorderElement = class extends HTMLElement {
|
|
|
5456
5457
|
if (!this.getAttribute("data-cy")) {
|
|
5457
5458
|
this.setAttribute("data-cy", "lib-e2e-cypress-for-dummys");
|
|
5458
5459
|
}
|
|
5459
|
-
if (!this.recording
|
|
5460
|
+
if (!this.recording || this._needsRecordingRebuild) {
|
|
5461
|
+
this.recording = new RecordingService();
|
|
5462
|
+
this._needsRecordingRebuild = false;
|
|
5463
|
+
}
|
|
5460
5464
|
if (!this.persistence) this.persistence = new PersistenceService();
|
|
5461
5465
|
if (!this.translation) this.translation = new TranslationService();
|
|
5462
5466
|
this.httpMonitor = new HttpMonitor(this.recording);
|
|
@@ -5497,6 +5501,7 @@ var LibE2eRecorderElement = class extends HTMLElement {
|
|
|
5497
5501
|
if (this.widgetResize) window.removeEventListener("resize", this.widgetResize);
|
|
5498
5502
|
this.httpMonitor?.uninstall();
|
|
5499
5503
|
this.recording.destroy();
|
|
5504
|
+
this._needsRecordingRebuild = true;
|
|
5500
5505
|
}
|
|
5501
5506
|
async initHttpConfig() {
|
|
5502
5507
|
const config = await this.persistence.getConfig("extendedHttpCommands");
|
|
@@ -5708,6 +5713,7 @@ var LibE2eRecorderElement = class extends HTMLElement {
|
|
|
5708
5713
|
widget.setAttribute("data-expand", this.expandDir);
|
|
5709
5714
|
}
|
|
5710
5715
|
beginWidgetDrag(e) {
|
|
5716
|
+
this.suppressNextToggleClick = false;
|
|
5711
5717
|
const origin = this.togglePos ?? defaultTogglePosition(window.innerWidth, window.innerHeight);
|
|
5712
5718
|
this.dragState = { startX: e.clientX, startY: e.clientY, origX: origin.x, origY: origin.y, moved: false };
|
|
5713
5719
|
}
|
|
@@ -5955,7 +5961,9 @@ cypress/ <span style="color:#484f58">${this.translation.translate("RECOR
|
|
|
5955
5961
|
const type = document.getElementById("assert-type").value;
|
|
5956
5962
|
const val = document.getElementById("assert-value").value.trim();
|
|
5957
5963
|
if (!sel) return;
|
|
5958
|
-
const
|
|
5964
|
+
const s = escapeSingleQuotes(sel);
|
|
5965
|
+
const v = escapeSingleQuotes(val);
|
|
5966
|
+
const cmd = NO_VALUE_ASSERTIONS.has(type) || !val ? `cy.get('${s}').should('${type}')` : `cy.get('${s}').should('${type}', '${v}')`;
|
|
5959
5967
|
this.recording.appendCommand(cmd);
|
|
5960
5968
|
document.getElementById("assert-selector").value = "";
|
|
5961
5969
|
document.getElementById("assert-value").value = "";
|
|
@@ -6230,7 +6238,7 @@ if (!customElements.get("lib-e2e-recorder")) {
|
|
|
6230
6238
|
}
|
|
6231
6239
|
|
|
6232
6240
|
// src/index.ts
|
|
6233
|
-
var VERSION = "0.6.
|
|
6241
|
+
var VERSION = "0.6.1";
|
|
6234
6242
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6235
6243
|
0 && (module.exports = {
|
|
6236
6244
|
ACTIVE_SESSION_BREADCRUMB_KEY,
|