Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 90f789b2b6 | |||
| 0d29dab639 |
@@ -59,14 +59,6 @@ describe("FeedbackScreen", () => {
|
|||||||
container.querySelector<HTMLInputElement>('input[value="problem"]')
|
container.querySelector<HTMLInputElement>('input[value="problem"]')
|
||||||
?.checked,
|
?.checked,
|
||||||
).toBe(true);
|
).toBe(true);
|
||||||
expect(container.textContent).toContain(
|
|
||||||
"Minimum 10 characters required.",
|
|
||||||
);
|
|
||||||
expect(
|
|
||||||
container
|
|
||||||
.querySelector("textarea")
|
|
||||||
?.getAttribute("aria-describedby"),
|
|
||||||
).toBe("feedback-content-hint");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("submits valid text and renders the feedback id", async () => {
|
it("submits valid text and renders the feedback id", async () => {
|
||||||
|
|||||||
@@ -238,14 +238,6 @@ h2.fieldLabel {
|
|||||||
font-weight: 570;
|
font-weight: 570;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentHint {
|
|
||||||
margin: -6px 0 0;
|
|
||||||
color: #998b90;
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 570;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.imageCount {
|
.imageCount {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
color: #8d7c82;
|
color: #8d7c82;
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import {
|
|||||||
FEEDBACK_IMAGE_LIMIT,
|
FEEDBACK_IMAGE_LIMIT,
|
||||||
} from "./feedback-image";
|
} from "./feedback-image";
|
||||||
import {
|
import {
|
||||||
FEEDBACK_CONTENT_MIN_LENGTH,
|
|
||||||
FEEDBACK_CONTENT_MAX_LENGTH,
|
FEEDBACK_CONTENT_MAX_LENGTH,
|
||||||
useFeedbackSubmission,
|
useFeedbackSubmission,
|
||||||
} from "./use-feedback-submission";
|
} from "./use-feedback-submission";
|
||||||
@@ -144,13 +143,9 @@ export function FeedbackScreen() {
|
|||||||
<label className={styles.fieldLabel} htmlFor="feedback-content">
|
<label className={styles.fieldLabel} htmlFor="feedback-content">
|
||||||
Describe your feedback
|
Describe your feedback
|
||||||
</label>
|
</label>
|
||||||
<p id="feedback-content-hint" className={styles.contentHint}>
|
|
||||||
Minimum {FEEDBACK_CONTENT_MIN_LENGTH} characters required.
|
|
||||||
</p>
|
|
||||||
<div className={styles.textareaFrame}>
|
<div className={styles.textareaFrame}>
|
||||||
<textarea
|
<textarea
|
||||||
id="feedback-content"
|
id="feedback-content"
|
||||||
aria-describedby="feedback-content-hint"
|
|
||||||
value={form.content}
|
value={form.content}
|
||||||
maxLength={FEEDBACK_CONTENT_MAX_LENGTH}
|
maxLength={FEEDBACK_CONTENT_MAX_LENGTH}
|
||||||
disabled={form.isSubmitting}
|
disabled={form.isSubmitting}
|
||||||
|
|||||||
Reference in New Issue
Block a user