@cqa-lib/cqa-ui 1.1.503 → 1.1.504
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/esm2020/lib/test-case-details/api-mocking-card/api-mocking-card.component.mjs +41 -33
- package/esm2020/lib/test-case-details/test-case-details-edit/test-case-details-edit.component.mjs +33 -6
- package/esm2020/lib/test-case-details/test-case-details.component.mjs +12 -4
- package/fesm2015/cqa-lib-cqa-ui.mjs +84 -41
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +84 -41
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/test-case-details/api-mocking-card/api-mocking-card.component.d.ts +23 -28
- package/lib/test-case-details/test-case-details-edit/test-case-details-edit.component.d.ts +16 -9
- package/lib/test-case-details/test-case-details.component.d.ts +6 -2
- package/package.json +1 -1
|
@@ -12,15 +12,14 @@ export interface ApiMockingCardToggleChange {
|
|
|
12
12
|
/**
|
|
13
13
|
* Dual-mode card summarising the API mocking configuration of a test case.
|
|
14
14
|
*
|
|
15
|
-
* The card surfaces
|
|
16
|
-
*
|
|
15
|
+
* The card surfaces TWO independent flags — `restoreMock` (the "Use mock API responses" row)
|
|
16
|
+
* and `storeMock` (the "Renew and store API responses" row). Both can be off simultaneously
|
|
17
|
+
* (no mocking on the next run); turning either one on forces the other off (they're mutually
|
|
18
|
+
* exclusive in the on-state). Both can never be on at the same time.
|
|
17
19
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* In read-only mode both rows show a value text ("On"/"Off") derived from `restoreMock`.
|
|
22
|
-
* In edit mode both rows render a toggle; interacting with either one flips `restoreMock`
|
|
23
|
-
* and the card emits `restoreMockChange` so the parent can persist the new value.
|
|
20
|
+
* In read-only mode each row shows On/Off derived from its own flag. In edit mode each row
|
|
21
|
+
* renders a toggle; the card emits `restoreMockChange` and `storeMockChange` whenever a value
|
|
22
|
+
* actually changes so the parent can persist them.
|
|
24
23
|
*/
|
|
25
24
|
export declare class ApiMockingCardComponent {
|
|
26
25
|
title: string;
|
|
@@ -29,11 +28,10 @@ export declare class ApiMockingCardComponent {
|
|
|
29
28
|
captureHint: string;
|
|
30
29
|
renewLabel: string;
|
|
31
30
|
renewHint: string;
|
|
32
|
-
/**
|
|
33
|
-
* Single source of truth for the card's dual-toggle state.
|
|
34
|
-
* Defaults to `false` → Capture is ON, Renew is OFF.
|
|
35
|
-
*/
|
|
31
|
+
/** "Use mock API responses" row state. Mutually exclusive with `storeMock` when true. */
|
|
36
32
|
restoreMock: boolean;
|
|
33
|
+
/** "Renew and store API responses" row state. Mutually exclusive with `restoreMock` when true. */
|
|
34
|
+
storeMock: boolean;
|
|
37
35
|
mockedApisCount: number;
|
|
38
36
|
totalApisCount: number;
|
|
39
37
|
progressPercent: number;
|
|
@@ -50,33 +48,30 @@ export declare class ApiMockingCardComponent {
|
|
|
50
48
|
/** Hint shown in read-only mode when no mock data exists yet (`showProgress` is false). */
|
|
51
49
|
noDataHint: string;
|
|
52
50
|
configure: EventEmitter<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Emitted whenever the effective `restoreMock` value changes (either row's toggle was
|
|
55
|
-
* interacted with in edit mode). Parent components should persist this value — e.g. under
|
|
56
|
-
* `testCase.mockApiSettings.restoreMock`.
|
|
57
|
-
*/
|
|
51
|
+
/** Emitted whenever `restoreMock` changes (Use-mock row toggled). */
|
|
58
52
|
restoreMockChange: EventEmitter<boolean>;
|
|
59
|
-
|
|
53
|
+
/** Emitted whenever `storeMock` changes (Renew-and-store row toggled). */
|
|
54
|
+
storeMockChange: EventEmitter<boolean>;
|
|
60
55
|
get captureEnabled(): boolean;
|
|
61
|
-
get
|
|
56
|
+
get renewEnabled(): boolean;
|
|
62
57
|
get captureValueText(): string;
|
|
58
|
+
get renewValueText(): string;
|
|
63
59
|
get computedSummaryText(): string;
|
|
64
60
|
get computedPercentText(): string;
|
|
65
61
|
get progressWidth(): string;
|
|
66
62
|
onConfigureClick(): void;
|
|
67
63
|
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* Renew OFF → restoreMock = false (Capture ON — mutual exclusivity).
|
|
64
|
+
* "Use mock API responses" toggle. Turning it on forces `storeMock` off (mutual exclusivity);
|
|
65
|
+
* turning it off leaves the other row alone.
|
|
71
66
|
*/
|
|
72
|
-
|
|
67
|
+
onCaptureToggle(value: boolean): void;
|
|
73
68
|
/**
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* Capture OFF → restoreMock = true (Renew ON — mutual exclusivity).
|
|
69
|
+
* "Renew and store API responses" toggle. Turning it on forces `restoreMock` off; turning
|
|
70
|
+
* it off leaves the other row alone.
|
|
77
71
|
*/
|
|
78
|
-
|
|
72
|
+
onRenewToggle(value: boolean): void;
|
|
79
73
|
private setRestoreMock;
|
|
74
|
+
private setStoreMock;
|
|
80
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApiMockingCardComponent, never>;
|
|
81
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ApiMockingCardComponent, "cqa-api-mocking-card", never, { "title": "title"; "statusLabel": "statusLabel"; "captureLabel": "captureLabel"; "captureHint": "captureHint"; "renewLabel": "renewLabel"; "renewHint": "renewHint"; "restoreMock": "restoreMock"; "mockedApisCount": "mockedApisCount"; "totalApisCount": "totalApisCount"; "progressPercent": "progressPercent"; "summaryText": "summaryText"; "percentText": "percentText"; "configureButtonLabel": "configureButtonLabel"; "editing": "editing"; "showProgress": "showProgress"; "noDataHint": "noDataHint"; }, { "configure": "configure"; "restoreMockChange": "restoreMockChange"; }, never, never>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ApiMockingCardComponent, "cqa-api-mocking-card", never, { "title": "title"; "statusLabel": "statusLabel"; "captureLabel": "captureLabel"; "captureHint": "captureHint"; "renewLabel": "renewLabel"; "renewHint": "renewHint"; "restoreMock": "restoreMock"; "storeMock": "storeMock"; "mockedApisCount": "mockedApisCount"; "totalApisCount": "totalApisCount"; "progressPercent": "progressPercent"; "summaryText": "summaryText"; "percentText": "percentText"; "configureButtonLabel": "configureButtonLabel"; "editing": "editing"; "showProgress": "showProgress"; "noDataHint": "noDataHint"; }, { "configure": "configure"; "restoreMockChange": "restoreMockChange"; "storeMockChange": "storeMockChange"; }, never, never>;
|
|
82
77
|
}
|
|
@@ -53,12 +53,10 @@ export interface TestCaseDetailsEditFormData {
|
|
|
53
53
|
testDataSetIndex?: number | string | null;
|
|
54
54
|
configSections: TestCaseDetailsConfigSection[];
|
|
55
55
|
configSectionsRow2: TestCaseDetailsConfigSection[];
|
|
56
|
-
/**
|
|
57
|
-
* Mock API toggle state when the API Mocking card is shown in edit mode.
|
|
58
|
-
* true → Renew API responses ON, Capture API responses OFF
|
|
59
|
-
* false → Renew API responses OFF, Capture API responses ON
|
|
60
|
-
*/
|
|
56
|
+
/** "Use mock API responses" row state. Mutually exclusive with `apiMockingStoreMock` when true. */
|
|
61
57
|
apiMockingRestoreMock?: boolean;
|
|
58
|
+
/** "Renew and store API responses" row state. Mutually exclusive with `apiMockingRestoreMock` when true. */
|
|
59
|
+
apiMockingStoreMock?: boolean;
|
|
62
60
|
}
|
|
63
61
|
export declare class TestCaseDetailsEditComponent implements OnInit, OnChanges {
|
|
64
62
|
private cdr;
|
|
@@ -102,6 +100,8 @@ export declare class TestCaseDetailsEditComponent implements OnInit, OnChanges {
|
|
|
102
100
|
* false → Renew OFF, Capture ON
|
|
103
101
|
*/
|
|
104
102
|
apiMockingRestoreMock: boolean;
|
|
103
|
+
/** "Renew and store API responses" — mutually exclusive with `apiMockingRestoreMock` when true. */
|
|
104
|
+
apiMockingStoreMock: boolean;
|
|
105
105
|
apiMockingMockedApisCount: number;
|
|
106
106
|
apiMockingTotalApisCount: number;
|
|
107
107
|
apiMockingProgressPercent: number;
|
|
@@ -133,8 +133,10 @@ export declare class TestCaseDetailsEditComponent implements OnInit, OnChanges {
|
|
|
133
133
|
}>;
|
|
134
134
|
/** Emitted when user adds a new custom label via the "New" option. */
|
|
135
135
|
labelAdded: EventEmitter<string>;
|
|
136
|
-
/** Emitted when the user flips
|
|
136
|
+
/** Emitted when the user flips the "Use mock API responses" toggle. */
|
|
137
137
|
apiMockingRestoreMockChange: EventEmitter<boolean>;
|
|
138
|
+
/** Emitted when the user flips the "Renew and store API responses" toggle. */
|
|
139
|
+
apiMockingStoreMockChange: EventEmitter<boolean>;
|
|
138
140
|
constructor(cdr: ChangeDetectorRef);
|
|
139
141
|
/** Form state */
|
|
140
142
|
editDescription: string;
|
|
@@ -143,6 +145,8 @@ export declare class TestCaseDetailsEditComponent implements OnInit, OnChanges {
|
|
|
143
145
|
editLabels: string[];
|
|
144
146
|
/** Local edit-mode mirror of the `restoreMock` boolean. Seeded from @Input() on init/changes. */
|
|
145
147
|
editApiMockingRestoreMock: boolean;
|
|
148
|
+
/** Local edit-mode mirror of the `storeMock` boolean. */
|
|
149
|
+
editApiMockingStoreMock: boolean;
|
|
146
150
|
testCaseTimeout: string;
|
|
147
151
|
waitTimeoutLocators: string;
|
|
148
152
|
autoWaitEnabled: boolean;
|
|
@@ -229,10 +233,13 @@ export declare class TestCaseDetailsEditComponent implements OnInit, OnChanges {
|
|
|
229
233
|
private buildSavePayload;
|
|
230
234
|
/**
|
|
231
235
|
* Handler bound to the embedded `<cqa-api-mocking-card>` `restoreMockChange` output.
|
|
232
|
-
* Keeps the local edit-mode mirror in sync
|
|
233
|
-
*
|
|
236
|
+
* Keeps the local edit-mode mirror in sync (including the mutual-exclusivity rule —
|
|
237
|
+
* turning Use-mock on forces store-mock off) and re-emits to the parent so the save
|
|
238
|
+
* payload reflects the new state.
|
|
234
239
|
*/
|
|
235
240
|
onApiMockingRestoreMockChange(value: boolean): void;
|
|
241
|
+
/** Mirror handler for the "Renew and store API responses" toggle. Mutually exclusive with Use-mock. */
|
|
242
|
+
onApiMockingStoreMockChange(value: boolean): void;
|
|
236
243
|
private resolveToOptionValue;
|
|
237
244
|
private normalizeBooleanSelectValue;
|
|
238
245
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -252,5 +259,5 @@ export declare class TestCaseDetailsEditComponent implements OnInit, OnChanges {
|
|
|
252
259
|
};
|
|
253
260
|
getLabelCloseIconColor(_label: string): string;
|
|
254
261
|
static ɵfac: i0.ɵɵFactoryDeclaration<TestCaseDetailsEditComponent, never>;
|
|
255
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TestCaseDetailsEditComponent, "cqa-test-case-details-edit", never, { "descriptionTitle": "descriptionTitle"; "descriptionContent": "descriptionContent"; "enableMarkdown": "enableMarkdown"; "metadataItems": "metadataItems"; "labels": "labels"; "configTitle": "configTitle"; "configSections": "configSections"; "configSectionsRow2": "configSectionsRow2"; "isSaving": "isSaving"; "prerequisiteCaseOptions": "prerequisiteCaseOptions"; "platform": "platform"; "isStepGroup": "isStepGroup"; "selectConfigOverrides": "selectConfigOverrides"; "showApiMockingCard": "showApiMockingCard"; "apiMockingTitle": "apiMockingTitle"; "apiMockingStatusLabel": "apiMockingStatusLabel"; "apiMockingCaptureLabel": "apiMockingCaptureLabel"; "apiMockingCaptureHint": "apiMockingCaptureHint"; "apiMockingRenewLabel": "apiMockingRenewLabel"; "apiMockingRenewHint": "apiMockingRenewHint"; "apiMockingRestoreMock": "apiMockingRestoreMock"; "apiMockingMockedApisCount": "apiMockingMockedApisCount"; "apiMockingTotalApisCount": "apiMockingTotalApisCount"; "apiMockingProgressPercent": "apiMockingProgressPercent"; "apiMockingShowProgress": "apiMockingShowProgress"; "apiMockingSummaryText": "apiMockingSummaryText"; "apiMockingPercentText": "apiMockingPercentText"; }, { "save": "save"; "cancel": "cancel"; "selectSearch": "selectSearch"; "selectLoadMore": "selectLoadMore"; "selectOpened": "selectOpened"; "selectionChange": "selectionChange"; "labelAdded": "labelAdded"; "apiMockingRestoreMockChange": "apiMockingRestoreMockChange"; }, never, never>;
|
|
262
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TestCaseDetailsEditComponent, "cqa-test-case-details-edit", never, { "descriptionTitle": "descriptionTitle"; "descriptionContent": "descriptionContent"; "enableMarkdown": "enableMarkdown"; "metadataItems": "metadataItems"; "labels": "labels"; "configTitle": "configTitle"; "configSections": "configSections"; "configSectionsRow2": "configSectionsRow2"; "isSaving": "isSaving"; "prerequisiteCaseOptions": "prerequisiteCaseOptions"; "platform": "platform"; "isStepGroup": "isStepGroup"; "selectConfigOverrides": "selectConfigOverrides"; "showApiMockingCard": "showApiMockingCard"; "apiMockingTitle": "apiMockingTitle"; "apiMockingStatusLabel": "apiMockingStatusLabel"; "apiMockingCaptureLabel": "apiMockingCaptureLabel"; "apiMockingCaptureHint": "apiMockingCaptureHint"; "apiMockingRenewLabel": "apiMockingRenewLabel"; "apiMockingRenewHint": "apiMockingRenewHint"; "apiMockingRestoreMock": "apiMockingRestoreMock"; "apiMockingStoreMock": "apiMockingStoreMock"; "apiMockingMockedApisCount": "apiMockingMockedApisCount"; "apiMockingTotalApisCount": "apiMockingTotalApisCount"; "apiMockingProgressPercent": "apiMockingProgressPercent"; "apiMockingShowProgress": "apiMockingShowProgress"; "apiMockingSummaryText": "apiMockingSummaryText"; "apiMockingPercentText": "apiMockingPercentText"; }, { "save": "save"; "cancel": "cancel"; "selectSearch": "selectSearch"; "selectLoadMore": "selectLoadMore"; "selectOpened": "selectOpened"; "selectionChange": "selectionChange"; "labelAdded": "labelAdded"; "apiMockingRestoreMockChange": "apiMockingRestoreMockChange"; "apiMockingStoreMockChange": "apiMockingStoreMockChange"; }, never, never>;
|
|
256
263
|
}
|
|
@@ -56,6 +56,8 @@ export declare class TestCaseDetailsComponent implements OnInit, OnChanges {
|
|
|
56
56
|
* The two legacy `*CaptureEnabled` / `*RenewEnabled` inputs are no longer used.
|
|
57
57
|
*/
|
|
58
58
|
apiMockingRestoreMock: boolean;
|
|
59
|
+
/** "Renew and store API responses" — mutually exclusive with `apiMockingRestoreMock` when true. */
|
|
60
|
+
apiMockingStoreMock: boolean;
|
|
59
61
|
apiMockingMockedApisCount: number;
|
|
60
62
|
apiMockingTotalApisCount: number;
|
|
61
63
|
apiMockingProgressPercent: number;
|
|
@@ -95,8 +97,10 @@ export declare class TestCaseDetailsComponent implements OnInit, OnChanges {
|
|
|
95
97
|
}>;
|
|
96
98
|
labelAdded: EventEmitter<string>;
|
|
97
99
|
configureApiMocking: EventEmitter<void>;
|
|
98
|
-
/** Fired when the user flips
|
|
100
|
+
/** Fired when the user flips the Use-mock toggle — emits the new `restoreMock` value. */
|
|
99
101
|
apiMockingRestoreMockChange: EventEmitter<boolean>;
|
|
102
|
+
/** Fired when the user flips the Renew-and-store toggle — emits the new `storeMock` value. */
|
|
103
|
+
apiMockingStoreMockChange: EventEmitter<boolean>;
|
|
100
104
|
onEditClick(): void;
|
|
101
105
|
onSaveChanges(data: TestCaseDetailsEditFormData): void;
|
|
102
106
|
onCancelEdit(): void;
|
|
@@ -107,5 +111,5 @@ export declare class TestCaseDetailsComponent implements OnInit, OnChanges {
|
|
|
107
111
|
/** Text color for metadata value (e.g. red for critical priority) */
|
|
108
112
|
getValueTextClass(item: TestCaseDetailsMetadataItem): string;
|
|
109
113
|
static ɵfac: i0.ɵɵFactoryDeclaration<TestCaseDetailsComponent, never>;
|
|
110
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TestCaseDetailsComponent, "cqa-test-case-details", never, { "editing": "editing"; "startInEditMode": "startInEditMode"; "descriptionTitle": "descriptionTitle"; "descriptionContent": "descriptionContent"; "enableMarkdown": "enableMarkdown"; "showEditButton": "showEditButton"; "metadataItems": "metadataItems"; "labels": "labels"; "configTitle": "configTitle"; "configSections": "configSections"; "configSectionsRow2": "configSectionsRow2"; "platform": "platform"; "isStepGroup": "isStepGroup"; "selectConfigOverrides": "selectConfigOverrides"; "isSaving": "isSaving"; "showApiMockingCard": "showApiMockingCard"; "apiMockingTitle": "apiMockingTitle"; "apiMockingStatusLabel": "apiMockingStatusLabel"; "apiMockingCaptureLabel": "apiMockingCaptureLabel"; "apiMockingRenewLabel": "apiMockingRenewLabel"; "apiMockingCaptureHint": "apiMockingCaptureHint"; "apiMockingRenewHint": "apiMockingRenewHint"; "apiMockingRestoreMock": "apiMockingRestoreMock"; "apiMockingMockedApisCount": "apiMockingMockedApisCount"; "apiMockingTotalApisCount": "apiMockingTotalApisCount"; "apiMockingProgressPercent": "apiMockingProgressPercent"; "apiMockingShowProgress": "apiMockingShowProgress"; "apiMockingSummaryText": "apiMockingSummaryText"; "apiMockingPercentText": "apiMockingPercentText"; "apiMockingConfigureButtonLabel": "apiMockingConfigureButtonLabel"; }, { "editDescription": "editDescription"; "cancel": "cancel"; "saveChanges": "saveChanges"; "metadataLinkClick": "metadataLinkClick"; "selectSearch": "selectSearch"; "selectLoadMore": "selectLoadMore"; "selectOpened": "selectOpened"; "selectionChange": "selectionChange"; "labelAdded": "labelAdded"; "configureApiMocking": "configureApiMocking"; "apiMockingRestoreMockChange": "apiMockingRestoreMockChange"; }, never, never>;
|
|
114
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TestCaseDetailsComponent, "cqa-test-case-details", never, { "editing": "editing"; "startInEditMode": "startInEditMode"; "descriptionTitle": "descriptionTitle"; "descriptionContent": "descriptionContent"; "enableMarkdown": "enableMarkdown"; "showEditButton": "showEditButton"; "metadataItems": "metadataItems"; "labels": "labels"; "configTitle": "configTitle"; "configSections": "configSections"; "configSectionsRow2": "configSectionsRow2"; "platform": "platform"; "isStepGroup": "isStepGroup"; "selectConfigOverrides": "selectConfigOverrides"; "isSaving": "isSaving"; "showApiMockingCard": "showApiMockingCard"; "apiMockingTitle": "apiMockingTitle"; "apiMockingStatusLabel": "apiMockingStatusLabel"; "apiMockingCaptureLabel": "apiMockingCaptureLabel"; "apiMockingRenewLabel": "apiMockingRenewLabel"; "apiMockingCaptureHint": "apiMockingCaptureHint"; "apiMockingRenewHint": "apiMockingRenewHint"; "apiMockingRestoreMock": "apiMockingRestoreMock"; "apiMockingStoreMock": "apiMockingStoreMock"; "apiMockingMockedApisCount": "apiMockingMockedApisCount"; "apiMockingTotalApisCount": "apiMockingTotalApisCount"; "apiMockingProgressPercent": "apiMockingProgressPercent"; "apiMockingShowProgress": "apiMockingShowProgress"; "apiMockingSummaryText": "apiMockingSummaryText"; "apiMockingPercentText": "apiMockingPercentText"; "apiMockingConfigureButtonLabel": "apiMockingConfigureButtonLabel"; }, { "editDescription": "editDescription"; "cancel": "cancel"; "saveChanges": "saveChanges"; "metadataLinkClick": "metadataLinkClick"; "selectSearch": "selectSearch"; "selectLoadMore": "selectLoadMore"; "selectOpened": "selectOpened"; "selectionChange": "selectionChange"; "labelAdded": "labelAdded"; "configureApiMocking": "configureApiMocking"; "apiMockingRestoreMockChange": "apiMockingRestoreMockChange"; "apiMockingStoreMockChange": "apiMockingStoreMockChange"; }, never, never>;
|
|
111
115
|
}
|