@ebertjendustries/cstestwrapper 1.0.10 → 1.0.12

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.d.mts CHANGED
@@ -62,6 +62,8 @@ declare abstract class AbstractInputTesting<InputWrapperType extends ElementWrap
62
62
  clear(): void;
63
63
  forceTooLongValidationMessage(repeatedString?: string): Promise<void>;
64
64
  awaitMandatoryMissing(): Promise<void>;
65
+ expectReadOnly(): void;
66
+ expectNotReadOnly(): void;
65
67
  expectEmpty(): void;
66
68
  overwriteAndVerify(value: number | string | undefined): void;
67
69
  expectEnabled(): void;
package/dist/index.d.ts CHANGED
@@ -62,6 +62,8 @@ declare abstract class AbstractInputTesting<InputWrapperType extends ElementWrap
62
62
  clear(): void;
63
63
  forceTooLongValidationMessage(repeatedString?: string): Promise<void>;
64
64
  awaitMandatoryMissing(): Promise<void>;
65
+ expectReadOnly(): void;
66
+ expectNotReadOnly(): void;
65
67
  expectEmpty(): void;
66
68
  overwriteAndVerify(value: number | string | undefined): void;
67
69
  expectEnabled(): void;
package/dist/index.js CHANGED
@@ -166,10 +166,10 @@ var AbstractComponentTesting = class _AbstractComponentTesting {
166
166
  });
167
167
  }
168
168
  expectReadOnly() {
169
- (0, import_vitest.expect)(this.getElement()).toHaveAttribute("readonly", "");
169
+ (0, import_vitest.expect)(this.getElement()).toHaveAttribute("readonly", "true");
170
170
  }
171
171
  expectNotReadOnly() {
172
- (0, import_vitest.expect)(this.getElement()).toHaveAttribute("readonly", null);
172
+ (0, import_vitest.expect)(this.getElement()).not.toHaveAttribute("readonly");
173
173
  }
174
174
  expectChecked() {
175
175
  (0, import_vitest.expect)(this.getElement(), this.msgForExpect()).toBeChecked();
@@ -234,6 +234,13 @@ var AbstractInputTesting = class extends AbstractComponentTesting {
234
234
  const fieldValidityFunction = localiser.getFieldValidityLocalisationFunction();
235
235
  await this.expectErrorMessage(fieldValidityFunction(new import_cswrapper3.FieldSpec("", true), import_cswrapper2.ElementValidityLevel.REQUIRED_VALUE_IS_NOT_PRESENT));
236
236
  }
237
+ expectReadOnly() {
238
+ console.log("LOGGENPOPBEL " + this.getNativeHTMLInput().readOnly);
239
+ (0, import_vitest2.expect)(this.getNativeHTMLInput()).toHaveAttribute("readonly", "true");
240
+ }
241
+ expectNotReadOnly() {
242
+ (0, import_vitest2.expect)(this.getNativeHTMLInput()).not.toHaveAttribute("readonly");
243
+ }
237
244
  expectEmpty() {
238
245
  (0, import_vitest2.expect)(this.getNativeHTMLInput()).toHaveValue(null);
239
246
  }
package/dist/index.mjs CHANGED
@@ -85,10 +85,10 @@ var AbstractComponentTesting = class _AbstractComponentTesting {
85
85
  });
86
86
  }
87
87
  expectReadOnly() {
88
- expect(this.getElement()).toHaveAttribute("readonly", "");
88
+ expect(this.getElement()).toHaveAttribute("readonly", "true");
89
89
  }
90
90
  expectNotReadOnly() {
91
- expect(this.getElement()).toHaveAttribute("readonly", null);
91
+ expect(this.getElement()).not.toHaveAttribute("readonly");
92
92
  }
93
93
  expectChecked() {
94
94
  expect(this.getElement(), this.msgForExpect()).toBeChecked();
@@ -153,6 +153,13 @@ var AbstractInputTesting = class extends AbstractComponentTesting {
153
153
  const fieldValidityFunction = localiser.getFieldValidityLocalisationFunction();
154
154
  await this.expectErrorMessage(fieldValidityFunction(new FieldSpec("", true), ElementValidityLevel.REQUIRED_VALUE_IS_NOT_PRESENT));
155
155
  }
156
+ expectReadOnly() {
157
+ console.log("LOGGENPOPBEL " + this.getNativeHTMLInput().readOnly);
158
+ expect2(this.getNativeHTMLInput()).toHaveAttribute("readonly", "true");
159
+ }
160
+ expectNotReadOnly() {
161
+ expect2(this.getNativeHTMLInput()).not.toHaveAttribute("readonly");
162
+ }
156
163
  expectEmpty() {
157
164
  expect2(this.getNativeHTMLInput()).toHaveValue(null);
158
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebertjendustries/cstestwrapper",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",