@afixt/test-utils 1.3.0 → 2.0.0

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.
@@ -273,53 +273,6 @@ describe('formUtils', () => {
273
273
  });
274
274
  });
275
275
 
276
- describe('hasAssociatedLabel', () => {
277
- it('should return true when label[for] matches element id', () => {
278
- document.body.innerHTML = `
279
- <label for="name">Name</label>
280
- <input type="text" id="name">
281
- `;
282
- const input = document.getElementById('name');
283
- expect(formUtils.hasAssociatedLabel(input)).toBe(true);
284
- });
285
-
286
- it('should return false when label[for] matches but label is empty', () => {
287
- document.body.innerHTML = `
288
- <label for="name"> </label>
289
- <input type="text" id="name">
290
- `;
291
- const input = document.getElementById('name');
292
- expect(formUtils.hasAssociatedLabel(input)).toBe(false);
293
- });
294
-
295
- it('should return true when element is wrapped in label with text', () => {
296
- document.body.innerHTML = `
297
- <label>
298
- Username
299
- <input type="text" id="user">
300
- </label>
301
- `;
302
- const input = document.getElementById('user');
303
- expect(formUtils.hasAssociatedLabel(input)).toBe(true);
304
- });
305
-
306
- it('should return false when element has no label association', () => {
307
- document.body.innerHTML = `
308
- <input type="text" id="orphan">
309
- `;
310
- const input = document.getElementById('orphan');
311
- expect(formUtils.hasAssociatedLabel(input)).toBe(false);
312
- });
313
-
314
- it('should return false when element has no id and no wrapping label', () => {
315
- document.body.innerHTML = `
316
- <div><input type="text" id="nolabel"></div>
317
- `;
318
- const input = document.getElementById('nolabel');
319
- expect(formUtils.hasAssociatedLabel(input)).toBe(false);
320
- });
321
- });
322
-
323
276
  describe('getTextContentExcludingControls', () => {
324
277
  it('should return text excluding input elements', () => {
325
278
  document.body.innerHTML = `