Skip to content

Commit 311891b

Browse files
committed
test: remove unnecessary test cases
1 parent 847996e commit 311891b

File tree

1 file changed

+5
-49
lines changed

1 file changed

+5
-49
lines changed

src/__tests__/element-queries.js

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,54 +1191,10 @@ it('gets form controls by label text on IE and other legacy browsers', () => {
11911191
.mockReturnValue(undefined)
11921192

11931193
const {getByLabelText} = renderIntoDocument(`
1194-
<div>
1195-
<label>
1196-
1st<input id="first-id" />
1197-
</label>
1198-
<div>
1199-
<label for="second-id">2nd</label>
1200-
<input id="second-id" />
1201-
</div>
1202-
<div>
1203-
<label id="third-label">3rd</label>
1204-
<input aria-labelledby="third-label" id="third-id" />
1205-
</div>
1206-
<div>
1207-
<label for="fourth.id">4th</label>
1208-
<input id="fourth.id" />
1209-
</div>
1210-
<div>
1211-
<div>
1212-
<label id="fifth-label-one">5th one</label>
1213-
<label id="fifth-label-two">5th two</label>
1214-
<input aria-labelledby="fifth-label-one fifth-label-two" id="fifth-id" />
1215-
</div>
1216-
<div>
1217-
<input id="sixth-label-one" value="6th one"/>
1218-
<input id="sixth-label-two" value="6th two"/>
1219-
<label id="sixth-label-three">6th three</label>
1220-
<input aria-labelledby="sixth-label-one sixth-label-two sixth-label-three" id="sixth-id" />
1221-
</div>
1222-
<div>
1223-
<span id="seventh-label-one">7th one</span>
1224-
<input aria-labelledby="seventh-label-one" id="seventh-id" />
1225-
</div>
1226-
<div>
1227-
<label id="eighth.label">8th one</label>
1228-
<input aria-labelledby="eighth.label" id="eighth.id" />
1229-
</div>
1230-
</div>
1194+
<label>
1195+
Label text
1196+
<input id="input-id" />
1197+
</label>
12311198
`)
1232-
expect(getByLabelText('1st').id).toBe('first-id')
1233-
expect(getByLabelText('2nd').id).toBe('second-id')
1234-
expect(getByLabelText('3rd').id).toBe('third-id')
1235-
expect(getByLabelText('4th').id).toBe('fourth.id')
1236-
expect(getByLabelText('5th one').id).toBe('fifth-id')
1237-
expect(getByLabelText('5th two').id).toBe('fifth-id')
1238-
expect(getByLabelText('6th one').id).toBe('sixth-id')
1239-
expect(getByLabelText('6th two').id).toBe('sixth-id')
1240-
expect(getByLabelText('6th one 6th two').id).toBe('sixth-id')
1241-
expect(getByLabelText('6th one 6th two 6th three').id).toBe('sixth-id')
1242-
expect(getByLabelText('7th one').id).toBe('seventh-id')
1243-
expect(getByLabelText('8th one').id).toBe('eighth.id')
1199+
expect(getByLabelText('Label text').id).toBe('input-id')
12441200
})

0 commit comments

Comments
 (0)