@ebertjendustries/cstestwrapper 1.0.11 → 1.0.13

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,7 +166,7 @@ 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
172
  (0, import_vitest.expect)(this.getElement()).not.toHaveAttribute("readonly");
@@ -234,6 +234,12 @@ 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
+ (0, import_vitest2.expect)(this.getNativeHTMLInput().readOnly).toBeTruthy();
239
+ }
240
+ expectNotReadOnly() {
241
+ (0, import_vitest2.expect)(this.getNativeHTMLInput().readOnly).toBeFalsy();
242
+ }
237
243
  expectEmpty() {
238
244
  (0, import_vitest2.expect)(this.getNativeHTMLInput()).toHaveValue(null);
239
245
  }
package/dist/index.mjs CHANGED
@@ -85,7 +85,7 @@ 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
91
  expect(this.getElement()).not.toHaveAttribute("readonly");
@@ -153,6 +153,12 @@ 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
+ expect2(this.getNativeHTMLInput().readOnly).toBeTruthy();
158
+ }
159
+ expectNotReadOnly() {
160
+ expect2(this.getNativeHTMLInput().readOnly).toBeFalsy();
161
+ }
156
162
  expectEmpty() {
157
163
  expect2(this.getNativeHTMLInput()).toHaveValue(null);
158
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebertjendustries/cstestwrapper",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",