fix: allow spaces around element content in workshop hotel feedback form (#62262)

This commit is contained in:
Ilenia
2025-09-19 14:44:20 +02:00
committed by GitHub
parent dc5a75fbc3
commit adf8b1644e
10 changed files with 19 additions and 21 deletions
@@ -22,7 +22,7 @@ assert.lengthOf(document.querySelectorAll('fieldset label'), 2);
Your `label` element should have the text `Email address (required):`.
```js
assert.strictEqual(document.querySelector('fieldset label:nth-of-type(2)')?.innerText, 'Email address (required):');
assert.strictEqual(document.querySelector('fieldset label:nth-of-type(2)')?.innerText.trim(), 'Email address (required):');
```
Your `label` element should have a `for` attribute set to the value of `"email"`.
@@ -30,7 +30,7 @@ assert.isNotNull(document.querySelector('label[for="age"]'));
Your `label` element should have the text `Age (optional):`.
```js
assert.strictEqual(document.querySelector('label[for="age"]')?.textContent, "Age (optional):");
assert.strictEqual(document.querySelector('label[for="age"]')?.textContent.trim(), "Age (optional):");
```
# --seed--
@@ -30,7 +30,7 @@ assert.lengthOf(document.querySelectorAll('fieldset legend'), 2);
Your `legend` element should have the text of `Was this your first time at our hotel?`.
```js
assert.strictEqual(document.querySelectorAll('fieldset legend')[1]?.textContent, 'Was this your first time at our hotel?');
assert.strictEqual(document.querySelectorAll('fieldset legend')[1]?.textContent.trim(), 'Was this your first time at our hotel?');
```
# --seed--
@@ -30,7 +30,7 @@ assert.lengthOf(document.querySelectorAll('fieldset:nth-of-type(3) legend'), 1);
Your `legend` element should have the text of `Why did you choose to stay at our hotel? (Check all that apply)`. Double check for spelling errors and spacing issues.
```js
assert.strictEqual(document.querySelector('fieldset:nth-of-type(3) legend')?.innerText, 'Why did you choose to stay at our hotel? (Check all that apply)');
assert.strictEqual(document.querySelector('fieldset:nth-of-type(3) legend')?.innerText.trim(), 'Why did you choose to stay at our hotel? (Check all that apply)');
```
# --seed--
@@ -30,7 +30,7 @@ assert.lengthOf(document.querySelectorAll('fieldset:nth-of-type(4) legend'), 1);
Your legend should have the text `Ratings`.
```js
assert.strictEqual(document.querySelectorAll('fieldset:nth-of-type(4) legend')[0]?.textContent, 'Ratings');
assert.strictEqual(document.querySelectorAll('fieldset:nth-of-type(4) legend')[0]?.textContent.trim(), 'Ratings');
```
Your `fieldset` should have a `label` element below the `legend`.
@@ -42,7 +42,7 @@ assert.lengthOf(document.querySelectorAll('fieldset:nth-of-type(4) legend + labe
Your `label` should have the text `How was the service?`.
```js
assert.strictEqual(document.querySelectorAll('fieldset:nth-of-type(4) legend + label')[0]?.textContent, 'How was the service?');
assert.strictEqual(document.querySelectorAll('fieldset:nth-of-type(4) legend + label')[0]?.textContent.trim(), 'How was the service?');
```
Your `label` should have the `for` attribute set to `"service"`.
@@ -36,7 +36,7 @@ assert.exists(document.querySelector('option[value="poor"]'));
Your `option` element with the `value` of `"poor"` should have the text `Poor`.
```js
assert.strictEqual(document.querySelector('option[value="poor"]')?.textContent, 'Poor');
assert.strictEqual(document.querySelector('option[value="poor"]')?.textContent.trim(), 'Poor');
```
You should have an `option` element with the `value` set to `"satisfactory"`.
@@ -48,7 +48,7 @@ assert.exists(document.querySelector('option[value="satisfactory"]'));
Your `option` element with the `value` of `"satisfactory"` should have the text `Satisfactory`.
```js
assert.strictEqual(document.querySelector('option[value="satisfactory"]')?.textContent, 'Satisfactory');
assert.strictEqual(document.querySelector('option[value="satisfactory"]')?.textContent.trim(), 'Satisfactory');
```
You should have an `option` element with the `value` set to `"good"`.
@@ -61,7 +61,7 @@ Your `option` element with the `value` of `"good"` should have the text `Good`.
```js
assert.strictEqual(document.querySelector('option[value="good"]')?.textContent, 'Good');
assert.strictEqual(document.querySelector('option[value="good"]')?.textContent.trim(), 'Good');
```
You should have an `option` element with the value set to `"very-good"`.
@@ -73,7 +73,7 @@ assert.exists(document.querySelector('option[value="very-good"]'));
Your `option` element with the `value` of `"very-good"` should have the text `Very Good`.
```js
assert.strictEqual(document.querySelector('option[value="very-good"]')?.textContent, 'Very Good');
assert.strictEqual(document.querySelector('option[value="very-good"]')?.textContent.trim(), 'Very Good');
```
You should have an `option` element with the value set to `"excellent"`.
@@ -85,8 +85,7 @@ assert.exists(document.querySelector('option[value="excellent"]'));
Your `option` element with the `value` of `"excellent"` should have the text `Excellent`.
```js
assert.strictEqual(document.querySelector('option[value="excellent"]')?.textContent, 'Excellent');
assert.strictEqual(document.querySelector('option[value="excellent"]')?.textContent.trim(), 'Excellent');
```
# --seed--
@@ -24,7 +24,7 @@ assert.exists(document.querySelector('label[for="food"]'));
Your `label` should have the text `How was the food?`.
```js
assert.strictEqual(document.querySelector('label[for="food"]')?.textContent, 'How was the food?');
assert.strictEqual(document.querySelector('label[for="food"]')?.textContent.trim(), 'How was the food?');
```
You should have a `select` element with the `id` set to `"food"` below your `label`.
@@ -39,7 +39,7 @@ assert.exists(document.querySelector('fieldset:nth-of-type(4) select#food option
Your `option` with the `value` of `"poor"` should have the text `"Poor"`.
```js
assert.strictEqual(document.querySelector('fieldset:nth-of-type(4) select#food option[value="poor"]')?.textContent, 'Poor');
assert.strictEqual(document.querySelector('fieldset:nth-of-type(4) select#food option[value="poor"]')?.textContent.trim(), 'Poor');
```
You should have an `option` element with the `value` set to `"satisfactory"`.
@@ -51,7 +51,7 @@ assert.exists(document.querySelector('fieldset:nth-of-type(4) select#food option
Your `option` with the `value` of `"satisfactory"` should have the text `"Satisfactory"`.
```js
assert.strictEqual(document.querySelector('fieldset:nth-of-type(4) select#food option[value="satisfactory"]')?.textContent, 'Satisfactory');
assert.strictEqual(document.querySelector('fieldset:nth-of-type(4) select#food option[value="satisfactory"]')?.textContent.trim(), 'Satisfactory');
```
You should have an `option` element with the `value` set to `"good"`.
@@ -64,7 +64,7 @@ Your `option` with the `value` of `"good"` should have the text `"Good"`.
```js
assert.strictEqual(document.querySelector('fieldset:nth-of-type(4) select#food option[value="good"]')?.textContent, 'Good');
assert.strictEqual(document.querySelector('fieldset:nth-of-type(4) select#food option[value="good"]')?.textContent.trim(), 'Good');
```
You should have an `option` element with the value set to `"very-good"`.
@@ -76,7 +76,7 @@ assert.exists(document.querySelector('fieldset:nth-of-type(4) select#food option
Your `option` with the `value` of `"very-good"` should have the text `"Very Good"`.
```js
assert.strictEqual(document.querySelector('fieldset:nth-of-type(4) select#food option[value="very-good"]')?.textContent, 'Very Good');
assert.strictEqual(document.querySelector('fieldset:nth-of-type(4) select#food option[value="very-good"]')?.textContent.trim(), 'Very Good');
```
You should have an `option` element with the value set to `"excellent"`.
@@ -88,8 +88,7 @@ assert.exists(document.querySelector('fieldset:nth-of-type(4) select#food option
Your `option` with the `value` of `"excellent"` should have the text `"Excellent"`.
```js
assert.strictEqual(document.querySelector('fieldset:nth-of-type(4) select#food option[value="excellent"]')?.textContent, 'Excellent');
assert.strictEqual(document.querySelector('fieldset:nth-of-type(4) select#food option[value="excellent"]')?.textContent.trim(), 'Excellent');
```
You should have an `option` element with the `selected` attribute set to `"excellent"`.
@@ -22,7 +22,7 @@ assert.exists(document.querySelector('label[for="comments"]'));
Your `label` should have the text `Other Comments?`.
```js
assert.strictEqual(document.querySelector('label[for="comments"]')?.textContent, 'Other Comments?');
assert.strictEqual(document.querySelector('label[for="comments"]')?.textContent.trim(), 'Other Comments?');
```
# --seed--
@@ -32,7 +32,7 @@ assert.exists(document.querySelector('button[type="submit"]'));
Your button should have the text content of `Submit`.
```js
assert.strictEqual(document.querySelector('button')?.textContent, 'Submit');
assert.strictEqual(document.querySelector('button')?.textContent.trim(), 'Submit');
```
# --seed--