mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-23 21:04:36 -05:00
fix(curriculum): allow spaces in book catalog table lab inside elements (#62258)
This commit is contained in:
@@ -50,10 +50,10 @@ Your four `th` elements should have the text `Title`, `Author`, `Genre`, and `Pu
|
||||
|
||||
```js
|
||||
const ths = document.querySelectorAll('thead tr th');
|
||||
assert.equal(ths[0]?.textContent, 'Title');
|
||||
assert.equal(ths[1]?.textContent, 'Author');
|
||||
assert.equal(ths[2]?.textContent, 'Genre');
|
||||
assert.equal(ths[3]?.textContent, 'Publication Year');
|
||||
assert.equal(ths[0]?.textContent.trim(), 'Title');
|
||||
assert.equal(ths[1]?.textContent.trim(), 'Author');
|
||||
assert.equal(ths[2]?.textContent.trim(), 'Genre');
|
||||
assert.equal(ths[3]?.textContent.trim(), 'Publication Year');
|
||||
```
|
||||
|
||||
You should have one `tbody` element within your `table` element.
|
||||
@@ -87,7 +87,7 @@ const tds = document.querySelectorAll('tbody tr td');
|
||||
assert.isAtLeast(tds.length, 1);
|
||||
|
||||
tds.forEach(td => {
|
||||
assert.isAtLeast(td.textContent.length, 1);
|
||||
assert.isAtLeast(td.textContent.trim().length, 1);
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user